From 672ce84d5ce6545a0e81709ea736c69cbbef8c1a Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期四, 24 四月 2025 18:12:47 +0800
Subject: [PATCH] zjh20250424

---
 ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java
index c0c0e7f..f712edd 100644
--- a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java
@@ -25,11 +25,14 @@
     @Select ("SELECT * FROM ltkj_exam_jcsqd a WHERE a.tjh=#{tjh} AND a.tmh=#{tmh}  and a.lx=0  ")
     LtkjExamJcsqd getLtkjJcsqdByTjhAndTmh(@Param("tjh") String tjh,@Param("tmh") String tmh);
 
-    @Delete ("DELETE FROM ltkj_exam_jcsqd WHERE tjh=#{tjh}  and lx=0 ")
+    @Delete ("DELETE FROM ltkj_exam_jcsqd WHERE tjh=#{tjh}  and lx=0  and sgorzd=0  ")
     void  deletedLtkjJcsqdByTjhAndTmh(@Param("tjh")String tjh);
 
     @Delete ("DELETE FROM ltkj_exam_jcsqd WHERE tjh=#{tjh} and tmh=#{tmh}   and lx=1 ")
     void  deletedLtkjJcsqdByTjhandtmh(@Param("tjh") String tjh,@Param("tmh") String tmh);
+
+    @Delete ("DELETE FROM ltkj_exam_jcsqd WHERE tjh=#{tjh} and lx=1 ")
+    void  deletedLtkjJcsqdByTjhandtmh1(@Param("tjh") String tjh);
 
     @Select("SELECT * FROM ltkj_exam_jcsqd a WHERE a.tjh=#{tjh}")
     List<LtkjExamJcsqd> getLtkjJcsqdByTjh(String tjh);
@@ -39,7 +42,7 @@
             "`sqsj`, `jgsj`, `jcxmmc`, `jcxmid`, `bw`, `jgzt`, `jgbx`, `lx`, `create_time`)\n" +
             "SELECT a.tjh,a.tmh,NULL jclx,NULL jczlx,a.shysxm bgys,a.shysdm bgysid,a.sqsj,a.zdsj jgsj, a.xmmc jcxmmc,a.xmdm jcxmid,a.jcbw bw,\n" +
             "a.yxzd jgzt,a.bg_nr jgbx,'0',sysdate()\n" +
-            "FROM ltkj_exam_jcbgd a WHERE a.tjh=#{tjh} GROUP BY a.xmmc")
+            "FROM ltkj_exam_jcbgd a WHERE a.tjh=#{tjh} and a.lx=0  GROUP BY a.xmmc")
     void saveLtkjExamJcsqd(String tjh);
 
     @Select("SELECT a.tjh,a.tmh,NULL jclx,NULL jczlx,a.shysxm bgys,a.shysdm bgysid,a.sqsj,a.zdsj jgsj, a.xmmc jcxmmc,a.xmdm jcxmid,a.jcbw bw," +
@@ -56,7 +59,7 @@
                                                   @Param("page")int page,
                                                   @Param("status")String status);
 
-    @Delete ("DELETE FROM ltkj_exam_jcsqd WHERE tjh=#{tjh} and jcxmid = #{xmid} and lx=0 ")
+    @Delete ("DELETE FROM ltkj_exam_jcsqd WHERE tjh=#{tjh} and jcxmid = #{xmid} and lx=0 and sgorzd=1 ")
     void deletedLtkjJcsqdByTjhAndProId(@Param("tjh") String tjh,@Param("xmid") String xmid);
 
 
@@ -64,6 +67,6 @@
             "`jgsj`, `jcxmmc`, `jcxmid`, `bw`, `jgzt`, `jgbx`, `lx`, `create_time`)\n" +
             "SELECT a.tjh,a.tmh,NULL jclx,NULL jczlx,a.shysxm bgys,a.shysdm bgysid,a.sqsj,a.zdsj jgsj, a.xmmc jcxmmc,a.xmdm jcxmid,a.jcbw bw,\n" +
             "a.yxzd jgzt,a.bg_nr jgbx,'1',sysdate()\n" +
-            "FROM ltkj_exam_jcbgd a WHERE a.tjh=#{tjh} GROUP BY a.xmmc")
+            "FROM ltkj_exam_jcbgd a WHERE a.tjh=#{tjh} and a.lx=1  GROUP BY a.xmmc")
     void saveLtkjExamJcsqdxdt(String tjh);
 }

--
Gitblit v1.8.0