From 2ad7a1b9035321fc16b253ad2cdd73c6d5e15d64 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 22 五月 2026 16:18:52 +0800
Subject: [PATCH] 新增sendstateView(1:待随访(2 待发送);2:随访中(1 被领取、3 已发送)、3:未完成(5 发送失败、7、超时)、4:已完成( 6 已完成)、5:无需随访(4 不执行))

---
 smartor/src/main/java/com/smartor/service/impl/XHGatherPatArchiveServiceImpl.java  |    2 ++
 smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java        |    3 ++-
 smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java          |    7 +++++++
 smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java      |   16 ++++++++++++++++
 smartor/src/main/java/com/smartor/domain/ServiceSubtaskRes.java                    |    7 +++++++
 smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml                 |    6 ++++++
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java |    2 +-
 7 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
index a429707..1980a09 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
+++ b/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;
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskRes.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtaskRes.java
index c433d10..fccb2d8 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtaskRes.java
+++ b/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 ")
diff --git a/smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java b/smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java
index 7426080..64aa0c0 100644
--- a/smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java
+++ b/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;
+
 }
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
index 0a1c316..0ec57d6 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -319,7 +319,6 @@
 
         //鑾峰彇鏈鐞嗗湪闄㈢殑鏁版嵁(濡傛灉鍒氬垰鍑洪櫌鐨勬偅鑰呮暟鎹殑鍑洪櫌鏃堕棿,鍦ㄤ笅闈㈡煡璇㈠嚭鐨勫叆闄㈡椂闂翠箣鍓�,閭d箣鍓嶇殑鍑洪櫌鎮h�呯殑鏁版嵁,涔熷緱鍋滄帀,鍥犱负鍙堝叆闄簡)
         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 {
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
index 00f59ff..59d4801 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/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;
diff --git a/smartor/src/main/java/com/smartor/service/impl/XHGatherPatArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/XHGatherPatArchiveServiceImpl.java
index 22df1bf..cb0961a 100644
--- a/smartor/src/main/java/com/smartor/service/impl/XHGatherPatArchiveServiceImpl.java
+++ b/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));
 
 
         // 鏃堕棿淇℃伅
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 5ed008b..c2d76e0 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/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

--
Gitblit v1.9.3