소스 검색

系统取消接诊发送模板消息

wangjun 4 년 전
부모
커밋
b2720333eb

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

@ -3756,7 +3756,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            if ("9".equals(type)) {
                contentMsg = "医生已取消您的复诊申请,取消原因:"+remindMsg;
                first = outpatientDO.getConsumerName() + ",您好!您的图文复诊已取消";
            }
            if ("16".equals(type)) {
                contentMsg = "医生已取消您的复诊申请,取消原因:"+remindMsg;
@ -3769,6 +3768,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            first = outpatientDO.getConsumerName() + ",您好!";
            logger.info("outPatientTimeOutRemind:outpatientId="+outpatientId+"contentMsg"+contentMsg);
            msgUrl="/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientId;
        }else if("systemCancelRemind".equalsIgnoreCase(titelType)){
            if ("9".equals(type)) {
                contentMsg = "系统已自动取消您的复诊申请,取消原因:"+remindMsg;
                first = outpatientDO.getConsumerName() + ",您好!您的图文复诊已取消";
            }
            if ("16".equals(type)) {
                contentMsg = "系统已自动取消您的复诊申请,取消原因:"+remindMsg;
                first = outpatientDO.getConsumerName() + ",您好!您的视频复诊已取消";
            }
            logger.info("系统取消接诊入参:outpatientId="+outpatientId);
            msgUrl="/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientId;
        } else if ("payRemind".equalsIgnoreCase(titelType)) {
            if ("9".equals(type)) {
@ -4044,6 +4054,22 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult());
                logger.info("眼科微信消息模板推送 服务评价提醒开始");
            } else if ("systemCancelRemind".equalsIgnoreCase(titelType)) {
                scene = "xtqxfz";
                WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_system_cancel", scene, 1);
                BeanUtils.copyProperties(config, newConfig);
                newConfig.setFirst(config.getFirst().replace("key1", outpatientDO.getConsumerName()));
                if ("9".equals(type)) {
                    newConfig.setFirst(newConfig.getFirst().replace("key2", "图文复诊"));
                } else if ("16".equals(type)) {
                    newConfig.setFirst(newConfig.getFirst().replace("key2", "视频复诊"));
                }
                newConfig.setKeyword1( outpatientDO.getHospitalName());
                newConfig.setKeyword2(outpatientDO.getDoctorName());
                newConfig.setKeyword3( doctorDO.getFee());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送 系统拒诊开始");
            }

+ 2 - 2
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/PrescriptionStatusUpdateService.java

@ -395,12 +395,12 @@ public class PrescriptionStatusUpdateService {
                    if ("1".equalsIgnoreCase(wlyyOutpatientDO.getType())) {
                        data.put("type", "9");
                        msg += wlyyOutpatientDO.getPatientName() + ",您好! 您有一个图文复诊已被系统取消,取消原因:" + cancelValue + "。取消说明:" + cancelRemark + "。";
                        //prescriptionService.sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "9", "doctorRefuseRemind", cancelRemark);
                        prescriptionService.sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "9", "systemCancelRemind", cancelRemark);
                    }
                    if ("2".equalsIgnoreCase(wlyyOutpatientDO.getType())) {
                        data.put("type", "16");
                        msg += wlyyOutpatientDO.getPatientName() + ",您好! 您有一个视频复诊已被系统取消,取消原因:" + cancelValue + "。取消说明:" + cancelRemark + "。";
                        //prescriptionService.sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "16", "doctorRefuseRemind", cancelRemark);
                        prescriptionService.sendWxTemplateMsg(wechatId, wlyyOutpatientDO.getId(),null, "16", "systemCancelRemind", cancelRemark);
                    }
                    data.put("msg", msg);
                    messageDO.setData(data.toString());