From 3f31a0466e7a706424d28aaab10bb70e2895bcfc Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期一, 21 四月 2025 16:13:25 +0800
Subject: [PATCH] zjh20250419

---
 ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TbTransitionMapper.java |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TbTransitionMapper.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TbTransitionMapper.java
index 4eddac6..d81c973 100644
--- a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TbTransitionMapper.java
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TbTransitionMapper.java
@@ -8,6 +8,7 @@
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 杩囨浮Mapper鎺ュ彛
@@ -358,6 +359,14 @@
     TbTransition getOnwTbTransition(@Param("idCard") String idCard,@Param("tjNumber")String tjNumber);
 
 
+    @Select("SELECT aa.parent_pro_id xmid,(g.price_now-aa.ys)cj FROM tj_package_project g JOIN (\n" +
+            " SELECT a.parent_pro_id,SUM(a.now_price)ys  FROM tb_transition a WHERE a.cus_id=#{cusIdCard} " +
+            " AND pac_id=#{pacId} AND ISNULL(a.tj_num) GROUP BY a.parent_pro_id)aa\n" +
+            "ON\n" +
+            "trim(g.pro_id)=trim(aa.parent_pro_id ) where g.pac_id=#{pacId} AND (g.price_now-aa.ys)>0;")
+    List<Map<String,Object>> addTbhuoquxiangmuchajia(@Param("pacId") String pacId, @Param("cusIdCard") String cusIdCard);
+
+
     @Update("UPDATE tb_transition t JOIN (SELECT a.id FROM tb_transition a \n" +
             "WHERE a.cus_id=#{idCard} AND a.pac_id=#{pacId}   " +
             "AND ISNULL(a.tj_num) AND a.now_price !=0 ORDER BY a.now_price DESC LIMIT 1)aa ON aa.id=t.id\n" +

--
Gitblit v1.8.0