Browse Source

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

mengkang 5 years ago
parent
commit
77d6251489

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

@ -1932,12 +1932,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                businessOrderService.savePrescriptionOrder(prescription.getId());
                BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(outpatientDO.getId());
                BusinessOrderDO businessOrderDO1 = businessOrderDao.selectByRelationCode(prescription.getId());
                ykyyEntranceService.findByRealOrder(prescription.getId());
                List<WlyyPrescriptionDO> prescriptionDOList = prescriptionDao.findById(prescription.getId());
                if(prescriptionDOList!=null&&prescriptionDOList.size()!=0){
                    WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDOList.get(0);
                    ykyyService.updateDrugorderInfo(businessOrderDO.getOrderNo(),businessOrderDO1.getYkOrderId(),wlyyPrescriptionDO.getRealOrder());
                }
                ykyyEntranceService.findByRealOrder(prescription.getId());
                result.put("code", 1);
                result.put("mes", "诊断完成");
                return result;

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

@ -965,7 +965,7 @@ public class YkyyEntranceService {
                "FROM\n" +
                "\tV_ZKSG_BRCX x\n" +
                "WHERE\n" +
                "\tsfzh.sfzh = '"+idcard+"' ";
                "\tx.sfzh = '"+idcard+"' ";
        JSONArray array = new JSONArray();
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
@ -1049,7 +1049,7 @@ public class YkyyEntranceService {
                wlyyPrescriptionInfoVOS.add(prescriptionInfoVO);
            }
            //诊断
            synPrescriptionDiagnosis(prescriptionVO);
            synPrescriptionDiagnosis(prescriptionVO,code);
            prescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
            synPrecriptionHis(prescriptionVO,code);
@ -1059,12 +1059,83 @@ public class YkyyEntranceService {
    }
    /**
     * 根据身份证查找his医生
     * @param idcard
     * @return
     * @throws Exception
     */
    public JSONArray findHisDoctor(String idcard) throws Exception{
        String sql ="select y.code AS \"code\",y.ygbh,y.name AS \"name\",y.expertise AS \"expertise\",y.introduce AS \"introduce\",y.mobile AS \"mobile\",y.idCard AS \"idcard\",y.jobtitlecode AS \"jobTitleCode\",y.jobTitleName AS \"jobTitleName\",y.dept AS \"dept\",y.deptName AS \"deptName\" from v_Hlw_Ysxx y where y.idcard ='"+idcard+"'";
        JSONArray array = new JSONArray();
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("idcard:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if (status==200){
            array = rs.getJSONArray("detailModelList");
        }
        return array;
    }
    /**
     * 根据his Icd10
     * @param code
     * @return
     * @throws Exception
     */
    public JSONArray findHisIcd10(String code) throws Exception{
        String sql ="select v.code,v.name,v.flag from V_HLW_ICD10 v WHERE v.code = '"+code.trim()+"'";
        JSONArray array = new JSONArray();
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("sql:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if (status==200){
            array = rs.getJSONArray("detailModelList");
        }
        return array;
    }
    /**
     * 查找挂号明细
     * @param patient
     * @param doctor
     * @return
     * @throws Exception
     */
    public JSONArray fingHlwGhmx(String patient,String doctor) throws Exception{
        String sql = "select v.SBXH,to_char(v.ghsj,'yyyy-mm-dd hh24:mi:ss') as GHSJ from v_hlw_ghmx v where v.brid = '"+patient+"' and v.ysdm =" +
                " '"+doctor+"' and v.ghsj > to_date('"+DateUtil.dateToStrLong(DateUtil.getToday())+"','yyyy-MM-dd HH24:mi:ss')";
        JSONArray array = new JSONArray();
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("sql:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if (status==200){
            array = rs.getJSONArray("detailModelList");
        }
        return array;
    }
    /**
     * 诊断
     * @param wlyyPrescriptionVO
     */
    public void synPrescriptionDiagnosis(WlyyPrescriptionVO wlyyPrescriptionVO) throws Exception{
    public void synPrescriptionDiagnosis(WlyyPrescriptionVO wlyyPrescriptionVO,String code) throws Exception{
        String doctor = wlyyPrescriptionVO.getDoctor();
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(doctor);
        String patient = wlyyPrescriptionVO.getPatientCode();
@ -1074,7 +1145,6 @@ public class YkyyEntranceService {
        //挂号明细表HLW_GHMX
        HlwGhmxDO hlwGhmxDO = new HlwGhmxDO();
        hlwGhmxDO.setSBXH(0);
        hlwGhmxDO.setJZXH(1);
        hlwGhmxDO.setGHCS(1);
        hlwGhmxDO.setGHJE(0);
        hlwGhmxDO.setZLJE(0);
@ -1091,64 +1161,148 @@ public class YkyyEntranceService {
        hlwGhmxDO.setYSPB(0);
        hlwGhmxDO.setSFFS(0);
        hlwGhmxDO.setJZZT(2);
        if (StringUtils.isNoneBlank(wlyyPrescriptionVO.getAdmNo())){
            hlwGhmxDO.setJZXH(Integer.parseInt(wlyyPrescriptionVO.getAdmNo()));
        }
        hlwGhmxDO.setJZXH(0);
        hlwGhmxDO.setKSDM(wlyyPrescriptionVO.getDept());
        hlwGhmxDO.setBRID(Integer.parseInt(patientMappingDO.getMappingCode()));
        String jsonString = JSONObject.toJSONString(hlwGhmxDO);
        Map<String,Object> params = new HashedMap();
        params.put("json",jsonString);
        params.put("table","HlwGhmxDO");
        logger.info("HlwGhmxDO:"+jsonString);
        HttpResponse response = HttpUtils.doGet(saveUrl,params);
        if (response.getStatus()==200){
            String content = response.getContent();
            logger.info("content"+content);
            JSONObject jsonObject = JSONObject.parseObject(content);
            JSONObject object = jsonObject.getJSONObject("obj");
            if (object!=null){
                GHXH = object.getInteger("sbxh");
                logger.info("GHXH=========="+GHXH);
            }
            logger.info("表hlwGhmxDO同步成功!");
        hlwGhmxDO.setGHSJ(new Date());//挂号时间
        hlwGhmxDO.setGHLB(1);//挂号类别
        hlwGhmxDO.setYSDM(doctorMappingDO.getMappingCode());//医生代码
        hlwGhmxDO.setJZYS(doctorMappingDO.getMappingCode());//接诊医生
        //病人性质
        JSONArray jsonArray = findHisPatient(patientMappingDO.getIdcard());
        if(jsonArray!=null&&jsonArray.size()>0){
            //获取居民信息
            JSONObject json = jsonArray.getJSONObject(0);
            hlwGhmxDO.setBRXZ(json.getInteger("brxz"));
        }
        //就诊历史表HLWYS_MZ_JZLS
        HlwYsMzJzLsDO hlwYsMzJzLsDO = new HlwYsMzJzLsDO();
        hlwYsMzJzLsDO.setJZXH(0);
        hlwYsMzJzLsDO.setGHXH(GHXH);
        hlwYsMzJzLsDO.setBRBH(Integer.parseInt(patientMappingDO.getMappingCode()));
        hlwYsMzJzLsDO.setKSDM(Integer.parseInt(wlyyPrescriptionVO.getDept()));
        hlwYsMzJzLsDO.setYSDM(doctorMappingDO.getMappingCode());
        hlwYsMzJzLsDO.setKSSJ(DateUtil.strToDate(DateUtil.dateToStr(wlyyPrescriptionVO.getCreateTime(),"yyyy-MM-dd HH:mm:ss")));
        hlwYsMzJzLsDO.setJZZT(9);
        if (StringUtils.isNoneBlank(wlyyPrescriptionVO.getAdmNo())){
            hlwYsMzJzLsDO.setJZXH(Integer.parseInt(wlyyPrescriptionVO.getAdmNo()));
        //操作工号
        JSONArray jsonArray1 = findHisDoctor(doctorMappingDO.getIdcard());
        if(jsonArray1!=null&&jsonArray1.size()>0){
            //获取医生信息
            JSONObject json = jsonArray1.getJSONObject(0);
            hlwGhmxDO.setCZGH(json.getString("YGBH"));
        }
        String jsonString2 = JSONObject.toJSONString(hlwYsMzJzLsDO);
        Map<String,Object> params2 = new HashedMap();
        params2.put("json",jsonString2);
        params2.put("table","HlwYsMzJzLsDO");
        logger.info("HlwYsMzJzLsDO:"+jsonString2);
        HttpResponse response2 = HttpUtils.doGet(saveUrl,params2);
        if (response2.getStatus()==200){
            logger.info("content"+response2.getContent());
            logger.info("表hlwYsMzJzLsDO同步成功!");
        // 同一个医生同一个病人,一天一条挂号记录。
        JSONArray ja = fingHlwGhmx(patientMappingDO.getMappingCode(),doctorMappingDO.getMappingCode());
        if(ja!=null&&ja.size()>0){
            //更新
            JSONObject json = ja.getJSONObject(0);
            hlwGhmxDO.setSBXH(json.getInteger("SBXH"));
            hlwGhmxDO.setGHSJ(DateUtil.strToDate(json.getString("GHSJ")));
            GHXH = json.getInteger("SBXH");
            String jsonString = JSONObject.toJSONString(hlwGhmxDO);
            Map<String,Object> params = new HashedMap();
            params.put("json",jsonString);
            params.put("table","HlwGhmxDO");
            logger.info("HlwGhmxDO:"+jsonString);
            HttpResponse response = HttpUtils.doGet(updateEntityUrl,params);
            if (response.getStatus()==200){
                logger.info("content"+response.getContent());
                logger.info("表hlwGhmxDo更新成功!");
            }else {
                logger.info("表hlwGhmxDo更新失败!"+response.getErrorMsg());
            }
        }else{
            //新增
            String jsonString = JSONObject.toJSONString(hlwGhmxDO);
            Map<String,Object> params = new HashedMap();
            params.put("json",jsonString);
            params.put("table","HlwGhmxDO");
            logger.info("HlwGhmxDO:"+jsonString);
            HttpResponse response = HttpUtils.doGet(saveUrl,params);
            if (response.getStatus()==200){
                String content = response.getContent();
                logger.info("content"+content);
                JSONObject jsonObject = JSONObject.parseObject(content);
                JSONObject object = jsonObject.getJSONObject("obj");
                if (object!=null){
                    GHXH = object.getInteger("sbxh");
                    logger.info("GHXH=========="+GHXH);
                }
                logger.info("表hlwGhmxDo新增成功!");
            }
        }
        List<WlyyPrescriptionDiagnosisDO> diagnosisDOs = prescriptionDiagnosisDao.findByPrescriptionId(wlyyPrescriptionVO.getId());
        for (WlyyPrescriptionDiagnosisDO diagnosisDO : diagnosisDOs){
        Integer icd10Flag = 0;
        List<WlyyPrescriptionDiagnosisDO> diagnosisDOs = prescriptionDiagnosisDao.findByPrescriptionId(code);
        if(diagnosisDOs!=null&&diagnosisDOs.size()>0){
            WlyyPrescriptionDiagnosisDO diagnosisDO = diagnosisDOs.get(0);
            //就诊历史表HLWYS_MZ_JZLS
            HlwYsMzJzLsDO hlwYsMzJzLsDO = new HlwYsMzJzLsDO();
            hlwYsMzJzLsDO.setJZXH(0);
            hlwYsMzJzLsDO.setGHXH(GHXH);
            hlwYsMzJzLsDO.setBRBH(Integer.parseInt(patientMappingDO.getMappingCode()));
            hlwYsMzJzLsDO.setKSDM(Integer.parseInt(wlyyPrescriptionVO.getDept()));
            hlwYsMzJzLsDO.setYSDM(doctorMappingDO.getMappingCode());
            hlwYsMzJzLsDO.setKSSJ(DateUtil.strToDate(DateUtil.dateToStr(wlyyPrescriptionVO.getCreateTime(),"yyyy-MM-dd HH:mm:ss")));
            hlwYsMzJzLsDO.setJSSJ(DateUtil.getNight23());
            hlwYsMzJzLsDO.setJZZT(9);
            hlwYsMzJzLsDO.setJZLX(3);//就诊类型
            hlwYsMzJzLsDO.setZDMC(diagnosisDO.getName());
            hlwYsMzJzLsDO.setMQZD(diagnosisDO.getName());
            if (StringUtils.isNoneBlank(wlyyPrescriptionVO.getAdmNo())){
                hlwYsMzJzLsDO.setJZXH(Integer.parseInt(wlyyPrescriptionVO.getAdmNo()));
            }
            //V_HLW_ICD10.FLAG
            JSONArray jsonArray2 = findHisIcd10(diagnosisDO.getCode());
            if(jsonArray2!=null&&jsonArray2.size()>0){
                //获取居民信息
                JSONObject json = jsonArray2.getJSONObject(0);
                icd10Flag = json.getInteger("FLAG");
            }
            hlwYsMzJzLsDO.setZYZD(icd10Flag);
            String jsonString2 = JSONObject.toJSONString(hlwYsMzJzLsDO);
            Map<String,Object> params2 = new HashedMap();
            params2.put("json",jsonString2);
            params2.put("table","HlwYsMzJzLsDO");
            logger.info("HlwYsMzJzLsDO:"+jsonString2);
            HttpResponse response2 = HttpUtils.doGet(saveUrl,params2);
            if (response2.getStatus()==200){
                String content = response2.getContent();
                logger.info("content"+content);
                //获取就诊序号,更新处方表数据
                JSONObject jsonObject = JSONObject.parseObject(content);
                JSONObject object = jsonObject.getJSONObject("obj");
                if (object!=null){
                    Integer jzxh = object.getInteger("jzxh");
                    wlyyPrescriptionVO.setAdmNo(jzxh+"");
                    logger.info("JZXH=========="+jzxh);
                    List<WlyyPrescriptionDO> wlyyPrescriptionDOS = prescriptionDao.findById(code);
                    if (wlyyPrescriptionDOS!=null&&wlyyPrescriptionDOS.size()!=0){
                        WlyyPrescriptionDO wlyyPrescriptionDO = wlyyPrescriptionDOS.get(0);
                        wlyyPrescriptionDO.setAdmNo(jzxh+"");
                        prescriptionDao.save(wlyyPrescriptionDO);
                    }
                }
                logger.info("表hlwYsMzJzLsDO同步成功!");
            }
            //疾病诊断表HLWYS_MZ_JBZD
            HlwYsMzJbzdDO hlwYsMzJbzdDO = new HlwYsMzJbzdDO();
            //hlwYsMzJbzdDO.setJLBH(0);
            hlwYsMzJbzdDO.setJZXH(0);
            if (StringUtils.isNoneBlank(wlyyPrescriptionVO.getAdmNo())){
                hlwYsMzJbzdDO.setJZXH(Integer.parseInt(wlyyPrescriptionVO.getAdmNo()));
            }
            hlwYsMzJbzdDO.setYSDM(doctorMappingDO.getMappingCode());
            hlwYsMzJbzdDO.setICD(diagnosisDO.getCode());
            hlwYsMzJbzdDO.setMSZD(diagnosisDO.getName());
            hlwYsMzJbzdDO.setJBBH(icd10Flag);
            hlwYsMzJbzdDO.setBRBH(Integer.valueOf(patientMappingDO.getMappingCode()));
            hlwYsMzJbzdDO.setZDLB(11);//诊断类别
            hlwYsMzJbzdDO.setZDSJ(DateUtil.strToDate(DateUtil.dateToStr(wlyyPrescriptionVO.getCreateTime(),"yyyy-MM-dd HH:mm:ss")));//诊断时间
            hlwYsMzJbzdDO.setZFPB(0);//作废标志
            hlwYsMzJbzdDO.setQZBZ(0);//确诊标志
            hlwYsMzJbzdDO.setQZSJ(DateUtil.strToDate(DateUtil.dateToStr(wlyyPrescriptionVO.getCreateTime(),"yyyy-MM-dd HH:mm:ss")));//确诊时间
            hlwYsMzJbzdDO.setJBMC(diagnosisDO.getName());//诊断名称
            hlwYsMzJbzdDO.setZDLX(1);//诊断类型
            hlwYsMzJbzdDO.setTJBZ(1);//提交标志
            if (StringUtils.isNoneBlank(wlyyPrescriptionVO.getAdmNo())){
                hlwYsMzJbzdDO.setJZXH(Integer.parseInt(wlyyPrescriptionVO.getAdmNo()));
            }
            String jsonString1 = JSONObject.toJSONString(hlwYsMzJbzdDO);
            Map<String,Object> params1 = new HashedMap();
            params1.put("json",jsonString1);
@ -1156,11 +1310,12 @@ public class YkyyEntranceService {
            logger.info("HlwYsMzJbzdDO:"+jsonString1);
            HttpResponse response1 = HttpUtils.doGet(saveUrl,params1);
            if (response1.getStatus()==200){
                logger.info("content"+response1.getContent());
                String content = response1.getContent();
                logger.info("content"+content);
                logger.info("表hlwYsMzJbzdDO同步成功!");
            }
        }
    }
    public WlyyPrescriptionVO synPrecriptionHis(WlyyPrescriptionVO wlyyPrescriptionVO,String code) throws Exception {

+ 72 - 7
business/base-service/src/main/java/com/yihu/jw/internet/service/InternetCommonService.java

@ -139,6 +139,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
        getBaseSurperviseDict();
        WsapiProxy proxy = new WsapiProxy();
        proxy.setEndpoint(url);
        logger.info("入参:"+JSONUtils.toString(params));
        Wsapi wsapi = proxy.getWsapi();
//        logger.info("postToInter:"+JSONUtils.toString(new String[] {token, params.toString()}));
@ -188,11 +189,12 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
    // 2  医院基本信息	micc.upNsOrganBas     --- 完成
    public String upNsOrganBas() throws Exception {
        logger.info("开始进入==============");
        getBaseSurperviseDict();
        BaseSuperviseDataDict superviseDataDict = superviseDataDictDao.selectByDictName();
        String url = getUrl();
        String api = "micc.upNsOrganBase";
        logger.info("开始进入++++++++"+superviseDataDict.getDictName());
        JSONObject jb = new JSONObject();
        jb.put("organ_code", orgCode);
        jb.put("organ_name",orgName);
@ -289,8 +291,6 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
        JSONArray jsonArray = new JSONArray();
        jsonArray.add(jb);
        logger.info("入参:"+jsonArray.toJSONString()+"入参:"+jb.toJSONString());
        String token = upNsUserToken(url);
        String res = postToInter(token, api, jsonArray,url);
@ -795,10 +795,10 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
                    "\tM.content AS \"content\",\n" +
                    "\tM.content_type AS \"content_type\",\n" +
                    "\tT.id AS \"id\",\n" +
                    "\tM.sender_id AS \"session_id\"\n" +
                    "\tM.session_id AS \"session_id\"\n" +
                    "FROM\n" +
                    "\t"+base+".topics T\n" +
                    "JOIN "+base+".muc_messages M ON M.sender_id = T.session_id\n" +
                    "JOIN "+base+".muc_messages M ON M.session_id = T.session_id\n" +
                    "AND M.timestamp >= T.create_time\n" +
                    "AND M.timestamp <= T.end_time\n" +
                    "AND T.id='"+info.get("consult").toString()+"' "+
@ -828,9 +828,21 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
                        object.put("receiver",patientDO.getName());
                    }
                }
                String msg = "";
                String msgType = "";
                if (map.get("content_type").toString().equalsIgnoreCase("2")){
                    msg = consultUpNsOnlineImg(map.get("content").toString(),map.get("id").toString());
                    msgType = "1";
                }else if (map.get("content_type").toString().equalsIgnoreCase("1")){
                    msg = map.get("content").toString();
                    msgType = "0";
                }else {
                    msg = map.get("content").toString();
                    msgType = map.get("content_type").toString();
                }
                object.put("sender",map.get("sender_name"));
                object.put("msg",map.get("content"));
                object.put("msg_type",map.get("content_type"));
                object.put("msg",msg);
                object.put("msg_type",msgType);
                object.put("send_time",DateUtil.dateToStr(DateUtil.strToDate(map.get("timestamp").toString(),"yyyy-MM-dd HH:mm:ss"),"yyyy-MM-dd HH:mm:ss"));
                array.add(object);
            }
@ -1825,4 +1837,57 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
    public String testImg(String path){
        return ImgUtils.getImageStr(path);
    }
    public String consultUpNsOnlineImg(String imgPath,String consult) throws Exception {
        String msgCode = "";
        getBaseSurperviseDict();
        String url = getUrl();
        String api = "micc.upNsOnlineImg";
        String upid = getCode();
        String token = upNsUserToken(url);
        String res = "";
        int total = 0;
        int success = 0;
        int error = 0;
        int dataError = 0;
        JSONObject jb = new JSONObject();
        Boolean errorFlag = false;
        String code  = getCode();
        try {
            jb.put("id_online_img",code);
            jb.put("id_onlne_base", orgCode+"_"+consult);
            jb.put("online_type","1");
            String base64 =getImg(imgPath);
            jb.put("img_path",base64);
            jb.put("img_sort", 1);
            jb.put("upload_time", DateUtil.dateToStr(new Date(),"yyyy-MM-dd hh:mm:ss"));
        }catch (Exception e){
            errorFlag = true;
            saveErrorLog(upid,"12",consult,res,1);
            dataError++;
            logger.error(e.toString());
        }
        if(!errorFlag){
            JSONArray jsonArray = new JSONArray();
            jsonArray.add(jb);
            res = postToInter(token,api, jsonArray,url);
            JSONObject resJson = (JSONObject) JSONObject.parse(res);
            if("200".equals(resJson.get("msg").toString())){
                msgCode = code;
                success++;
            }else{
                saveErrorLog(upid,"12",imgPath,res,2);
                error++;
            }
        }
        String resInfo = "此次共上传:" + total + "条数据,其中成功 :" + success + "条,上传失败 : " + error + "条。格式错误:"+dataError+"条。";
        saveUpLog(upid,"12",new Date(),new Date(),success,error,dataError,resInfo);
        return msgCode;
    }
}

+ 4 - 4
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -192,11 +192,11 @@ public class BusinessOrderService {
        businessOrderDO.setUploadStatus(0);
        businessOrderDO.setPayType(1);
        if (businessOrderDO.getOrderCategory().equalsIgnoreCase("1")){
            businessOrderDO.setAppCallbackUrl("https://intel.yanketong.com/ims-app-web/#/onlineChat/zjzx");
            businessOrderDO.setPcCallbackUrl("https://intel.yanketong.com/ims-web/#/doctor/consult");
            businessOrderDO.setAppCallbackUrl("https://intel.yanketong.com/ims-app-web/#/yk/consult/record?consultCode="+businessOrderDO.getRelationCode()+"&verifyCode=");
            businessOrderDO.setPcCallbackUrl("https://intel.yanketong.com/ims-web/#/yk/consult/record?consultCode="+businessOrderDO.getRelationCode()+"&verifyCode=");
        }else {
            businessOrderDO.setAppCallbackUrl("https://intel.yanketong.com/ims-app-web/#/onlineChat/twzs");
            businessOrderDO.setPcCallbackUrl("https://intel.yanketong.com/ims-web/#/doctor/review");
            businessOrderDO.setAppCallbackUrl("https://intel.yanketong.com/ims-app-web/#/yk/consult/record?outpatientId="+businessOrderDO.getRelationCode()+"&verifyCode=");
            businessOrderDO.setPcCallbackUrl("https://intel.yanketong.com/ims-web/#/yk/consult/record?outpatientId="+businessOrderDO.getRelationCode()+"&verifyCode=");
        }
        List<WlyyHospitalSysDictDO> hospitalSysDictDOS = hospitalSysDictDao.findByDictName("WX_MONEY");
        String totalFee = null;

+ 2 - 2
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -1862,7 +1862,7 @@ public class ImService {
		List<Map<String, Object>> rstotal = hibenateUtils.createSQLQuery(sql);
		Long count = 0L;
		if (rstotal != null && rstotal.size() > 0) {
			count = (Long) rstotal.get(0).get("total");
			count = Long.parseLong(rstotal.get(0).get("total").toString());
		}
		
		return count;
@ -2226,7 +2226,7 @@ public class ImService {
		List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(sql);
		Long count = 0L;
		if (rstotal != null && rstotal.size() > 0) {
			count = (Long) rstotal.get(0).get("total");
			count = Long.parseLong(rstotal.get(0).get("total").toString());
		}
		
		return count;

+ 1 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/HlwGhmxDO.java

@ -91,6 +91,7 @@ public class HlwGhmxDO {
        this.bRXZ = bRXZ;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name = "GHSJ")
    public Date getGHSJ() {
        return gHSJ;

+ 15 - 0
common/common-util/src/main/java/com/yihu/jw/util/date/DateUtil.java

@ -46,6 +46,21 @@ public class DateUtil {
        return formatter.format(date);
    }
    public static Date getNight23(){
        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.HOUR_OF_DAY,22);
        return cal.getTime();
    }
    public static Date getToday(){
        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.HOUR_OF_DAY,0);
        cal.set(Calendar.MINUTE,0);
        cal.set(Calendar.SECOND,0);
        return cal.getTime();
    }
    /**
     * 字符串转时间格式
     */

+ 6 - 2
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/YkyyController.java

@ -90,6 +90,10 @@ public class YkyyController extends EnvelopRestEndpoint {
            HlwCf02DO hlwCf02VO =  JSONObject.toJavaObject(object,HlwCf02DO.class);
            ykyyEntranceService.update(hlwCf02VO);
            envelop.setObj(hlwCf02VO);
        }else if(table.equalsIgnoreCase("HlwGhmxDO")){
            HlwGhmxDO hlwGhmxDO =  JSONObject.toJavaObject(object,HlwGhmxDO.class);
            ykyyEntranceService.update(hlwGhmxDO);
            envelop.setObj(hlwGhmxDO);
        }
        return success(envelop);
    }
@ -154,7 +158,7 @@ public class YkyyController extends EnvelopRestEndpoint {
        }else if(table.equalsIgnoreCase("HlwYsMzJbzdDO")){
            // portal_his.gy_identity_ms@xec_link
            HlwYsMzJbzdDO hlwYsMzJbzdDO =  JSONObject.toJavaObject(object,HlwYsMzJbzdDO.class);
            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'YS_MZ_JBZD'";
            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ys@xec_link where bmc = 'YS_MZ_JBZD'";
            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql);
            Long jlbh = 0L;
            if (sbxhList!=null&&sbxhList.size()!=0){
@ -182,7 +186,7 @@ public class YkyyController extends EnvelopRestEndpoint {
        }else if(table.equalsIgnoreCase("HlwYsMzJzLsDO")){
            // portal_his.gy_identity_ms@xec_link
            HlwYsMzJzLsDO hlwYsMzJzLsDO =  JSONObject.toJavaObject(object,HlwYsMzJzLsDO.class);
            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ms@xec_link where bmc = 'YS_MZ_JZLS'";
            String sbxhSql =" select dqz + 1 as \"total\"  from portal_his.gy_identity_ys@xec_link where bmc = 'YS_MZ_JZLS'";
            List<Map<String,Object>> sbxhList = hibenateUtils.createSQLQuery(sbxhSql);
            Long jzxh = 0L;
            if (sbxhList!=null&&sbxhList.size()!=0){

+ 1 - 1
svr/svr-internet-hospital-job/src/main/resources/application.yml

@ -265,7 +265,7 @@ spring:
    password: jkzl@2020
hlwyyEntrance:
  url: http://172.16.100.63:10023
  url: http://192.168.103.150:10023
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: false

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -388,7 +388,7 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
		if (data != null) {
			for(Map<String,Object> consult :data){
				//如果是协同门诊,多返回全科医生的详细信息
				if(13 == Integer.parseInt((String)consult.get("type")) && StringUtils.isNoneBlank((String)consult.get("generalDoctor"))){
				if(13 == Integer.parseInt(consult.get("type").toString()) && StringUtils.isNoneBlank((String)consult.get("generalDoctor"))){
					BaseDoctorDO baseDoctorDO = baseDoctorDao.findById((String)consult.get("generalDoctor"));
					consult.put("generalDoctorName", baseDoctorDO.getName());
				}

File diff suppressed because it is too large
+ 31 - 31
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/expressage/DoctorExpressageEndpoint.java