From e6eb8c14f98921ba73a7efdfc1415c6483dc4112 Mon Sep 17 00:00:00 2001 From: zhaowenxuan <chacca165@163.com> Date: 星期五, 18 七月 2025 14:34:46 +0800 Subject: [PATCH] 查询时间范围条件 --- ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TbTransitionMapper.java | 2 +- 1 files changed, 1 insertions(+), 1 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 170286d..f34fa5f 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 @@ -107,7 +107,7 @@ @Select("SELECT DISTINCT pac_id FROM tb_transition WHERE cus_id=#{cusId} AND !ISNULL(pac_id) AND ISNULL(tj_num)") String getTbTransitionPacIdByCusIdAndPac(String cusId); - @Select("SELECT SUM(a.now_price) now_price FROM tb_transition a WHERE cus_id=#{cusId}") + @Select("SELECT ifnull(SUM(a.now_price),0) now_price FROM tb_transition a WHERE cus_id=#{cusId} and ISNULL(tj_num)") BigDecimal sumNowPrice(String cusId); @Select("SELECT MAX(a.create_time) FROM tb_transition a WHERE a.cus_id=#{cusId} ") -- Gitblit v1.8.0