浏览代码

演示环境 数据改造

mengkang 4 年之前
父节点
当前提交
1af04cd794

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

@ -3700,7 +3700,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            for (BasePatientWechatDo one : ps) {
                logger.info("发送的消息="+ com.alibaba.fastjson.JSONObject.toJSONString(newConfig));
                weixinMessagePushUtils.putWxMsg(wxAccessTokenDO.getAccessToken(), one.getOpenid(), newConfig);
                try {
                    weixinMessagePushUtils.putWxMsg(wxAccessTokenDO.getAccessToken(), one.getOpenid(), newConfig);
                    logger.info("发送成功");
                } catch (Exception e) {
                    e.printStackTrace();
                    logger.info("发送失败,error="+e.getMessage());
                }
                //保存发送模板记录,
                WxPushLogDO wxPushLogDO = new WxPushLogDO();
                wxPushLogDO.setCreateTime(new Date());
@ -7510,12 +7517,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        } else {
            deptDescDOList = dictDeptDescDao.findByOrgCode(orgCode, keyName);
        }
        deptDescDOList.forEach(one -> {
            one.setDeptDescription(null);
        List<DictDeptDescDO> res = new ArrayList<>();
        deptDescDOList.forEach(one->{
            DictDeptDescDO descDO = new DictDeptDescDO();
            BeanUtils.copyProperties(one,descDO);
            descDO.setDeptDescription(null);
            res.add(descDO);
        });
        if (deptDescDOList == null || deptDescDOList.size() == 0) {
            return MixEnvelop.getError("无科室信息");
        }
        return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find, deptDescDOList);
        return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_find, res);
    }
}

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

@ -130,7 +130,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        }
        //BS16017(String REGISTER_SN,String realOrder,String PAT_NO,String ADM_NO,boolean demoFlag) throws Exception {
        logger.info("findOriginPrescriptionList: registerSn:"+registerSn+" patient"+patient+" patNo:"+patNo+" realOrder:"+realOrder+" admNo:"+admNo);
        return ykyyEntranceService.findV_MSDD01And02(admNo);
        return ykyyEntranceService.findV_MSDD01And02(admNo,demoFlag);
    }
    /**

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

@ -650,7 +650,7 @@ public class YkyyEntranceService {
     * HIS处方记录
     * @throws Exception
     */
    public List<WlyyPrescriptionVO> findV_MSDD01And02(String admNo) throws Exception{
    public List<WlyyPrescriptionVO> findV_MSDD01And02(String admNo,boolean demoFlag) throws Exception{
        List<WlyyPrescriptionVO> wlyyPrescriptionVOList = new ArrayList<>();
        //处方数据
@ -672,12 +672,38 @@ public class YkyyEntranceService {
                "\tV_MS_DD01 d\n" +
                "WHERE\n" +
                "\td.JZXH = '"+admNo+"'";
        Map<String,Object> params = new HashedMap();
        params.put("sql",msd01);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        JSONObject rs = new JSONObject();
        String content="";
        if (demoFlag){
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("cfsb","X155245");
            jsonObject.put("cfhm","2524863258522");
            jsonObject.put("fkzt","0");
            jsonObject.put("cflx","其他");
            jsonObject.put("kfrq","2020-06-23 15:25:58");
            jsonObject.put("scddh","SH2856545254");
            jsonObject.put("brid","25318532");
            jsonObject.put("brxm","杨楠");
            jsonObject.put("ksdm","350524A0221");
            jsonObject.put("ysdm","152586232");
            jsonObject.put("jzxh","MZ258515");
            jsonObject.put("guid","255df252s222");
            jsonObject.put("jzkh","JZ255317855");
            JSONArray array = new JSONArray();
            array.add(jsonObject);
            rs.put("detailModelList",array);
            rs.put("status","200");
            content=rs.toJSONString();
        }else {
            Map<String,Object> params = new HashedMap();
            params.put("sql",msd01);
            HttpResponse response = HttpUtils.doGet(url,params);
             content = response.getContent();
            logger.info("response:"+content);
            rs = JSON.parseObject(content);
        }
        Integer status = rs.getInteger("status");
        if(status!=null&&status == 200){
            JSONArray array =rs.getJSONArray("detailModelList");
@ -723,12 +749,37 @@ public class YkyyEntranceService {
                        "WHERE\n" +
                        "\td.cfsb = '"+wlyyPrescriptionVO.getRealOrder()+"'";
                Map<String,Object> params1 = new HashedMap();
                params1.put("sql",msd02);
                HttpResponse response1 = HttpUtils.doGet(url,params1);
                String content1 = response1.getContent();
                logger.info("response:"+content);
                JSONObject rs1 = JSON.parseObject(content1);
                JSONObject rs1 =new JSONObject();
                if (demoFlag){
                    JSONArray array1 = new JSONArray();
                    JSONObject jsonObject = new JSONObject();
                    jsonObject.put("cfsb","X1552155");
                    jsonObject.put("ypxh","CF2552142");
                    jsonObject.put("ypcd","YP2552212");
                    jsonObject.put("ypsl","5");
                    jsonObject.put("ypdj","10");
                    jsonObject.put("hjje","9.99");
                    jsonObject.put("yfdw","盒");
                    jsonObject.put("mrcs","2");
                    jsonObject.put("yfbz","消化科");
                    jsonObject.put("ypyf","X1552155");//给药途径
                    jsonObject.put("ycjl","X1552155");
                    jsonObject.put("yyts","X1552155");
                    jsonObject.put("sbxh","X1552155");
                    jsonObject.put("yfgg","X1552155");
                    array1.add(jsonObject);
                    rs1.put("status","200");
                    rs1.put("detailModelList",array);
                }else {
                    Map<String,Object> params1 = new HashedMap();
                    params1.put("sql",msd02);
                    HttpResponse response1 = HttpUtils.doGet(url,params1);
                    String content1 = response1.getContent();
                    logger.info("response:"+content);
                    rs1 = JSON.parseObject(content1);
                }
                Integer status1 = rs1.getInteger("status");
                List<WlyyPrescriptionInfoVO> wlyyPrescriptionInfoVOS = new ArrayList<>();
                if(status1!=null&&status1 == 200){
@ -738,12 +789,25 @@ public class YkyyEntranceService {
                        JSONObject object1 = array1.getJSONObject(i);
                        WlyyPrescriptionInfoVO prescriptionInfoVO = new WlyyPrescriptionInfoVO();
                        String sql = "SELECT ypxh as \"ypxh\",ypmc2 as \"ypmc2\" from V_ZKSG_MZ_YPXX WHERE ypxh='"+object1.getString("ypxh")+"' ";
                        Map<String,Object> params4 = new HashedMap();
                        params4.put("sql",sql);
                        HttpResponse response4 = HttpUtils.doGet(url,params4);
                        String content4 = response4.getContent();
                        logger.info("response:"+content4);
                        JSONObject rs4 = JSON.parseObject(content4);
                        JSONObject rs4 = new JSONObject();
                        if (demoFlag){
                            JSONObject jsonObject = new JSONObject();
                            jsonObject.put("ypxh","X456225");
                            jsonObject.put("ypmc2","板蓝根");
                            JSONArray array2 = new JSONArray();
                            rs4.put("detailModelList",array2);
                            rs4.put("status",200);
                        }else {
                            Map<String,Object> params4 = new HashedMap();
                            params4.put("sql",sql);
                            HttpResponse response4 = HttpUtils.doGet(url,params4);
                            String content4 = response4.getContent();
                            logger.info("response:"+content4);
                            rs4 = JSON.parseObject(content4);
                        }
                        Integer status4 = rs4.getInteger("status");
                        if(status4!=null&&status4 == 200){
                            JSONArray array4 =  rs4.getJSONArray("detailModelList");
@ -772,12 +836,24 @@ public class YkyyEntranceService {
                wlyyPrescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
                List<WlyyPrescriptionDiagnosisVO> diagnosisVOS = new ArrayList<>();
                String mz = "SELECT ICD AS \"icd\",MSZD AS \"mszd\",JZXH AS \"jzxh\" FROM v_hlwys_mz_jbzd WHERE jzxh = '"+admNo+"'";
                Map<String,Object> params2 = new HashedMap();
                params2.put("sql",mz);
                HttpResponse response2 = HttpUtils.doGet(url,params2);
                String content2 = response2.getContent();
                logger.info("response:"+content2);
                JSONObject rs2 = JSON.parseObject(content2);
                JSONObject rs2 =new JSONObject();
                if (demoFlag){
                    JSONObject jsonObject = new JSONObject();
                    jsonObject.put("icd","250465322053223");
                    jsonObject.put("mszd","感冒");
                    jsonObject.put("jzxh","JZ25521875232");
                    JSONArray array1 = new JSONArray();
                    array1.add(jsonObject);
                    rs2.put("status",200);
                    rs2.put("detailModelList",array1);
                }else {
                    Map<String,Object> params2 = new HashedMap();
                    params2.put("sql",mz);
                    HttpResponse response2 = HttpUtils.doGet(url,params2);
                    String content2 = response2.getContent();
                    logger.info("response:"+content2);
                    rs2 = JSON.parseObject(content2);
                }
                Integer status2 = rs2.getInteger("status");
                if(status2!=null&&status2 == 200){
                    JSONArray array2 = rs2.getJSONArray("detailModelList");

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

@ -2705,7 +2705,11 @@ public class ImService {
				//视频复诊
				sql =sql +"AND op.outpatient_type=2";
				if("xm_ykyy_wx".equals(wxId)){
					sql +=" and op.register_date >= to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')";
					if (flag){
						sql +=" and op.register_date >= str_to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')";
					}else  {
						sql +=" and op.register_date >= to_date('"+DateUtil.dateToStrShort(new Date())+" 00:00:00','YYYY-MM-DD HH24:MI:SS')";
					}
				}else {
					sql +=" AND  op.register_date >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' ";
				}