From cc25bc0eec2d50da39d62f9896ed4d5e66805366 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期五, 11 七月 2025 18:04:05 +0800 Subject: [PATCH] zjh20250711 --- 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