Pārlūkot izejas kodu

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/PrescriptionService.java
wangzhinan 4 gadi atpakaļ
vecāks
revīzija
b47304e824

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

@ -3837,7 +3837,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
    
        if(StringUtils.isNotBlank(workingTime)){
            sql+=" AND wk.date = :workingTime ";
            sql+=" AND wk.work_date = :workingTime ";
            params.put("workingTime",workingTime);
        }
    
@ -5712,7 +5712,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            WlyyOutpatientDO outpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId());
            if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
                try {
                    /*List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId,1);
                    List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId,1);
                    List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionId,1);
                    DoctorMappingDO doctorMappingDO = doctorMappingService.findMappingCode(outpatientDO.getDoctor(), outpatientDO.getHospital());
@ -5727,7 +5727,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        setInspectionParam(jsonData, doctorMappingDO, outpatientDO, wlyyPrescriptionDO, ins, outpatientDO.getIcd10());
                    }
                    Map<String,Object> map = sendHisDiagnosis(jsonData, outpatientDO, wlyyPrescriptionDO);
                    if (map.get("code").toString().equalsIgnoreCase("0")){*/
                    if (map.get("code").toString().equalsIgnoreCase("0")){
                        //  * @param applyDepaName @param applyDoctorName
                        WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionId);
                        String patientCode = prescriptionDO.getPatientCode();
@ -5750,7 +5750,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        }
                        PatientMedicareCardDO patientMedicareCardDO = patientMedicareCardDao.findByTypeAndPatientCodeAndDel("A_01",patientCode,"1");
                        ylzPayService.msgPush("01",patientMedicareCardDO.getCode(),"01",patientDO.getMobile(),"03",userNo,userName,idcard,realerOrder,applyDepaName,applyDoctorName,recipeTime,free,"1");
                /*    }*/
                    }
                    //sendHisDiagnosis(jsonData, outpatientDO, wlyyPrescriptionDO);
                } catch (Exception e) {
@ -6073,7 +6073,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    /**
     * 电子病历html
     * @param registerSn
     * @return
     * @throws Exception
     */
    public String readOutPatient(String registerSn) throws Exception {
        String url = "";
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("HAI_TAI_URL");
@ -6099,16 +6104,44 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        XMLSerializer xmlSerializer = new XMLSerializer();
        net.sf.json.JSON json = xmlSerializer.read(returnValue);
        logger.info("返回json"+json);
        Object retInfo=  ((JSONObject) json).get("HtResponse");
        logger.info("retInfo:"+retInfo);
        if(retInfo!=null){
            JSONObject jsonObject = (JSONObject)retInfo;
            String content =jsonObject.getString("XML_CONT");
            Document doc = Jsoup.parse(content);
            Elements rows = doc.select("table[class=list]").get(0).select("tr");
        return json.toString();
    }
    /**
     * 电子病历xml
     * @param registerSn
     * @return
     * @throws Exception
     */
    public String readOutPatientXml(String registerSn) throws Exception {
        String url = "";
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("HAI_TAI_URL");
        if (wlyyHospitalSysDictDO!=null){
            url = wlyyHospitalSysDictDO.getDictCode();
        }
        String xmlStr = "<?xml version=\"1.0\" encoding=\"GBK\"?>\n" +
                "<HtRequest>\n";
        xmlStr+="<REGISTER_SN>"+registerSn+"</REGISTER_SN>";
        String reqTime = DateUtil.dateToStr(new Date(),"yyyyMMddHHmmssSSS");
        xmlStr+="<REQ_TIME>"+reqTime+"</REQ_TIME>";
        xmlStr+="</HtRequest>";
        String returnValue = "";
        Map<String, String> params = new HashedMap();
        params.put("type","readOutPatientDetail");
        params.put("xmlStr",xmlStr);
        returnValue = com.yihu.jw.utils.WebserviceUtil.post(url,
                "http://business.htemr.haitaiinc.com",
                "manageOutRegister",
                params);
        return returnValue;
        logger.info("调用电子病历查询接口请求成功,返回值xmlstr:" + returnValue);
        XMLSerializer xmlSerializer = new XMLSerializer();
        net.sf.json.JSON json = xmlSerializer.read(returnValue);
        logger.info("返回json"+json);
        return json.toString();
    }
    public String writeOutPatient(String registerSn,String chiefComplaint,String hpi,String elapsemhis,String bodycheck,String assistanTcheck) throws Exception {
@ -6140,7 +6173,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                params);
        logger.info("调用电子病历写入接口请求成功,返回值xmlstr:" + returnValue);
        return returnValue;
        XMLSerializer xmlSerializer = new XMLSerializer();
        net.sf.json.JSON json = xmlSerializer.read(returnValue);
        logger.info("返回json"+json);
        return json.toString();
    }

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

@ -343,7 +343,7 @@ public class YlzPayService {
            e.printStackTrace(pw);
            error = sw.toString();
        }
        logService.saveHttpLog(isSuccess, "hop.mmpay.msg.push", "互联网医院消息推送", "POST", null,JSON.toJSONString(jsonObject), object, error,logService.pushType);
        logService.saveHttpLog(isSuccess, "hop.mmpay.sicard.url", "互联网医院支付地址", "POST", null,JSON.toJSONString(jsonObject), object, error,logService.pushType);
        return object;
    }
}

+ 8 - 1
business/base-service/src/main/java/com/yihu/jw/wechat/service/WechatInfoService.java

@ -87,7 +87,14 @@ public class WechatInfoService {
            
            //中山医院互联网医院
            if("xm_zsyy_wx".equals(wxId)) {
                token = entranceService.getAccessToken("100033");
                String response = entranceService.getAccessToken("100033");
                net.sf.json.JSONObject object1 = net.sf.json.JSONObject.fromObject(response);
                if (null != object1&&null!=object1.get("respCode") && "00".equals(object1.get("respCode"))) {
                    token  = object1.getJSONObject("respEntity").getString("access_token");
                } else {
                    throw new Exception("获取ACCESSTOKEN失败");
                }
            }else if("xm_xzzx_wx".equals(wxId)){
                token = xzzxEntranceService.getXzToken();
            }else{

+ 3 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java

@ -19,13 +19,13 @@ public abstract class IntegerIdentityEntity implements Serializable {
    @Id
//==========mysql 环境 id策略======================================================
/*    @GeneratedValue(generator = "generator")
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "identity")
    @Column(name = "id", unique = true, nullable = false)*/
    @Column(name = "id", unique = true, nullable = false)
//==========mysql 环境 id策略 end======================================================
//==========Oracle 环境id策略 =========================================================
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")
  /*  @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
//==========Oracle 环境id策略 =========================================================
    public Integer getId() {
        return id;

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -430,6 +430,7 @@ public class BaseHospitalRequestMapping {
        public static final String attentionDoctor="/attentionDoctor";
        public static final String findAllAttentionDoctor="/findAllAttentionDoctor";
        public static final String findHisEmr="/findHisEmr";
        public static final String findHisEmrXml= "/findHisEmrXml";
        public static final String findTown="/findTown";

+ 18 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -1586,6 +1586,24 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        }
    }
    /**
     * 查询his电子病历
     * @param registerSn
     * @return
     * @throws Exception
     */
    @GetMapping(value= BaseHospitalRequestMapping.Prescription.findHisEmrXml)
    @ApiOperation("查询电子病历")
    public ObjEnvelop findHisEmrXml(
            @ApiParam(name = "registerSn", value = "registerSn", required = true)
            @RequestParam(required = true)String registerSn) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",prescriptionService.readOutPatientXml(registerSn));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value= BaseHospitalRequestMapping.Prescription.saveEmr)
    @ApiOperation("写入his电子病历")
    public ObjEnvelop findHisEmr(