Selaa lähdekoodia

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

# Conflicts:
#	business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
#	svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/XzzxCotroller.java
wangzhinan 4 vuotta sitten
vanhempi
commit
d1bd17cf5f

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

@ -7519,55 +7519,63 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    xzyyPrescriptionService.SOF_SignDataWithExtraInfo(wlyyPrescriptionDO);
                    //同步电子病历
                    WlyyPrescriptionEmrDO prescriptionEmrDO = prescriptionEmrDao.findEmrByPrescriptionId(prescriptionId);
                    if (prescriptionEmrDO != null) {
                        logger.info("电子病历同步");
                        xzzxEntranceService.saveEmrToEntrance(prescriptionId);
                        logger.info("电子病历同步");
                        logger.info("电子病历签名");
                        xzyyPrescriptionService.SOF_SignDataWithExtraInfoEmr(wlyyPrescriptionDO);
                    }
                    if (object!=null){
                        if (object.getString("code").equalsIgnoreCase("0")){
                            //  * @param applyDepaName @param applyDoctorName
                            WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionId);
                            String patientCode = outpatientDO.getConsumer();
                            String realerOrder = prescriptionDO.getRealOrder();
                            String recipeTime = DateUtil.dateToStr(prescriptionDO.getCreateTime(), "yyyyMMddHHmmss");
                            List<BaseDoctorHospitalDO> doctorHospitalDOS = baseDoctorHospitalDao.findByDoctorCode(prescriptionDO.getDoctor());
                            String applyDepaName = null;
                            if (doctorHospitalDOS != null && doctorHospitalDOS.size() != 0) {
                                applyDepaName = doctorHospitalDOS.get(0).getDeptName();
                            }
                            String voucherNo = outpatientDO.getRegisterNo();
                            String applyDoctorName = prescriptionDO.getDoctorName();
                            BasePatientDO patientDO = basePatientDao.findById(patientCode);
                            String userName = null;
                            String idcard = null;
                            if (patientDO != null) {
                                userName = patientDO.getName();
                                idcard = patientDO.getIdcard();
                            }
                            PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patientCode);
                            String userNo = null;
                            if (patientMappingDO != null) {
                                userNo = patientMappingDO.getMappingCode();
                            }
                            String cardNo = null;
                            if (StringUtils.isNoneBlank(outpatientDO.getCardNo())) {
                                cardNo = outpatientDO.getCardNo();
                   /* try {
                        if (prescriptionEmrDO != null) {
                            logger.info("电子病历同步");
                            xzzxEntranceService.saveEmrToEntrance(prescriptionId);
                            logger.info("电子病历同步");
                            logger.info("电子病历签名");
                            xzyyPrescriptionService.SOF_SignDataWithExtraInfoEmr(wlyyPrescriptionDO);
                        }
                    }catch (Exception e){
                        e.printStackTrace();
                    }*/
                    try {
                        if (object!=null){
                            if (object.getString("code").equalsIgnoreCase("0")){
                                //  * @param applyDepaName @param applyDoctorName
                                WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionId);
                                String patientCode = outpatientDO.getConsumer();
                                String realerOrder = prescriptionDO.getRealOrder();
                                String recipeTime = DateUtil.dateToStr(prescriptionDO.getCreateTime(), "yyyyMMddHHmmss");
                                List<BaseDoctorHospitalDO> doctorHospitalDOS = baseDoctorHospitalDao.findByDoctorCode(prescriptionDO.getDoctor());
                                String applyDepaName = null;
                                if (doctorHospitalDOS != null && doctorHospitalDOS.size() != 0) {
                                    applyDepaName = doctorHospitalDOS.get(0).getDeptName();
                                }
                                String voucherNo = outpatientDO.getRegisterNo();
                                String applyDoctorName = prescriptionDO.getDoctorName();
                                BasePatientDO patientDO = basePatientDao.findById(patientCode);
                                String userName = null;
                                String idcard = null;
                                if (patientDO != null) {
                                    userName = patientDO.getName();
                                    idcard = patientDO.getIdcard();
                                }
                                PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patientCode);
                                String userNo = null;
                                if (patientMappingDO != null) {
                                    userNo = patientMappingDO.getMappingCode();
                                }
                                String cardNo = null;
                                if (StringUtils.isNoneBlank(outpatientDO.getCardNo())) {
                                    cardNo = outpatientDO.getCardNo();
                                }
                                logger.info("cardNo:" + cardNo);
                               /* JSONObject jsonObject =entranceService.BS15054(patientMappingDO.getMappingCode(),prescriptionDO.getRealOrder(),demoFlag);
                                net.sf.json.JSONObject res = jsonObject.getJSONObject("resquest");
                                logger.info("获取待结算数据 res: " + res.toString());
                                String rsCode = res.getString("@RESULT");
                                String free= 0+"";
                                if ("0".equals(rsCode)) {
                                    free = res.getString("@total_charge");
                                }*/
                                ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, "", "");
                            }
                            logger.info("cardNo:" + cardNo);
                           /* JSONObject jsonObject =entranceService.BS15054(patientMappingDO.getMappingCode(),prescriptionDO.getRealOrder(),demoFlag);
                            net.sf.json.JSONObject res = jsonObject.getJSONObject("resquest");
                            logger.info("获取待结算数据 res: " + res.toString());
                            String rsCode = res.getString("@RESULT");
                            String free= 0+"";
                            if ("0".equals(rsCode)) {
                                free = res.getString("@total_charge");
                            }*/
                            ylzPayService.msgPush("01", cardNo, "01", patientDO.getMobile(), "00", userNo, userName, idcard, voucherNo, applyDepaName, applyDoctorName, recipeTime, "0", "1");
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                } catch (Exception e) {

+ 6 - 2
business/base-service/src/main/java/com/yihu/jw/order/pay/ylz/YlzPayService.java

@ -282,8 +282,12 @@ public class YlzPayService {
            jsonObject.put("applyDepaName",applyDepaName);//申请科室名称
            jsonObject.put("applyDoctorName",applyDoctorName);//申请医生姓名
            jsonObject.put("recipeTime",recipeTime);//处方时间yyyyMMddHHmmss
            jsonObject.put("fee",free);//总费用
            jsonObject.put("recipeNum",recipeNum);//处方数
            if (StringUtils.isNoneBlank(fee)){
                jsonObject.put("fee",free);//总费用
            }
            if (StringUtils.isNoneBlank(recipeNum)){
                jsonObject.put("recipeNum",recipeNum);//处方数
            }
            System.out.println("推送模板消息参数"+jsonObject.toJSONString());
            //jsonObject.put("extra")
            ResponseParams<MmpPushResult> response = onepayClient.mmpMsgPush(jsonObject);