浏览代码

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

wangzhinan 4 年之前
父节点
当前提交
1cd7dd2c3c

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

@ -3408,12 +3408,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                if ("1".equalsIgnoreCase(wlyyOutpatientDO.getType())) {
                    data.put("type", "9");
                    msg += wlyyOutpatientDO.getPatientName() + ",您好! 您有一个图文复诊已被医生取消,取消原因:" + cancelValue + "。取消说明:" + cancelRemark + "。";
                    sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "9", "doctorRefuse", "");
                    sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "9", "doctorRefuseRemind", "");
                }
                if ("2".equalsIgnoreCase(wlyyOutpatientDO.getType())) {
                    data.put("type", "16");
                    msg += wlyyOutpatientDO.getPatientName() + ",您好! 您有一个视频复诊已被医生取消,取消原因:" + cancelValue + "。取消说明:" + cancelRemark + "。";
                    sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "16", "doctorRefuse", "");
                    sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "16", "doctorRefuseRemind", "");
                }
                data.put("msg", msg);
                messageDO.setData(data.toString());
@ -3500,74 +3500,96 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                contentMsg = "您的视频复诊订单已被医生取消,您可重新发起。由于订单取消将不做扣费处理";
                first = outpatientDO.getPatientName() + ",您好!您的视频复诊已取消";
            }
            msgUrl="/ims-wx/#/returnVisit/record?outpatientId="+outpatientId;
            logger.info("doctorRefuseRemind医生拒诊入参:outpatientId="+outpatientId);
            msgUrl="/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientId;
        } else if ("payRemind".equalsIgnoreCase(titelType)) {
            if ("9".equals(type)) {
                contentMsg = "您有一个图文复诊订单待支付,点击完成支付,如您已支付请忽略本条信息";
                first = outpatientDO.getPatientName() + ",您好!您有一个图文复诊订单待支付,请及时支付。";
                msgUrl="/ims-wx/#/returnVisit/record?outpatientId="+outpatientId;
                msgUrl="/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientId;
                logger.info("图文复诊订单待支付微信消息模板推送开始");
            } else if ("16".equals(type)) {
                contentMsg = "您有一个视频复诊订单待支付,点击完成支付,如您已支付请忽略本条信息";
                first = outpatientDO.getPatientName() + ",您好!您有一个视频复诊订单待支付,请及时支付。";
                msgUrl="/ims-wx/#/returnVisit/record?outpatientId="+outpatientId;
                msgUrl="/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientId;
                logger.info("视频复诊订单待支付微信消息模板推送开始");
            }
            if ("1".equals(type)) {
                contentMsg = "您有一个图文咨询订单待支付,点击完成支付,如您已支付请忽略本条信息";
                first = consPatientDO.getName() + ",您好!您有一个图文咨询订单待支付,请及时支付。";
                msgUrl="/ims-wx/#/chatRoom?type=1&consultCode="+consultTeam.getConsult();
                msgUrl="/ims-wx/index.html#/chatRoom?type=1&consultCode="+consultTeam.getConsult();
                logger.info("图文咨询订单待支付微信消息模板推送开始");
            } else if ("17".equals(type)) {
                contentMsg = "您有一个视频咨询订单待支付,点击完成支付,如您已支付请忽略本条信息";
                first =  consPatientDO.getName() + ",您好!您有一个视频咨询订单待支付,请及时支付。";
                msgUrl="/ims-wx/#/chatRoom?type=1&consultCode="+consultTeam.getConsult();
                msgUrl="/ims-wx/index.html#/chatRoom?type=1&consultCode="+consultTeam.getConsult();
                logger.info("视频咨询订单待支付微信消息模板推送开始");
            }
        } else if ("prescriptionPayRemind".equalsIgnoreCase(titelType)) {
            first = outpatientDO.getPatientName() + ",您好! 医生已为您开具处方,请及时支付。";
            contentMsg = "医生已为您开具处方,请及时支付。";
            remark = "点击完成支付,如您已支付请忽略本条信息";
            msgUrl="/ims-wx/index.html#/returnVisit/prescriptionDetail?outpatientId="+outpatientId;
            logger.info("处方支付微信消息模板推送开始");
        } else if ("msgRemind".equalsIgnoreCase(titelType)) {
            first = outpatientDO.getPatientName() + ",您好!";
            contentMsg = "" + remindMsg;
            remark = "请您尽快回复";
        } else if ("outpatientMsgRemind".equalsIgnoreCase(titelType)) {
            first = doctorDO.getName() + doctorDO.getJobTitleName() + "医生已向您发起视频通话邀请,请点击详情进入视频诊室。";
            if ("16".equals(type)) {
                contentMsg = "您的视频复诊已开始,错过将重新排队";
                remark = "点击消息进入视频诊室接听视频通话,开始视频咨询。";
            } else if ("17".equals(type)) {
                contentMsg = "您的视频咨询已开始,错过将重新排队";
                remark = "点击消息进入视频诊室接听视频通话,开始视频复诊。";
            }
            msgUrl="/ims-wx/#/returnVisit/prescriptionDetail?outpatientId="+outpatientId;
          if (StringUtils.isNotEmpty(outpatientId)){
              if ("16".equals(type)) {
                  first = doctorDO.getName() + doctorDO.getJobTitleName() + "医生已向您发起视频通话邀请,请点击详情进入视频诊室。";
                  contentMsg = "您的视频复诊已开始,错过将重新排队";
                  remark = "点击消息进入视频诊室接听视频通话,开始视频咨询。";
                  msgUrl="/ims-wx/index.html#/returnVisit/preChat?type=16&outpatientId="+outpatientId;
                  logger.info("视频问诊已接诊提醒微信模板消息发送开始");
              }
          }
          if (consultTeam!=null){
              if ("17".equals(type)) {
                  first = consDoctorDO.getName() + consDoctorDO.getJobTitleName() + "医生已向您发起视频通话邀请,请点击详情进入视频诊室。";
                  contentMsg = "您的视频咨询已开始,错过将重新排队";
                  remark = "点击消息进入视频诊室接听视频通话,开始视频复诊。";
                  msgUrl="/ims-wx/index.html#/zx/prechat?consultCode="+consultTeam.getConsult();
                  logger.info("视频咨询已接诊提醒微信模板消息发送开始");
              }
          }
        } else if ("videoOrderRemind".equalsIgnoreCase(titelType)) {
            if ("16".equals(type)) {
                first = "您的视频复诊已预约成功。";
                contentMsg = "预计" + outpatientDO.getDoctorName() + "医生将于" + DateUtil.dateToStrLong(outpatientDO.getRegisterDate()) + " 与您进行视频复诊。请留意微信公众号消息。";
                msgUrl="/ims-wx/#/returnVisit/preChat?type=16&outpatientId="+outpatientId;
                msgUrl="/ims-wx/index.html#/returnVisit/preChat?type=16&outpatientId="+outpatientId;
                logger.info("视频复诊已预约成功微信消息模板推送开始");
            } else if ("17".equals(type)) {
                first = "您的视频咨询已预约成功。";
                contentMsg = "预计" + consDoctorDO.getName() + "医生将于" + DateUtil.dateToStrLong(consultTeam.getCzrq()) + " 与您进行视频咨询。请留意微信公众号消息。";
                msgUrl="/ims-wx/#/zx/prechat?consultCode="+consultTeam.getConsult();
                msgUrl="/ims-wx/index.html#/zx/prechat?consultCode="+consultTeam.getConsult();
                logger.info("视频咨询已预约成功微信消息模板推送开始");
            }
            remark = "咨询开始时,医生将邀请您进行视频通话,请您关注消息提醒,及时接受医生视频邀请。";
        } else if ("evaluateRemind".equalsIgnoreCase(titelType)) {
            if (consultTeam.getType()!=null&&1==consultTeam.getType()){
                first = consultTeam.getName() + ",您好!您有1条图文咨询已结束,请及时对咨询医生进行评价。";
                logger.info("图文咨询服务评价微信消息模板推送开始");
            }
            if (consultTeam.getType()!=null&&9==consultTeam.getType()){
                first = consultTeam.getName() + ",您好!您有1条图文复诊已结束,请及时对咨询医生进行评价。";
                logger.info("图文复诊服务评价微信消息模板推送开始");
            }
            if (consultTeam.getType()!=null&&16==consultTeam.getType()){
                first = consultTeam.getName() + ",您好!您有1条视频复诊已结束,请及时对咨询医生进行评价。";
                logger.info("视频复诊服务评价微信消息模板推送开始");
            }
            if (consultTeam.getType()!=null&&17==consultTeam.getType()){
                first = consultTeam.getName() + ",您好!您有1条视频咨询已结束,请及时对咨询医生进行评价。";
                logger.info("视频咨询服务评价微信消息模板推送开始");
            }
            contentMsg = "请对" + consDoctorDO.getName() + "医生的服务进行评价";
            msgUrl="/ims-wx/#/fuwupingjia?consultCode="+consultTeam.getConsult();
            msgUrl="/ims-wx/index.html#/fuwupingjia?consultCode="+consultTeam.getConsult();
        }
@ -3599,11 +3621,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                newConfig.setKeyword1(config.getKeyword1() + outpatientDO.getHospitalName());
                newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getDoctorName());
                newConfig.setKeyword3(config.getKeyword3() + doctorDO.getFee());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送 医生拒诊开始");
            } else if ("payRemind".equalsIgnoreCase(titelType)) {
                scene = "zxzfts";
                //就诊支付
@ -3622,6 +3642,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDoctorName());
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                    logger.info("眼科微信消息模板推送 就诊支付提醒开始");
                }
                //咨询支付
                if (consultTeam!=null){
@ -3639,6 +3660,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    newConfig.setKeyword3(config.getKeyword3() + consDoctorDO.getName());
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult());
                    logger.info("眼科微信消息模板推送 咨询支付提醒开始");
                }
            } else if ("prescriptionPayRemind".equalsIgnoreCase(titelType)) {
@ -3652,6 +3674,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDoctorName());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送 处方支付提醒开始");
            } else if ("msgRemind".equalsIgnoreCase(titelType)) {
                scene = "zxxxtx";
                WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_msg_notice", scene, 1);
@ -3663,22 +3686,49 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
            } else if ("outpatientMsgRemind".equalsIgnoreCase(titelType)) {
                scene = "mzxxtx";
                WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_outpatient_msg_notice", scene, 1);
                BeanUtils.copyProperties(config, newConfig);
                newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getPatientName()));
                newConfig.setFirst(config.getFirst().replace("key2", doctorDO.getJobTitleName()));
                newConfig.setKeyword1(config.getKeyword1() + outpatientDO.getDoctorName());
                newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getAdmDate());
                newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDeptName());
                newConfig.setKeyword4(config.getKeyword4() + outpatientDO.getIcd10Name());
                if ("16".equals(type)) {
                    newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频复诊"));
                } else if ("17".equals(type)) {
                    newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频咨询"));
                if (StringUtils.isNotEmpty(outpatientId)){
                    WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_outpatient_msg_notice_jz", scene, 1);
                    BeanUtils.copyProperties(config, newConfig);
                    newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getPatientName()));
                    newConfig.setFirst(config.getFirst().replace("key2", doctorDO.getJobTitleName()));
                    newConfig.setKeyword1(config.getKeyword1() + outpatientDO.getDoctorName());
                    newConfig.setKeyword2(config.getKeyword2() + outpatientDO.getAdmDate());
                    newConfig.setKeyword3(config.getKeyword3() + outpatientDO.getDeptName());
                    newConfig.setKeyword4(config.getKeyword4() + outpatientDO.getIcd10Name());
                    if ("16".equals(type)) {
                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频复诊"));
                    } else if ("17".equals(type)) {
                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频咨询"));
                    }
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                    logger.info("眼科微信消息模板推送 视频问诊接诊提醒开始");
                }
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                if (consultTeam!=null){
                    WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_outpatient_msg_notice_zx", scene, 1);
                    BeanUtils.copyProperties(config, newConfig);
                    newConfig.setFirst(config.getFirst().replace("key1", consPatientDO.getName()));
                    newConfig.setFirst(config.getFirst().replace("key2", consDoctorDO.getJobTitleName()));
                    newConfig.setKeyword1(config.getKeyword1() + consDoctorDO.getName());
                    newConfig.setKeyword2(config.getKeyword2() + consultTeam.getCzrq());//咨询暂无挂号时间
                    newConfig.setKeyword3(config.getKeyword3() + hospitalDO.getDeptName());
                    newConfig.setKeyword4(config.getKeyword4() + consultTeam.getSymptoms());
                    if ("16".equals(type)) {
                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频复诊"));
                    } else if ("17".equals(type)) {
                        newConfig.setRemark(config.getRemark().replaceFirst("key1", "视频咨询"));
                    }
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult());
                    logger.info("眼科微信消息模板推送 视频咨询接诊提醒开始");
                }
            } else if ("videoOrderRemind".equalsIgnoreCase(titelType)) {
                scene = "spwzyytx";
@ -3696,6 +3746,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    newConfig.setKeyword5(config.getKeyword5() + generalDoctorWaitingNumber(doctorDO.getId(), wxId, outpatientId));
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                    logger.info("眼科微信消息模板推送 视频问诊预约提醒开始");
                }
                if (consultTeam!=null){
                    WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_video_notice_zx", scene, 1);
@ -3710,6 +3761,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    newConfig.setKeyword5(config.getKeyword5() + generalDoctorWaitingNumber(consDoctorDO.getId(), wxId, outpatientId));
                    //发起微信消息模板推送
                    newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                    logger.info("眼科微信消息模板推送 视频咨询预约提醒开始");
                }
@ -3722,6 +3774,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                newConfig.setKeyword2(config.getKeyword2() + consDoctorDO.getName());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult());
                logger.info("眼科微信消息模板推送 服务评价提醒开始");
            }
@ -3730,7 +3783,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());
@ -3768,7 +3828,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        "wx53f6bb4ac081d840");
            }
            logger.info("url="+(prefix+msgUrl));
            logger.info("url="+prefix+msgUrl);
            String msg="first:"+first+"contentMsg:"+contentMsg+"remark:"+remark;
            logger.info("发送的信息="+msg);
            logger.info("XZZX_Msg_" + titelType + "=" + responseMsg);
@ -3798,8 +3858,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        remark
                );
            }
            logger.info("url="+(prefix+msgUrl));
            String msg="first:"+first+"contentMsg:"+contentMsg+"remark:"+remark;
            logger.info("url="+prefix+msgUrl);
            String msg="first:"+first+"-----contentMsg:"+contentMsg+"-----remark:"+remark;
            logger.info("发送的信息="+msg);
            logger.info("ZSYY_Msg" + titelType + "=" + responseMsg);
        }
@ -4751,7 +4811,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                if (one.getEndTime().before(workTimeDO.getStartTime()) || one.getStartTime().after(workTimeDO.getEndTime())) {
                } else {
                    throw new Exception("您选择的时间与“开始时间:"+one.getStartTime()+"-结束时间:"+one.getEndTime()+"”的医院排班/自己排班冲突,请重新选择!");
                    throw new Exception("您选择的时间与“开始时间:"+DateUtil.dateToStrLong(one.getStartTime())+"-结束时间:"+DateUtil.dateToStrLong(one.getEndTime())+"”的医院排班/自己排班冲突,请重新选择!");
                }
            }
@ -7671,12 +7731,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

@ -2745,7 +2745,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' ";
				}

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

@ -194,6 +194,9 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
						JSONObject res = xzyyPrescriptionService.registerOutPatient(outpatientCode,doctorCode);
						rsCode = res.getString("@RESULT");
						mes = res.getString("@MSG");
						if (type==2){
							prescriptionService.sendWxTemplateMsg(wxId,outpatientCode,null,"16","outpatientMsgRemind","");
						}
					}else {
						if (demoFlag.equalsIgnoreCase("true")){
							rsCode="0";