Browse Source

眼科bug修改

wangjun 4 năm trước cách đây
mục cha
commit
bb9f700862

+ 3 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/OutpatientDao.java

@ -86,5 +86,8 @@ public interface OutpatientDao extends PagingAndSortingRepository<WlyyOutpatient
    @Query("update WlyyOutpatientDO p set p.channelId=?2 where p.id=?1")
    void updateChannelId(String id,String channelId);
    @Query("from WlyyOutpatientDO a where a.consumer = ?1 and a.status=1 and a.payStatus =1 order by a.createTime desc")
    List<WlyyOutpatientDO> findWlyyOutpatientDO(String patient);
}

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

@ -4966,6 +4966,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }else if (2==type) {//视频复诊
            //在线复诊
            sql += " AND room.reservation_type !=3 AND room.consult_type =2";
        } else if(0==type) {
            sql += " AND room.consult_type =1";
        } else {
            sql += " AND room.reservation_type !=2";
        }
@ -11600,15 +11602,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            if(baseJpushTemplateDO!=null){
                content = baseJpushTemplateDO.getPushContent();
                if(1==consultTeamDo.getType()){
                    content.replace("{{咨询类型}}","图文咨询");
                    content= content.replace("{{咨询类型}}","图文咨询");
                }else if(9==consultTeamDo.getType()){
                    content.replace("{{咨询类型}}","图文复诊");
                    content= content.replace("{{咨询类型}}","图文复诊");
                }
                else if(16==consultTeamDo.getType()){
                    content.replace("{{咨询类型}}","视频复诊");
                    content=  content.replace("{{咨询类型}}","视频复诊");
                }
                else if(17==consultTeamDo.getType()){
                    content.replace("{{咨询类型}}","视频咨询");
                    content=  content.replace("{{咨询类型}}","视频咨询");
                }
                title=baseJpushTemplateDO.getPushHeader();
            }
@ -11618,8 +11620,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        }else if("video_invite".equalsIgnoreCase(templateCode)){
            BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
            if(baseJpushTemplateDO!=null){
                content = baseJpushTemplateDO.getPushContent();
                content.replace("{{医生姓名}}",wlyyOutpatientDO.getDoctorName());
                content = baseJpushTemplateDO.getPushContent().replace("{{医生姓名}}",wlyyOutpatientDO.getDoctorName());;
                title=baseJpushTemplateDO.getPushHeader();
            }
            userId = wlyyOutpatientDO.getConsumer();
@ -11629,7 +11631,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
            if(baseJpushTemplateDO!=null){
                content = baseJpushTemplateDO.getPushContent();
                content.replace("{{医生姓名}}",wlyyOutpatientDO.getDoctorName());
                content= content.replace("{{医生姓名}}",wlyyOutpatientDO.getDoctorName());
                title=baseJpushTemplateDO.getPushHeader().replace("{{医生姓名}}",wlyyOutpatientDO.getDoctorName());
            }
            userId = wlyyOutpatientDO.getConsumer();
@ -11639,7 +11641,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
            if(baseJpushTemplateDO!=null){
                content = baseJpushTemplateDO.getPushContent();
                content.replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName());
                content= content.replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName());
                title=baseJpushTemplateDO.getPushHeader();
            }
            userId = wlyyOutpatientDO.getConsumer();
@ -11748,7 +11750,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
            if(baseJpushTemplateDO!=null){
                content = baseJpushTemplateDO.getPushContent();
                content.replace("{{医生姓名}}",wlyyOutpatientDO.getDoctorName()).replace("{患者姓名}}",wlyyOutpatientDO.getPatientName());
                content=  content.replace("{{医生姓名}}",wlyyOutpatientDO.getDoctorName()).replace("{患者姓名}}",wlyyOutpatientDO.getPatientName());
                title=baseJpushTemplateDO.getPushHeader().replace("{{患者姓名}}",wlyyOutpatientDO.getDoctorName());
            }
            userId = wlyyOutpatientDO.getDoctor();
@ -11759,7 +11761,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            BaseJpushTemplateDO baseJpushTemplateDO = baseJpushTemplateDao.findByCode(templateCode);
            if(baseJpushTemplateDO!=null){
                content = baseJpushTemplateDO.getPushContent();
                content.replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName()).replace("{{药品名称}}",drugName)
                content=  content.replace("{{患者姓名}}",wlyyOutpatientDO.getPatientName()).replace("{{药品名称}}",drugName)
                .replace("{{物流状态}}",mailStatus).replace("{{运单号}}",mailNo);
                title=baseJpushTemplateDO.getPushHeader();
            }

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

@ -864,6 +864,9 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        }
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(code);
        if (businessOrderDO!=null){
            if (businessOrderDO.getStatus()==1){
                throw new Exception("该处方已支付过");
            }
            List<BasePatientWechatDo> patientWechatDos = patientWechatDao.findByWechatIdAndPatientId(wechatId,businessOrderDO.getPatient());
            String openId = "";
            if (StringUtils.isNotBlank(appletCode)){

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

@ -2962,14 +2962,14 @@ public class YkyyEntranceService {
                "t.zxks as \"dept\" ,t.yqdm as \"yqdm\" ,m.name as \"exec_unit_name\" from VEMR_ORDER_ITEM t " +
                " left join V_HLW_KSXX m on m.code = t.zxks " +
                " where 1=1";
        if (StringUtils.isNotEmpty(itemName)){
        /*if (StringUtils.isNotEmpty(itemName)){
            sql+=" and t.ITEM_NAME like '%"+itemName+"%'";
        }
        }*/
        if (StringUtils.isNotEmpty(yqdm)){
            sql+=" and t.yqdm = '"+yqdm+"'";
        }
        if (StringUtils.isNoneBlank(pyCode)){
            sql+=" and lower(t.kb_code) like '%"+pyCode.toLowerCase()+"%'";
        if (StringUtils.isNoneBlank(itemName)){
            sql+=" and lower(t.kb_code) like '%"+itemName.toLowerCase()+"%'";
        }
        if (StringUtils.isNotEmpty(itemCode)){
            String[] split = itemCode.split(",|,");

+ 9 - 4
business/base-service/src/main/java/com/yihu/jw/wechat/service/WxTemplateService.java

@ -617,11 +617,16 @@ public class WxTemplateService {
                        config.setUrl(url);
                        weixinMessagePushUtils.putWxMsg(wxAccessTokenService.getWxAccessTokenById(wechatId).getAccessToken(),basePatientWechatDo.getOpenid(),config);
                }
                List<WlyyOutpatientDO> list = outpatientDao.findWlyyOutpatientDO(basePatientDO.getId());
                if (list!=null&&list.size()>0){
                    WlyyOutpatientDO wlyyOutpatientDO = list.get(0);
                    wlyyOutpatientDO.setConsumer(basePatientDO.getId());
                    wlyyOutpatientDO.setDoctorName(senderName);
                    prescriptionService.wxTempalteJPush("consult_remind",wlyyOutpatientDO,null,"","","","");
                }
            }
            WlyyOutpatientDO wlyyOutpatientDO = new WlyyOutpatientDO();
            wlyyOutpatientDO.setConsumer(basePatientDO.getId());
            wlyyOutpatientDO.setDoctorName(senderName);
            prescriptionService.wxTempalteJPush("consult_remind",wlyyOutpatientDO,null,"","","","");
        }else{
            throw new Exception("接收者ID错误,无法找到该账号");
        }