From 9b27e22beac4f247f0a703f1e8a8bb661dbc31f3 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 30 十月 2026 11:13:07 +0800
Subject: [PATCH] 【丽水】patItem筛选当前执行方式
---
smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java | 6 ++++++
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java | 2 +-
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 11 +++++++++++
smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskVO.java | 6 ++++++
4 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskVO.java b/smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskVO.java
index 3c108fa..045d3f6 100644
--- a/smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskVO.java
+++ b/smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskVO.java
@@ -469,6 +469,12 @@
@ApiModelProperty(value = "褰撳墠鍙戦�佹柟寮�")
private String currentPreachform;
+ /**
+ * 褰撳墠鎵ц鏂瑰紡澶氶�夌瓫閫夛紝澶氫釜鍊肩敤閫楀彿鍒嗛殧
+ */
+ @ApiModelProperty(value = "褰撳墠鎵ц鏂瑰紡澶氶�夌瓫閫夛紝澶氫釜鍊肩敤閫楀彿鍒嗛殧")
+ private String currentPreachforms;
+
/**
* 搴婂彿
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 3cd03be..8fdb43c 100644
--- a/smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java
+++ b/smartor/src/main/java/com/smartor/domain/entity/ServiceSubtaskEntity.java
@@ -488,6 +488,12 @@
@ApiModelProperty(value = "褰撳墠鍙戦�佹柟寮�")
private String currentPreachform;
+ /**
+ * 褰撳墠鎵ц鏂瑰紡澶氶�夌瓫閫夛紝澶氫釜鍊肩敤閫楀彿鍒嗛殧
+ */
+ @ApiModelProperty(value = "褰撳墠鎵ц鏂瑰紡澶氶�夌瓫閫夛紝澶氫釜鍊肩敤閫楀彿鍒嗛殧")
+ private String currentPreachforms;
+
/**
* 搴婂彿
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 15940be..a2be971 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -448,7 +448,7 @@
if (StringUtils.isEmpty(serviceSubtask.getCurrentPreachform())) {
if (StringUtils.isNotEmpty(serviceSubtask.getPreachform())) {
//榛樿鍙栫涓�涓�
- serviceSubtaskRes.setCurrentPreachform(serviceSubtask.getPreachform().split(",")[0]);
+ serviceSubtaskRes.setCurrentPreachform(serviceSubtask.getPreachform().split(",")[0].trim());
}
}
PatMedInhosp inhosp = patMedInhospMapper.selectPatMedInhospByInhospid(serviceSubtask.getInhospid());
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 9974006..53aefec 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -303,6 +303,11 @@
END
</sql>
+ <!-- 褰撳墠鎵ц鏂瑰紡锛氶娆¢殢璁� current_preachform 涓虹┖鏃讹紝鍙� preachform 鐨勭涓�涓墽琛屾柟寮忓厹搴� -->
+ <sql id="effectiveCurrentPreachformExpr">
+ COALESCE(NULLIF(TRIM(current_preachform), ''), TRIM(SUBSTRING_INDEX(preachform, ',', 1)))
+ </sql>
+
<select id="selectServiceSubtaskBySendstate" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity"
resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
@@ -569,6 +574,9 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="preachform != null ">and preachform = #{preachform}</if>
<if test="currentPreachform != null ">and current_preachform = #{currentPreachform}</if>
+ <if test="currentPreachforms != null and currentPreachforms != ''">
+ and FIND_IN_SET(<include refid="effectiveCurrentPreachformExpr"/>, #{currentPreachforms})
+ </if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="textParam != null and textParam != ''">and text_param = #{textParam}</if>
<if test="bedNo != null">and bed_no = #{bedNo}</if>
@@ -2922,6 +2930,9 @@
#{state}
</foreach>
</if>
+ <if test="currentPreachforms != null and currentPreachforms != ''">
+ AND FIND_IN_SET(<include refid="effectiveCurrentPreachformExpr"/>, #{currentPreachforms})
+ </if>
<if test="orgid != null and orgid != ''">
AND orgid = #{orgid}
</if>
--
Gitblit v1.9.3