瀏覽代碼

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

humingfen 4 年之前
父節點
當前提交
ee401640bb

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -495,7 +495,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                    if (null!=map.get("birthday")){
                        System.out.println("birthday:"+map.get("birthday").toString());
                    }
                    List<PatientMedicareCardDO> list1 = basePatientMedicareCardDao.findByPatientCode(patientId);
                    List<PatientMedicareCardDO> list1 = basePatientMedicareCardDao.findByPatientCode(map.get("familyMember").toString());
                    if (null!=list1&&list1.size()>0){
                        map.put("card",list1.get(0));
                    }else {
@ -523,7 +523,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                        int age = getAgeByBirth(sp.parse(map.get("birthday").toString()));
                        map.put("age",age);
                    }
                    List<PatientMedicareCardDO> list1 = basePatientMedicareCardDao.findByPatientCode(patientId);
                    List<PatientMedicareCardDO> list1 = basePatientMedicareCardDao.findByPatientCode(map.get("familyMember").toString());
                    map.put("cardList",list1);
                }
            }

+ 0 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -10856,7 +10856,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_hsyycg_notice", scene, 1);
                    BeanUtils.copyProperties(config, newConfig);
                    newConfig.setFirst(config.getFirst().replace("key1",userName));
                    newConfig.setKeyword1("核酸检测预约单支付");
                    if ("3".equalsIgnoreCase(baseNatAppointmentDO.getHospitalFlag())){
                        newConfig.setKeyword2("厦门大学附属厦门眼科中心思北院区");
                    }else {
@ -10886,7 +10885,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    WxTemplateConfigDO configPayNotice = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_hszf_notice", scenePayNotice, 1);
                    BeanUtils.copyProperties(configPayNotice, newPayNotice);
                    newPayNotice.setFirst(configPayNotice.getFirst().replace("key1",userName));
                    newPayNotice.setKeyword1("核酸检测预约单支付");
                    if ("3".equalsIgnoreCase(baseNatAppointmentDO.getHospitalFlag())){
                        newPayNotice.setKeyword2("厦门大学附属厦门眼科中心思北院区");
                    }else {

+ 10 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/YkyyEntranceService.java

@ -69,7 +69,7 @@ public class YkyyEntranceService {
    private final static String url="http://192.168.20.55:10023/ykyy/createSQLQuery";
//    private final static String url="http://localhost:10023/ykyy/createSQLQuery";
//    private final static String url="http://localhost:10023/ykyy/createSQLQuery";192.168.33.197
    private final static String saveUrl="http://192.168.20.55:10023/ykyy/save";
    private final static String orderUrl="http://192.168.20.55:10023/ykyy/outPatientOrder";
@ -2079,6 +2079,7 @@ public class YkyyEntranceService {
        ykEmrJcsqDO.setSqsl(1);
        ykEmrJcsqDO.setJclx(1);
        ykEmrJcsqDO.setXmdw("人次");
        ykEmrJcsqDO.setJbbh(icd10Flag);
        ykEmrJcsqDO.setKdsj(new Date());
        Integer brxb = 0;
        String brxm = "";
@ -3222,6 +3223,14 @@ public class YkyyEntranceService {
                res.put("status", -1);
                res.put("message", "建档失败,失败原因:" + rs1.getString("message"));
                return res;
            }else {
                if (rs1.get("message")!=null){
                    if (rs1.getString("message").contains("已经建过档案")){
                        res.put("status", 200);
                        res.put("message",rs1.getString("message"));
                        return res;
                    }
                }
            }
        }
        return res;

+ 12 - 0
business/base-service/src/main/java/com/yihu/jw/utils/hibernate/HibenateUtils.java

@ -246,6 +246,18 @@ public class HibenateUtils {
        String priceStr = (String) query.getOutputParameterValue("P_ERRMSG"); // 获取存储过程中的返回值
        return priceStr;
    }
    public String updateSfzh(Float brid,String sfzh) {
        StoredProcedureQuery query = entityManager
                .createStoredProcedureQuery("zksg.SP_ZKSG_sfzhxg@xec_link") // 被调用存储过程名称
                .registerStoredProcedureParameter("P_BRID", Float.class, ParameterMode.IN) // 注册参数
                .registerStoredProcedureParameter("P_SFZH", String.class, ParameterMode.IN)
                .registerStoredProcedureParameter("P_ERRMSG", String.class, ParameterMode.INOUT)
                .setParameter("P_BRID", brid)
                .setParameter("P_YBKH", sfzh);
        query.execute();
        String priceStr = (String) query.getOutputParameterValue("P_ERRMSG"); // 获取存储过程中的返回值
        return priceStr;
    }
}

+ 7 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/util/AesEncryptUtils.java

@ -23,6 +23,13 @@ public class AesEncryptUtils {
    private static final String ALGORITHMSTR = "AES/ECB/PKCS5Padding";
    //AES_DECRYPT(from_base64(d.patient_name),'jkzl2021ZJXL*#%a')
    public static String jiamiMysql(String str){
        return encrypt(str,KEY);
    }
    public static String jiemiMysql(String str){
        return decrypt(str,KEY);
    }
    public static String decryptMysql(String name,String alias){

+ 13 - 8
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/hospital/WlyyFamilyMemberController.java

@ -352,16 +352,21 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
                    id = jsonObject.get("id").toString();
                }
                //获取建档信息
                JSONObject jdObject = ykyyEntranceService.patientJDKH(idCard,familyName,username,medicare);
                if (jdObject!=null){
                    if(jdObject.getInteger("status") == 200) {
                        mixEnvelop = wlyyFamilyMemberService.addFamily(id, patientId, familyName, dictId, cardType, idCard, username, false, medicareType, medicare, clinicId);
                    }else {
                        mixEnvelop.setStatus(408);
                        mixEnvelop.setMessage(jdObject.getString("message"));
                        return mixEnvelop;
                if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
                    JSONObject jdObject = ykyyEntranceService.patientJDKH(idCard,familyName,username,medicare);
                    if (jdObject!=null){
                        if(jdObject.getInteger("status") == 200) {
                            mixEnvelop = wlyyFamilyMemberService.addFamily(id, patientId, familyName, dictId, cardType, idCard, username, false, medicareType, medicare, clinicId);
                        }else {
                            mixEnvelop.setStatus(408);
                            mixEnvelop.setMessage(jdObject.getString("message"));
                            return mixEnvelop;
                        }
                    }
                }else {
                    mixEnvelop = wlyyFamilyMemberService.addFamily(id, patientId, familyName, dictId, cardType, idCard, username, false, medicareType, medicare, clinicId);
                }
            } else {
                mixEnvelop.setStatus(408);
                mixEnvelop.setMessage("验证码不正确");

+ 1 - 1
svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotPatientDeviceService.java

@ -260,7 +260,7 @@ public class IotPatientDeviceService extends BaseJpaService<IotPatientDeviceDO,
     * @return
     */
    public List<LocationDataVO> findAllDeviceLocations() throws IOException {
        String sql ="select id,idcard idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
        String sql ="select id,AES_DECRYPT(from_base64(idcard),'jkzl2021ZJXL*#%a') idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
                "create_time createTime,device_name equimentName from device.wlyy_patient_device_location where del=0 ";
        List<Map<String,Object>> result = jdbcTemplate.queryForList(sql);
        List<LocationDataVO> locationDataVOList = new ArrayList<>();

+ 3 - 3
svr/svr-iot/src/main/java/com/yihu/iot/service/monitorPlatform/MonitorPlatformService.java

@ -96,7 +96,7 @@ public class MonitorPlatformService  {
            total = json.getInteger("total");
            JSONArray list = json.getJSONArray("list");
            for(int i=0;i<list.size();i++){
                String sql ="select id, idcard idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
                String sql ="select id, AES_DECRYPT(from_base64(idcard),'jkzl2021ZJXL*#%a') idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
                        "create_time createTime,device_name equimentName from device.wlyy_patient_device_location where del=0 and  device_sn='"+list.getString(i)+"'";
                List<Map<String,Object>> result = jdbcTemplate.queryForList(sql.toString());
                List<LocationDataVO> locationDataVOList = new ArrayList<>();
@ -159,7 +159,7 @@ public class MonitorPlatformService  {
                        envelop.getDetailModelList().addAll(euipmentList);
                    }
                }
                StringBuffer sql = new StringBuffer("select id,idcard idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
                StringBuffer sql = new StringBuffer("select id,AES_DECRYPT(from_base64(idcard),'jkzl2021ZJXL*#%a') idCard,category_code categoryCode,device_sn deviceSn,location,device_time deviceTime,disease_condition diseaseCondition,\n" +
                        "create_time createTime,device_name equimentName\n" +
                        "from device.wlyy_patient_device_location  ");
                StringBuffer sqlCounts = new StringBuffer("select count(*) from device.wlyy_patient_device_location ");
@ -1759,7 +1759,7 @@ public class MonitorPlatformService  {
                    location.put("lon", Double.valueOf(json.get("lng")));
                    String insertSql = "INSERT INTO device.wlyy_patient_device_location(patient,idcard,disease_condition,device_sn,\n" +
                            "device_name,category_code,device_time,create_time,location)\n" +
                            "VALUES('" + map.get("code").toString() + "','" + map.get("idcard").toString() + "','" + map.get("disease_condition").toString() + "','" + map.get("device_sn").toString() + "','" + map.get("device_name") + "',\n" +
                            "VALUES('" + map.get("code").toString() + "','" + AesEncryptUtils.jiamiMysql(map.get("idcard").toString()) + "','" + map.get("disease_condition").toString() + "','" + map.get("device_sn").toString() + "','" + map.get("device_name") + "',\n" +
                            "'" + map.get("category_code").toString() + "','" + map.get("create_time") + "','" + map.get("create_time").toString() + "','" + location.toJSONString() + "')\n";
                    jdbcTemplate.execute(insertSql);
                }