ソースを参照

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

wangzhinan 4 年 前
コミット
cb7c58ea6c

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

@ -249,6 +249,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private boolean demoFlag;
    @Value("${wechat.id}")
    private String wechatId;
    @Value("${wechat.flag}")
    private boolean flag;
    /**
     * 获取居民就诊记录接口
@ -383,6 +385,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }
        String condition = "";
        if ("xm_ykyy_wx".equals(wechatId)) {
            if (flag){
                condition = "date_format(o.register_date ,'%Y-%m-%d %H:%i:%S' ) AS registerDate,";
            }else {
                condition = "to_char(o.register_date ,'yyyy-MM-dd hh24:mi:ss' ) AS \"registerDate\",";
            }
            condition = "to_char(o.register_date ,'yyyy-MM-dd hh24:mi:ss' ) AS \"registerDate\",";
        } else {
            condition = "date_format(o.register_date ,'%Y-%m-%d %H:%i:%S' ) AS registerDate,";
@ -415,7 +422,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " o.description AS \"description\", " +
                " o.disease_img AS \"diseaseImg\", ";
        if ("xm_ykyy_wx".equals(wechatId)) {
            sql = sql + "to_char(o.create_time ,'yyyy-MM-dd hh24:mi:ss' ) AS \"createTime\",";
            if (flag){
                sql = sql + "date_format(o.create_time ,'%Y-%m-%d %H:%i:%S' ) AS createTime,";
            }else {
                sql = sql + "to_char(o.create_time ,'yyyy-MM-dd hh24:mi:ss' ) AS \"createTime\",";
            }
        } else {
            sql = sql + "date_format(o.create_time ,'%Y-%m-%d %H:%i:%S' ) AS createTime,";
        }

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

@ -400,18 +400,35 @@ public class YkyyEntranceService {
        JSONArray jsonArray = new JSONArray();
        if (demoFlag){
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("BRID","402803ff6b4ae7ae016b4b06a498025s6");
            jsonObject.put("BRXM","张灵玉");
            jsonObject.put("SJHM","8622");
            jsonObject.put("SFZH","350529188526051213");
            jsonObject.put("BRXZ","普通性质");
            jsonObject.put("YSDM","A250545");
            jsonObject.put("KDYS","张楚岚");
            jsonObject.put("KSDM","062525");
            jsonObject.put("KSMC","消化科");
            jsonObject.put("ZDMC","消化不良");
            jsonObject.put("JZXH","XM1231258225225442GK");
            jsonObject.put("BRID","1168517");
            jsonObject.put("BRXM","于小童");
            jsonObject.put("SJHM","");
            jsonObject.put("SFZH","");
            jsonObject.put("BRXZ","自费");
            jsonObject.put("YSDM","1630");
            jsonObject.put("KDYS","罗向东");
            jsonObject.put("KSDM","1101");
            jsonObject.put("KSMC","眼底病专科(五缘院区)");
            jsonObject.put("KSSJ","2020/04/28 15:55:29");
            jsonObject.put("ZDMC","高度近视");
            jsonObject.put("JZXH","2395501");
            JSONObject jsonObject2 = new JSONObject();
            jsonObject.put("BRID","1168517");
            jsonObject.put("BRXM","于小童");
            jsonObject.put("SJHM","");
            jsonObject.put("SFZH","");
            jsonObject.put("BRXZ","自费");
            jsonObject.put("YSDM","1630");
            jsonObject.put("KDYS","张纯");
            jsonObject.put("KSDM","1101");
            jsonObject.put("KSMC","高度近视专科(五缘院区)");
            jsonObject.put("KSSJ","2020/05/19 15:51:23");
            jsonObject.put("ZDMC","高度近视");
            jsonObject.put("JZXH","2395506");
            jsonArray.add(jsonObject);
            jsonArray.add(jsonObject2);
        }else {
            jsonArray = findV_ZKSG_HZCX_HIS(patientMappingDO.getMappingCode(),conNo,startTime,endTime);
        }
@ -462,7 +479,7 @@ public class YkyyEntranceService {
                wlyyOutpatientVO.setConDate(DateUtil.strToDate(conDate, DateUtil.YYYY_MM_DD_HH_MM_SS_));
                wlyyOutpatientVOS.add(wlyyOutpatientVO);
                List<WlyyInspectionVO> inspectionVOList = new ArrayList<>();
                JSONArray array = findV_ZKSG_JCCX(PAT_NO,wlyyOutpatientVO.getAdmNo());
                JSONArray array = findV_ZKSG_JCCX(PAT_NO,wlyyOutpatientVO.getAdmNo(),demoFlag);
                for (int j=0;j<array.size();j++){
                    JSONObject object = array.getJSONObject(j);
                    String ksdm = object.getString("ksdm");//科室代码
@ -568,7 +585,7 @@ public class YkyyEntranceService {
     * HIS就诊患者历史查询
     * @throws Exception
     */
    public JSONArray findV_ZKSG_JCCX(String brid,String conNo) throws Exception{
    public JSONArray findV_ZKSG_JCCX(String brid,String conNo,boolean demoFlag) throws Exception{
        String sql = "SELECT\n" +
                "\tz.BRID AS \"brid\",\n" +
                "\tz.BRXM AS \"brxm\",\n" +
@ -595,17 +612,36 @@ public class YkyyEntranceService {
                "WHERE\n" +
                "\tz.JZXH = '"+conNo+"'\n" +
                "AND z.brid = '"+brid+"'";
        Map<String,Object> params = new HashedMap();
        params.put("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!=null&&status == 200){
            return rs.getJSONArray("detailModelList");
        JSONArray jsonArray = new JSONArray();
        if (demoFlag){
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("brid","769da42e4dda41b29e73ddf2450b42c2");
            jsonObject.put("brxm","李艳秋");
            jsonObject.put("kdrq","2020-06-15");
            jsonObject.put("zxrq","2020-06-25");
            jsonObject.put("ysdm","A0502541");
            jsonObject.put("fymc","珍视明眼药水");
            jsonObject.put("fydj","9.99");
            jsonObject.put("fysl","2");
            jsonObject.put("fyhj","19.98");
            jsonObject.put("yblb","甲类");
            jsonObject.put("jzhx","X44515865");
            jsonObject.put("yjxh","F0551285");
            jsonObject.put("zxks","高度近视专科(五缘院区)");
            jsonArray.add(jsonObject);
        }else {
            Map<String,Object> params = new HashedMap();
            params.put("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!=null&&status == 200){
                return rs.getJSONArray("detailModelList");
            }
        }
        return new JSONArray();
        return jsonArray;
    }
@ -1399,17 +1435,17 @@ public class YkyyEntranceService {
        logger.info("idcard:"+sql);
        if (demoFlag){
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("BRID","f6ab67115413e4bba1523d6d4c35766a");
            jsonObject.put("MZHM","0502452155");
            jsonObject.put("BRXM","诸葛青也");
            jsonObject.put("SFZH","450521199405092535");
            jsonObject.put("BRXZ","一般");
            jsonObject.put("BRXB","男");
            jsonObject.put("CSNY","1994-05-09");
            jsonObject.put("JZKH","DXM25631856");
            jsonObject.put("JDSJ","2020-06-28 15:15:35");
            jsonObject.put("GZZTMC","一般");
            jsonObject.put("LXDZ","厦门市五缘湾");
            jsonObject.put("brid","1168517");
            jsonObject.put("mzhm","0502452155");
            jsonObject.put("brxm","于小童");
            jsonObject.put("sfzh","450521199405092535");
            jsonObject.put("brxz","自费");
            jsonObject.put("brxb","男");
            jsonObject.put("csny","1994-05-09");
            jsonObject.put("jzkh","2396501");
            jsonObject.put("jdsj","2020-06-28 15:15:35");
            jsonObject.put("gzztmc","一般");
            jsonObject.put("lxdz","厦门市五缘湾");
            array.add(jsonObject);
        }else  {
            HttpResponse response = HttpUtils.doGet(url,params);