Browse Source

[医保代码]

wangzhinan 3 years ago
parent
commit
fd5ceef75f

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

@ -5157,6 +5157,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                newConfig.setKeyword1( outpatientDO.getHospitalName());
                newConfig.setKeyword2(outpatientDO.getDoctorName());
                newConfig.setKeyword3( doctorDO.getFee());
                newConfig.setPagepath(newConfig.getPagepath() + "" + outpatientDO.getId());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送 医生拒诊开始");
@ -5169,6 +5170,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                scene="jzddgcts";
                WxTemplateConfigDO config = wxTemplateConfigDao.findByWechatIdAndTemplateNameAndSceneAndStatus(wechatId, "template_outpatient_timeout_remind", scene, 1);
                BeanUtils.copyProperties(config, newConfig);
                newConfig.setPagepath(newConfig.getPagepath() + "" + outpatientDO.getId());
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("就诊等待过长提示");
            } else if ("payRemind".equalsIgnoreCase(titelType)) {
@ -5194,6 +5196,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                }
                newConfig.setKeyword2(outpatientDO.getHospitalName());
                newConfig.setKeyword3(outpatientDO.getDoctorName());
                newConfig.setPagepath(newConfig.getPagepath() + "" + outpatientDO.getId());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送 就诊支付提醒开始");
@ -5226,6 +5229,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                }
                newConfig.setKeyword2(outpatientDO.getHospitalName());
                newConfig.setKeyword3(outpatientDO.getDoctorName());
                newConfig.setPagepath(newConfig.getPagepath() + "" + outpatientDO.getId());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
            } else if ("doctorPick".equalsIgnoreCase(titelType)) {
@ -5252,6 +5256,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                newConfig.setRemark(config.getRemark().replace("key1",outpatientDO.getDoctorName()));
                newConfig.setKeyword2(outpatientDO.getHospitalName());
                newConfig.setKeyword3(outpatientDO.getDoctorName());
                newConfig.setPagepath(newConfig.getPagepath() + "" + outpatientDO.getId());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
            }else if ("patientCancel".equalsIgnoreCase(titelType)) {
@ -5271,6 +5276,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                newConfig.setKeyword1( outpatientDO.getHospitalName());
                newConfig.setKeyword2(outpatientDO.getDoctorName());
                newConfig.setKeyword3(outpatientDO.getFee()==null?"0":outpatientDO.getFee().toString());
                newConfig.setPagepath(newConfig.getPagepath() + "" + outpatientDO.getId());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送");
@ -5283,6 +5289,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                newConfig.setKeyword1( "处方支付");
                newConfig.setKeyword2(outpatientDO.getHospitalName());
                newConfig.setKeyword3(outpatientDO.getDoctorName());
                newConfig.setPagepath(newConfig.getPagepath() + "" + outpatientDO.getId());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送 处方支付提醒开始");
@ -5304,6 +5311,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                newConfig.setKeyword3( outpatientDO.getDoctorName());
                newConfig.setKeyword4(DateUtil.dateToStrLong(outpatientDO.getRegisterDate()));
                newConfig.setKeyword5(generalDoctorWaitingNumber(doctorDO.getId(), wxId, outpatientId));
                newConfig.setPagepath(newConfig.getPagepath() + "" + outpatientDO.getId());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送 视频问诊预约提醒开始");
@ -5315,6 +5323,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                newConfig.setFirst(config.getFirst().replaceFirst("key1", consPatientDO.getName()));
                newConfig.setKeyword2(hospitalDO.getOrgName());
                newConfig.setKeyword3(consDoctorDO.getName());
                newConfig.setPagepath(newConfig.getPagepath() + "" + consultTeam.getConsult());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + consultTeam.getConsult());
                logger.info("极光消息推送 医生拒诊开始");
@ -5337,7 +5346,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                }
                newConfig.setKeyword1( outpatientDO.getHospitalName());
                newConfig.setKeyword2(outpatientDO.getDoctorName());
                newConfig.setKeyword3( doctorDO.getFee());
                newConfig.setKeyword3(outpatientDO.getFee()==null?"0":outpatientDO.getFee().toString());
                newConfig.setPagepath(newConfig.getPagepath() + "" + outpatientDO.getId());
                //发起微信消息模板推送
                newConfig.setUrl(newConfig.getUrl() + "" + outpatientDO.getId());
                logger.info("眼科微信消息模板推送 系统拒诊开始");
@ -5490,6 +5500,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            newConfig.setKeyword3(mailNo);
            newConfig.setKeyword4(remindMsg);
            newConfig.setRemark(config.getRemark());
            newConfig.setPagepath(newConfig.getPagepath().replace("key1",outpatientId).replace("key2",prescriptionId);
            newConfig.setUrl(newConfig.getUrl().replace("key1",outpatientId).replace("key2",prescriptionId));
            logger.info("=======setUrl========" + newConfig.getUrl());
            WxAccessTokenDO wxAccessTokenDO = wxAccessTokenService.getWxAccessTokenById(wechatId);

+ 6 - 0
business/base-service/src/main/java/com/yihu/jw/wechat/service/WxTemplateService.java

@ -405,6 +405,9 @@ public class WxTemplateService {
                                        WxTemplateConfigDO newConfig = new WxTemplateConfigDO();
                                        BeanUtils.copyProperties(config,newConfig);
                                        newConfig.setFirst(config.getFirst().replace("key1",patientDO.getName()));
                                        if (StringUtils.isNoneBlank(config.getPagepath())){
                                            newConfig.setPagepath(config.getPagepath()+""+outpatientId);
                                        }
                                        newConfig.setUrl(config.getUrl()+""+outpatientId);
                                        newConfig.setKeyword3(doctorName);
                                        WxAccessTokenDO wxAccessTokenDO = wxAccessTokenService.getWxAccessTokenById(wechatId);
@ -509,6 +512,9 @@ public class WxTemplateService {
                                        condition = "&outpatientId="+relationCode;
                                    }
                                    newConfig.setFirst(config.getFirst().replace("key1",patientDO.getName()).replace("key2",name));
                                    if (StringUtils.isNoneBlank(config.getPagepath())){
                                        newConfig.setPagepath(config.getPagepath()+""+condition);
                                    }
                                    newConfig.setUrl(config.getUrl()+""+condition);
                                    newConfig.setKeyword3(doctorDO.getName());
                                    newConfig.setKeyword1(name);

+ 1 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/wx/WxTemplateConfigDO.java

@ -195,4 +195,5 @@ public class WxTemplateConfigDO extends UuidIdentityEntityWithOperator implement
    public void setStatus(Integer status) {
        this.status = status;
    }
}

+ 10 - 0
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/UnSettledHISPrescriptionService.java

@ -47,6 +47,7 @@ import com.yihu.jw.wechat.dao.WxPushLogDao;
import com.yihu.jw.wechat.dao.WxTemplateConfigDao;
import com.yihu.jw.wechat.dao.WxTemplateDao;
import com.yihu.jw.wechat.service.WxAccessTokenService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
@ -260,6 +261,9 @@ public class UnSettledHISPrescriptionService {
                                        WxTemplateConfigDO newConfig = new WxTemplateConfigDO();
                                        BeanUtils.copyProperties(config,newConfig);
                                        newConfig.setFirst(config.getFirst().replace("key1",patientDO.getName()));
                                        if (StringUtils.isNoneBlank(config.getPagepath())){
                                            newConfig.setPagepath(config.getPagepath()+""+outpatientId);
                                        }
                                        newConfig.setUrl(config.getUrl()+""+outpatientId);
                                        newConfig.setKeyword3(doctorName);
                                        WxAccessTokenDO wxAccessTokenDO = wxAccessTokenService.getWxAccessTokenById(wechatId);
@ -392,6 +396,9 @@ public class UnSettledHISPrescriptionService {
                                        WxTemplateConfigDO newConfig = new WxTemplateConfigDO();
                                        BeanUtils.copyProperties(config,newConfig);
                                        newConfig.setFirst(config.getFirst().replace("key1",patientDO.getName()));
                                        if (StringUtils.isNoneBlank(config.getPagepath())){
                                            newConfig.setPagepath(config.getPagepath()+""+outpatientId);
                                        }
                                        newConfig.setUrl(config.getUrl()+""+outpatientId);
                                        newConfig.setKeyword3(doctorName);
                                        WxAccessTokenDO wxAccessTokenDO = wxAccessTokenService.getWxAccessTokenById(wechatId);
@ -524,6 +531,9 @@ public class UnSettledHISPrescriptionService {
                                        condition = "&outpatientId="+relationCode;
                                    }
                                    newConfig.setFirst(config.getFirst().replace("key1",patientDO.getName()).replace("key2",name));
                                    if (StringUtils.isNoneBlank(config.getPagepath())){
                                        newConfig.setPagepath(config.getPagepath()+""+condition);
                                    }
                                    newConfig.setUrl(config.getUrl()+""+condition);
                                    newConfig.setKeyword3(doctorDO.getName());
                                    newConfig.setKeyword1(name);