From fc1f48f6cb2736bf03b7750563e5d9830d6fd4ba Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 06 十一月 2026 13:49:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/smartor_ls_261103' into smartor_ls_261103

---
 ruoyi-task/src/main/java/com/ruoyi/task/mapper/ServiceSubtaskMapper.java |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 55 insertions(+), 0 deletions(-)

diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/mapper/ServiceSubtaskMapper.java b/ruoyi-task/src/main/java/com/ruoyi/task/mapper/ServiceSubtaskMapper.java
index f669994..e7e2a02 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/mapper/ServiceSubtaskMapper.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/mapper/ServiceSubtaskMapper.java
@@ -38,6 +38,9 @@
 
     /**
      * 鏌ヨ鍗曚竴浠诲姟锛堥殢璁匡級鍒楄〃
+     * <p>
+     * 鍏ュ弬 soonTimeout=1 涓� soonTimeoutHours=N 鏃讹紝浠呰繑鍥炩�滃皻鏈秴鏃躲�佷笖灏嗗湪 N 灏忔椂鍐呰秴鏃垛�濈殑鏁版嵁锛�
+     * 鎴鏃堕棿鍙e緞涓� getCurrentUserServiceSubtaskCount 鐨� soonTimeoutCount 涓�鑷淬��
      *
      * @param serviceSubtaskVO 鍗曚竴浠诲姟锛堥殢璁匡級
      * @return 鍗曚竴浠诲姟锛堥殢璁匡級闆嗗悎
@@ -155,6 +158,14 @@
 
     public Boolean updateServiceSubtaskByCondition(ServiceSubtask ServiceSubtask);
 
+    /**
+     * 寰俊鍏紬鍙峰凡棰嗗彇鏈~鍐欐寜榛樿閫夐」瀹屾垚锛氬彧鏇存柊褰撳墠瀛愪换鍔★紝涓斿彧鍏佽 sendstate=1銆佹湭鎻愪氦鐨勬暟鎹��
+     *
+     * @param serviceSubtask 蹇呭~ id銆乫inishtime銆乺esult銆乺emark
+     * @return 褰卞搷琛屾暟
+     */
+    public int updateWechatDefaultComplete(ServiceSubtask serviceSubtask);
+
     public Boolean updateServiceSubtaskByTaskGuid(ServiceSubtask ServiceSubtask);
 
     /**
@@ -166,6 +177,30 @@
     public int deleteServiceSubtaskById(Long id);
 
     public int deleteServiceSubtaskByCondition(@Param("taskid") Long id, @Param("patid") Long patid);
+
+    /**
+     * 鍒犻櫎鎮h�呭嚭闄㈣褰曞搴旂殑鏈畬鎴愰殢璁夸换鍔�
+     *
+     * @param patid      鎮h�匢D
+     * @param inhospids  鍑洪櫌璁板綍ID闆嗗悎
+     * @param sendstates 鏈畬鎴愮姸鎬侀泦鍚�
+     * @return 鍒犻櫎鏉℃暟
+     */
+    public int deleteUnfinishedServiceSubtaskByInhospids(@Param("patid") Long patid,
+                                                         @Param("inhospids") List<Long> inhospids,
+                                                         @Param("sendstates") List<Long> sendstates);
+
+    /**
+     * 缁熻鎮h�呮寚瀹氫换鍔′笅鏈畬鎴愮殑闅忚浠诲姟鏁伴噺锛堢敤浜庝汉宸ラ殢璁块噸澶嶆牎楠岋級
+     *
+     * @param patid      鎮h�匢D
+     * @param taskid     浠诲姟ID
+     * @param sendstates 鏈畬鎴愮姸鎬侀泦鍚�
+     * @return 鏈畬鎴愪换鍔℃暟閲�
+     */
+    int countUnfinishedServiceSubtaskByPatidAndTaskid(@Param("patid") Long patid,
+                                                      @Param("taskid") Long taskid,
+                                                      @Param("sendstates") List<Long> sendstates);
 
     /**
      * 鍒犻櫎鍗曚竴浠诲姟锛堥殢璁匡級
@@ -228,6 +263,14 @@
      */
     public List<ServiceSubtaskScriptCount> getSfStatisticsScriptItemDetails(ServiceSubtaskCountReq serviceSubtaskCountReq);
 
+    /**
+     * 闂閫夐」鏁板瓧涓嬮捇锛氭煡璇㈤�夋嫨浜嗘寚瀹氶�夐」鐨� service_subtask 鍒楄〃
+     *
+     * @param serviceSubtaskCountReq 缁熻缁村害銆佺瀹�/鐥呭尯銆佷换鍔°�侀鐩強閫夐」鏉′欢
+     * @return service_subtask 鍒楄〃
+     */
+    public List<ServiceSubtask> getSfStatisticsScriptDetailsHyperlink(ServiceSubtaskCountReq serviceSubtaskCountReq);
+
 
     public List<PatMedRes> getDeptRanking(PatMedReq patMedReq);
 
@@ -246,6 +289,7 @@
      * ywc: 宸插畬鎴愭暟閲� sendstate = 6L
      * dfs: 寰呭彂閫佹暟閲� sendstate = 1L, 3L, 4L, 5L, 6L, 7L
      * yfs: 宸插彂閫佹暟閲� sendstate = 2L
+     * cs: 瓒呮椂鏁伴噺 sendstate = 7L
      * yc: 寮傚父鏁伴噺 excep = '1'
      * yc: 璀﹀憡鏁伴噺 excep = '2'
      */
@@ -260,6 +304,7 @@
      * failedVisitCount: 褰撳墠鐧诲綍浜洪殢璁夸换鍔″け璐ユ�婚噺
      * abnormalVisitVount: 褰撳墠鐧诲綍浜洪殢璁夸换鍔″紓甯告�婚噺
      * allVisitCount: 褰撳墠鐧诲綍浜洪殢璁夸换鍔℃�婚噺
+     * soonTimeoutCount: 褰撳墠鐧诲綍浜哄嵆灏嗚秴鏃舵暟閲忥紙瓒呮椂鎴鏃堕棿鍦� soonTimeoutHours 灏忔椂鍐咃紝浠呯粺璁″皻鏈秴鏃剁殑鏁版嵁锛�
      */
     public Map<String, Object> getCurrentUserServiceSubtaskCount(ServiceSubtaskEntity serviceSubtaskVO);
 
@@ -327,4 +372,14 @@
 
     
 
+    /**
+     * 鏉′欢鏇存柊鍘熶换鍔$殑鈥滄槸鍚﹀啀娆¢殢璁库�濇爣璇嗭紝鐢ㄤ簬浜屾闅忚骞傜瓑鎺у埗銆�
+     * 浠呭綋褰撳墠鍊间笉鏄洰鏍囧�兼椂鎵嶆洿鏂帮紝杩斿洖鍙楀奖鍝嶈鏁般��
+     *
+     * @param id           瀛愪换鍔� ID
+     * @param isVisitAgain 鐩爣鍊硷紙2-宸插啀娆¢殢璁匡級
+     * @return 鍙楀奖鍝嶈鏁帮紝1 琛ㄧず鎶㈠埌鐢熸垚鏉冿紝0 琛ㄧず宸茶鍏朵粬璇锋眰澶勭悊
+     */
+    int updateIsVisitAgainById(@Param("id") Long id, @Param("isVisitAgain") Integer isVisitAgain);
+
 }

--
Gitblit v1.9.3