Browse Source

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

wangjun 4 years ago
parent
commit
adec5ee5b9

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

@ -99,7 +99,6 @@ import net.sf.json.JSONObject;
import net.sf.json.xml.XMLSerializer;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
@ -7498,9 +7497,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        com.alibaba.fastjson.JSONObject jsonObject2 = xzzxEntranceService.saveDiagnosisToEntrance(outpatientDO.getRegisterNo(),diagnosisName,diagnosisCode);
                        logger.info("上传诊断返回参数"+jsonObject2);
                        //{"msg":"交易成功","code":"0","data":{"PresDetail":{"PresNo":"16151365"}},"success":"True"}
                        if (jsonObject2.getString("code").equalsIgnoreCase("0")){
                            com.alibaba.fastjson.JSONObject jsonObject = jsonObject2.getJSONObject("data");
                            logger.info("上传诊断成功"+jsonObject2);
                        if (jsonObject2!=null){
                            if (jsonObject2.getString("code").equalsIgnoreCase("0")){
                                com.alibaba.fastjson.JSONObject jsonObject = jsonObject2.getJSONObject("data");
                                logger.info("上传诊断成功"+jsonObject2);
                            }
                        }
                    }
                    //同步处方
@ -7508,13 +7509,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    com.alibaba.fastjson.JSONObject object = xzzxEntranceService.savePrescriptionToEntrance("0",outpatientDO.getCardNo(),outpatientDO.getRegisterNo(),outpatientDO.getDept(),applyDoctor,"50100",infoDOS);
                    logger.info("成功上传处方"+object);
                    //{"msg":"交易成功","code":"0","data":{"PresDetail":{"PresNo":"16151365"}},"success":"True"}
                    if (object.getString("code").equalsIgnoreCase("0")){
                        com.alibaba.fastjson.JSONObject jsonObject = object.getJSONObject("data");
                        com.alibaba.fastjson.JSONObject jsonObject1 = jsonObject.getJSONObject("PresDetail");
                        String realOrder = jsonObject1.getString("PresNo");
                        wlyyPrescriptionDO.setAdmNo(outpatientDO.getAdmNo());
                        wlyyPrescriptionDO.setSerialNo(outpatientDO.getAdmNo());
                        wlyyPrescriptionDO.setRealOrder(realOrder);
                    if (object!=null){
                        if (object.getString("code").equalsIgnoreCase("0")){
                            com.alibaba.fastjson.JSONObject jsonObject = object.getJSONObject("data");
                            com.alibaba.fastjson.JSONObject jsonObject1 = jsonObject.getJSONObject("PresDetail");
                            String realOrder = jsonObject1.getString("PresNo");
                            wlyyPrescriptionDO.setAdmNo(outpatientDO.getAdmNo());
                            wlyyPrescriptionDO.setSerialNo(outpatientDO.getAdmNo());
                            wlyyPrescriptionDO.setRealOrder(realOrder);
                        }
                    }
                    logger.info("进入处方签名");
                    //处方签名

+ 15 - 9
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java

@ -126,17 +126,25 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        JSONObject res =  xzzxEntranceService.registeredOperate(doctorFlag,outpatientDO.getDept(),patientMappingDO.getMappingCode(),doctorDO.getChargeType(),courierflag);
        JSONObject result = new JSONObject();
        logger.info("挂号结果 res: " + res.toString());
        JSONObject object = res.getJSONObject("returnContents");
        String rsCode = "";
        if (object!=null){
            result.put("@RESULT", "0");
            result.put("@MSG","挂号成功!");
            rsCode = object.getString("registerNo");
        String serialNo = "";
        if (res!=null){
            JSONObject object = res.getJSONObject("returnContents");
            serialNo = object.getString("registerNo");
            if (object!=null){
                result.put("@RESULT", "0");
                result.put("@MSG","挂号成功!");
                rsCode = object.getString("registerNo");
            }
        }else {
            result.put("@RESULT", "-1");
            result.put("@MSG","挂号失败");
        }
        if (StringUtils.isNoneBlank(rsCode)) {
            //存储挂号号
            String serialNo = object.getString("registerNo");
            outpatientDO.setRegisterNo(serialNo);
            outpatientDO.setAdmDate(new Date());
            outpatientDO.setAdmNo(serialNo);
@ -162,7 +170,6 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        } else if ("-2".equals(rsCode)) {
            String serialNo = (String) res.get("registerNo");
            outpatientDO.setRegisterNo(serialNo);
            outpatientDO.setAdmDate(new Date());
            outpatientDO.setAdmNo(serialNo);
@ -368,7 +375,6 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            head.put("clientId",clientId);
            head.put("templateId",templateId);
            head.put("clientSecret",clientSecret);
            head.put("selfSign",true);
            msg.put("head",head);
            JSONObject body = new JSONObject();
            body.put("urId",urId);
@ -383,7 +389,7 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            body.put("openId",openId);
            msg.put("body",body);
            object.put("msg",msg);
            object.put("signType",4);
            object.put("signType",0);
            logger.info("请求参数:"+object);
            String response = httpClientUtil.sendPost(url,object.toJSONString());
            logger.info("数据签名接口 :"+response);