From e2a8c2e004a7ef5942994ad47e350576339413ef Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期四, 09 七月 2026 15:37:18 +0800
Subject: [PATCH] 【本地】预入院查询

---
 smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java   |    8 ++++++--
 smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml              |   12 ++++++++++--
 smartor/src/main/java/com/smartor/domain/PatMedInhosp.java                    |    2 +-
 smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java |    7 +++++++
 4 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
index 14ec743..fb3bbf7 100644
--- a/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
+++ b/smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
@@ -378,7 +378,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 8db8f65..a5e49ee 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -90,14 +90,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 a261694..44bef82 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -403,6 +403,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 24c2efc..28ae015 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -259,6 +259,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>
@@ -317,10 +319,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>

--
Gitblit v1.9.3