lighter 5 ヶ月 前
コミット
38fc9485f4

+ 2 - 3
src/main/java/thyyxxk/webserver/dao/his/medicaladvice/patientinfo/AdjustBedDao.java

@@ -72,10 +72,9 @@ public interface AdjustBedDao {
             "gender=case when sex='1' then N'男' when sex='2' then N'女' else N'未知' end, " +
             "wardName=(select rtrim(d.name) from zd_unit_code d where d.code=ward), " +
             "smallDeptName=(select rtrim(d.name) from zd_unit_code d where d.code=small_dept) " +
-            "from zy_prepatient where ward=#{ward} ")
+            "from zy_actpatient where ward=#{ward} and bed_status='0' ")
     List<ZyActpatient> getPreAdmPatients(String ward);
 
-    @Update("insert into zy_actpatient select * from zy_prepatient d where d.inpatient_no=#{patNo};" +
-            "delete from zy_prepatient where inpatient_no=#{patNo}")
+    @Update("update zy_actpatient set bed_status='1' where inpatient_no=#{patNo}")
     void updateBedStatus(String patNo);
 }

+ 0 - 2
src/main/java/thyyxxk/webserver/entity/inpatient/ZyActpatient.java

@@ -23,8 +23,6 @@ public class ZyActpatient implements Serializable {
     public static final String ZY_INACTPATIENT = "zy_inactpatient";
     //在院表
     public static final String ZY_ACTPATIENT = "zy_actpatient";
-    //待接收
-    public static final String ZY_PREPATIENT = "zy_prepatient";
 
     /**
      * 自费病人身份