新增sendstateView(1:待随访(2 待发送);2:随访中(1 被领取、3 已发送)、3:未完成(5 发送失败、7、超时)、4:已完成( 6 已完成)、5:无需随访(4 不执行))
已修改7个文件
43 ■■■■■ 文件已修改
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSubtaskRes.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/XHGatherPatArchiveServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
@@ -74,7 +74,7 @@
        SysConfig retConfig = configMapper.selectConfig(config);
        if (StringUtils.isNotNull(retConfig))
        {
            redisCache.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue());
//            redisCache.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue());
            return retConfig.getConfigValue();
        }
        return StringUtils.EMPTY;
smartor/src/main/java/com/smartor/domain/ServiceSubtaskRes.java
@@ -249,6 +249,13 @@
    private Long sendstate;
    /**
     * 发送状态
     */
//    @Excel(name = " 发送状态 1 被领取(在任务中是新建,在服务中是被领取)  2 待发送  3 已发送  4 不执行  5 发送失败 6 已完成\") ")
    @ApiModelProperty(value = "页面展示状态 :1:待随访(2 待发送);2:随访中(3 已发送、1 被领取)、3:未完成(5 发送失败、7、超时)、4:已完成( 6 已完成)、5:无需随访(4 不执行)")
    private Long sendstateView;
    /**
     * 暂停状 : 状态如果发生修改,值就加1
     */
//    @Excel(name = " 暂停状 : 状态如果发生修改,值就加1 ")
smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java
@@ -787,4 +787,11 @@
    @ApiModelProperty(value = "分组code集合")
    private List<String> groupKeyList;
    /**
     * 发送状态
     */
//    @Excel(name = " 发送状态 1 被领取(在任务中是新建,在服务中是被领取)  2 待发送  3 已发送  4 不执行  5 发送失败 6 已完成\") ")
    @ApiModelProperty(value = "页面展示状态 :1:待随访(2 待发送);2:随访中(3 已发送、1 被领取)、3:未完成(5 发送失败、7、超时)、4:已完成( 6 已完成)、5:无需随访(4 不执行)")
    private Long sendstateView;
}
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -319,7 +319,6 @@
        //获取未处理在院的数据(如果刚刚出院的患者数据的出院时间,在下面查询出的入院时间之前,那之前的出院患者的数据,也得停掉,因为又入院了)
        PatMedInhosp patMedInhosp = new PatMedInhosp();
        //获取需要出院部门随访,未处理的数据
        patMedInhosp.setDeptcheckFlag("0");
        patMedInhosp.setInhospstate("0");
        List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp);
@@ -1655,6 +1654,8 @@
            if (CollectionUtils.isEmpty(serviceTaskdepts)) {
                PatMedInhosp patMedInhosp = patMedInhospMapper.selectPatMedInhospByInhospid(patMedInhosp1.getInhospid());
                patMedInhosp1.setDeptcheckFlag("2");
                patMedInhosp1.setWardcheckFlag(patMedInhosp.getWardcheckFlag());
                patMedInhosp1.setDiagcheckFlag(patMedInhosp.getDiagcheckFlag());
                patMedInhosp1.setLongTaskReason(patMedInhosp.getLongTaskReason() + "该患者所在科室未配置离院长期任务;");
                patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
            } else {
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -348,6 +348,14 @@
    @Override
    public List<ServiceSubtaskRes> patItem(ServiceSubtaskEntity serviceSubtaskEntity) {
        //            1:待随访(2 待发送);2:随访中(3 已发送、1 被领取)、3:未完成(5 发送失败、7、超时)、4:已完成( 6 已完成)、5:无需随访(4 不执行)
        if (serviceSubtaskEntity.getSendstateView() == 1) serviceSubtaskEntity.setSendstates(Arrays.asList(2L));
        if (serviceSubtaskEntity.getSendstateView() == 2) serviceSubtaskEntity.setSendstates(Arrays.asList(1L, 3L));
        if (serviceSubtaskEntity.getSendstateView() == 3) serviceSubtaskEntity.setSendstates(Arrays.asList(5L, 7L));
        if (serviceSubtaskEntity.getSendstateView() == 4) serviceSubtaskEntity.setSendstates(Arrays.asList(6L));
        if (serviceSubtaskEntity.getSendstateView() == 5) serviceSubtaskEntity.setSendstates(Arrays.asList(4L));
        List<ServiceSubtask> selectServiceSubtaskList = this.selectServiceSubtaskList(serviceSubtaskEntity);
        List<ServiceSubtaskRes> serviceSubtaskResList = new ArrayList<>();
@@ -356,6 +364,14 @@
            if (ObjectUtils.isNotEmpty(serviceSubtask.getContinueContent())) {
                serviceSubtaskRes.setContinueContent(serviceSubtask.getContinueContent());
            }
//            1:待随访(2 待发送);2:随访中(3 已发送、1 被领取)、3:未完成(5 发送失败、7、超时)、4:已完成( 6 已完成)、5:无需随访(4 不执行)
            if (serviceSubtaskRes.getSendstate() == 2) serviceSubtaskRes.setSendstateView(1L);
            if (serviceSubtaskRes.getSendstate() == 1 || serviceSubtaskRes.getSendstate() == 3L)
                serviceSubtaskRes.setSendstateView(2L);
            if (serviceSubtaskRes.getSendstate() == 5 || serviceSubtaskRes.getSendstate() == 7L)
                serviceSubtaskRes.setSendstateView(3L);
            if (serviceSubtaskRes.getSendstate() == 6) serviceSubtaskRes.setSendstateView(4L);
            if (serviceSubtaskRes.getSendstate() == 4) serviceSubtaskRes.setSendstateView(5L);
            serviceSubtaskResList.add(serviceSubtaskRes);
        }
        return serviceSubtaskResList;
smartor/src/main/java/com/smartor/service/impl/XHGatherPatArchiveServiceImpl.java
@@ -284,6 +284,7 @@
        PatMedInhosp queryInhosp = new PatMedInhosp();
        queryInhosp.setPatno(patArchive.getPatientno());
        queryInhosp.setSerialnum(patMedInhosp.getSerialnum());
        queryInhosp.setCry(Integer.valueOf(cry));
        List<PatMedInhosp> existingInhosps = patMedInhospService.selectPatMedInhospList(queryInhosp);
        // 保存或更新住院信息
@@ -323,6 +324,7 @@
        // 医院和床位信息
        patMedInhosp.setHospitalcode(thiedInhospInfo.getAreaId());
        patMedInhosp.setBedNo(thiedInhospInfo.getAdmissBedNo());
        patMedInhosp.setCry(Integer.valueOf(cry));
        // 时间信息
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -301,6 +301,12 @@
        <if test="senderdetail != null  and senderdetail != ''">and senderdetail = #{senderdetail}</if>
        <if test="type != null  and type != ''">and type = #{type}</if>
        <if test="taskid != null ">and taskid = #{taskid}</if>
        <if test="sendstates != null and sendstates.size() > 0">
            AND sendstate IN
            <foreach collection="sendstates" item="state" open="(" separator="," close=")">
                #{state}
            </foreach>
        </if>
        <!-- taskIds筛选 -->
        <if test="taskIds != null and taskIds.size() > 0">
            AND taskid IN