From 6e3d0a2097a4d841e941a84ec54780a67eb60ba1 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 10 七月 2026 09:22:56 +0800
Subject: [PATCH] Merge branch 'master' into master-任务组

---
 smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java              |    8 ++++++--
 smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml                         |   12 ++++++++++--
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java |    1 +
 smartor/src/main/java/com/smartor/domain/PatMedInhosp.java                               |    2 +-
 smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java            |    7 +++++++
 smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml                       |    1 +
 6 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java
index 45f6a4d..d833be2 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java
@@ -50,6 +50,7 @@
     }
 
     @ApiOperation("鏌ヨ闂嵎鍒楄〃閫氳繃閮ㄩ棬鐥呭尯浠g爜")
+    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
     @PostMapping("/getSviLibTemplateByDeptCode")
     public Map<String, Object> getSviLibTemplateByDeptCode(@RequestBody TemplateDeptVO templateDeptVO) {
         templateDeptVO.setPageNum(PageUtils.getOffset(templateDeptVO.getPageNum(), templateDeptVO.getPageSize()));
diff --git a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
index dd55132..432cf36 100644
--- a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
+++ b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
@@ -390,7 +390,7 @@
     /**
      * 鍑哄叆闄㈡爣璇�
      */
-    @ApiModelProperty("鍑哄叆闄㈡爣璇嗭細0鍏ラ櫌  1鍑洪櫌  ")
+    @ApiModelProperty("鍑哄叆闄㈡爣璇嗭細0鍏ラ櫌  1鍑洪櫌 2 杞  3 棰勫叆闄�")
     private Integer cry;
 
     /**
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 49f947d..e307373 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -98,14 +98,18 @@
      */
     @Override
     public List<PatMedInhosp> selectPatMedInhospList(PatMedInhosp patMedInhosp) {
-        if (patMedInhosp.getCry() == 0) {
+        if (patMedInhosp.getCry() != null && patMedInhosp.getCry() == 0) {
             patMedInhosp.setDeptcodeList(patMedInhosp.getLeaveldeptcodes());
             patMedInhosp.setHospitaldistrictcodeList(patMedInhosp.getLeavehospitaldistrictcodes());
             patMedInhosp.setLeaveldeptcodes(null);
             patMedInhosp.setLeavehospitaldistrictcodes(null);
             patMedInhosp.setInhospstate("0");
-        } else if (patMedInhosp.getCry() == 1) {
+        } else if (patMedInhosp.getCry() != null && patMedInhosp.getCry() == 1) {
             patMedInhosp.setInhospstate("1");
+        } else if (patMedInhosp.getCry() != null && patMedInhosp.getCry() == 2) {
+            patMedInhosp.setInhospstate("2");
+        } else if (patMedInhosp.getCry() != null && patMedInhosp.getCry() == 3) {
+            patMedInhosp.setInhospstate("3");
         }
 
         List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp);
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 b51a0a3..b81b373 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -410,6 +410,13 @@
                 serviceSubtaskRes.setSendstateView(1L);
             if (serviceSubtaskRes.getSendstate() == 6) serviceSubtaskRes.setSendstateView(2L);
             if (serviceSubtaskRes.getSendstate() == 4) serviceSubtaskRes.setSendstateView(3L);
+            // 濉厖褰撳墠琛ュ伩
+            if (StringUtils.isEmpty(serviceSubtask.getCurrentPreachform())){
+                if(StringUtils.isNotEmpty(serviceSubtask.getPreachform())){
+                    //榛樿鍙栫涓�涓�
+                    serviceSubtaskRes.setCurrentPreachform(serviceSubtask.getPreachform().split(",")[0]);
+                }
+            }
             serviceSubtaskResList.add(serviceSubtaskRes);
         }
         return serviceSubtaskResList;
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
index 1550953..4933abe 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -263,6 +263,8 @@
         <if test="diagcheckFlag != null ">and b.diagcheck_flag = #{diagcheckFlag}</if>
         <if test="cry != null and cry == 0 ">and b.endtime is null</if>
         <if test="cry != null and cry == 1 ">and b.inhospstate=1</if>
+        <if test="cry != null and cry == 2 ">and b.inhospstate=2</if>
+        <if test="cry != null and cry == 3 ">and b.inhospstate=3</if>
         <if test="inhospstate != null ">and b.inhospstate = #{inhospstate}</if>
         <if test="campusid != null ">and b.campusid = #{campusid}</if>
         <if test="schemestatus != null ">and b.schemestatus = #{schemestatus}</if>
@@ -328,10 +330,16 @@
         a.telcode,
         a.id,
         a.sex
-        <if test="cry==1">
+        <if test="cry != null and cry==1">
             order by b.endtime desc
         </if>
-        <if test="cry==0">
+        <if test="cry != null and cry==2">
+            order by b.endtime desc
+        </if>
+        <if test="cry != null and cry==3">
+            order by b.endtime desc
+        </if>
+        <if test="cry != null and cry==0">
             order by b.starttime desc
         </if>
     </select>
diff --git a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
index a70011d..3d0c5f6 100644
--- a/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
@@ -179,6 +179,7 @@
         AND a.svyid = b.tempid
         where a.del_flag=0
           and b.del_flag=0
+        <if test="orgid != null and orgid != ''">and a.orgid = #{orgid}</if>
         <if test="deptCode != null ">and b.dept_code = #{deptCode}</if>
         <if test="deptType != null ">and b.dept_type = #{deptType}</if>
         <if test="type != null">and b.type=#{type}</if>

--
Gitblit v1.9.3