Browse Source

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

# Conflicts:
#	common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionExpressageLogDO.java
wangzhinan 4 years ago
parent
commit
d9e552b76d

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

@ -1760,6 +1760,7 @@ public class EntranceService {
            resp = MqSdkUtil.xml2jsonArrayRootRowMS02003(resp);
        }
        net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(resp);
        logger.info("获取医生数据"+jsonObject.toString());
        if (null != jsonObject && "1".equals(jsonObject.get("code").toString())) {
            JSONArray jsonObjectMgsInfo = (JSONArray) jsonObject.get("MsgInfo");
            if (null != jsonObjectMgsInfo) {
@ -1810,6 +1811,16 @@ public class EntranceService {
                                    baseDoctorDO.setIsFamous(0);
                                    baseDoctorDO.setCreateTime(new Date());
                                    baseDoctorDO.setUpdateTime(new Date());
                                    if (StringUtils.isNotBlank(idCard)) {
                                        baseDoctorDO.setSalt(PwdUtil.randomString(5));
                                        try {
                                            baseDoctorDO.setPassword(com.yihu.utils.security.MD5.md5Hex(baseDoctorDO.getIdcard().substring(baseDoctorDO.getIdcard().length() - 6) + "{" + baseDoctorDO.getSalt() + "}"));
                                        } catch (Exception e) {
                                            logger.error(e.getMessage() + "docotr=" + doctorCode + ";idcard=" + baseDoctorDO.getIdcard());
                                        }
                                    } else {
                                        baseDoctorDO.setPassword(com.yihu.utils.security.MD5.md5Hex("123456" + "{" + baseDoctorDO.getSalt() + "}"));
                                    }
                                }
                                //拼音码
                                baseDoctorDO.setSpell(null == jsonObjectBody.get("PinYin_Code") ? "" : jsonObjectBody.get("PinYin_Code").toString());
@ -1817,16 +1828,7 @@ public class EntranceService {
                                doctorName = null == jsonObjectBody.get("Emp_Name") ? "" : jsonObjectBody.get("Emp_Name").toString();
                                //号别
                                baseDoctorDO.setChargeType(chareType);
                                if (StringUtils.isNotBlank(idCard)) {
                                    baseDoctorDO.setSalt(PwdUtil.randomString(5));
                                    try {
                                        baseDoctorDO.setPassword(com.yihu.utils.security.MD5.md5Hex(baseDoctorDO.getIdcard().substring(baseDoctorDO.getIdcard().length() - 6) + "{" + baseDoctorDO.getSalt() + "}"));
                                    } catch (Exception e) {
                                        logger.error(e.getMessage() + "docotr=" + doctorCode + ";idcard=" + baseDoctorDO.getIdcard());
                                    }
                                } else {
                                    baseDoctorDO.setPassword(com.yihu.utils.security.MD5.md5Hex("123456" + "{" + baseDoctorDO.getSalt() + "}"));
                                }
                                baseDoctorDO = baseDoctorDao.save(baseDoctorDO);
                                //根据医生和机构判断数据是否存在,若不存在则在mapping中追加记录
                                List<DoctorMappingDO> doctorMappingDOS = doctorMappingDao.findByDoctorAndOrgCode(baseDoctorDO.getId(), "350211A1002");

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

@ -2,7 +2,9 @@ package com.yihu.jw.order.pay.ylz;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.entity.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.prescription.dao.OauthYlzConfigDao;
import com.yihu.jw.order.pay.utils.PayLogService;
import com.yihu.jw.util.common.QrcodeUtil;
@ -33,6 +35,8 @@ public class YlzPayService {
    @Autowired
    private PayLogService logService;
    @Autowired
    private WlyyHospitalSysDictDao hospitalSysDictDao;
    /**
@ -262,6 +266,13 @@ public class YlzPayService {
        String encryptType = oauthYlzConfigDO.getEncType();
        HisOnepayClient onepayClient = new HisOnepayClient(onepayUrl, appId, appSecret, signType, encryptType);
        JSONObject jsonObject = new JSONObject();
        WlyyHospitalSysDictDO hospitalSysDictDO = hospitalSysDictDao.findById("EXAMFREE");
        Double free = 0.0;
        if (hospitalSysDictDO!=null){
            free = Double.parseDouble(fee)+Integer.parseInt(hospitalSysDictDO.getDictValue());
        }else {
            free = Double.parseDouble(fee);
        }
        try {
            jsonObject.put("cardType",cardType);//卡类型01 社保卡 06 临时卡
            jsonObject.put("cardNo",cardNo);//卡号
@ -275,7 +286,7 @@ public class YlzPayService {
            jsonObject.put("applyDepaName",applyDepaName);//申请科室名称
            jsonObject.put("applyDoctorName",applyDoctorName);//申请医生姓名
            jsonObject.put("recipeTime",recipeTime);//处方时间yyyyMMddHHmmss
            jsonObject.put("fee",Double.parseDouble(fee)+15);//总费用
            jsonObject.put("fee",free);//总费用
            jsonObject.put("recipeNum",recipeNum);//处方数
            System.out.println("推送模板消息参数"+jsonObject.toJSONString());
            //jsonObject.put("extra")