From 6f7059beb3f44bcb4bc18cc4bf13285d0913e065 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期四, 22 八月 2024 10:57:03 +0800 Subject: [PATCH] 2024-08-22 朱宝民 优化代码-财务对账 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml index 785e7b2..977aa19 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml @@ -198,7 +198,7 @@ </if> <if test = "auditStatus != null and auditStatus > 0"> - AND audit_status = ${auditStatus} + AND audit_status = #{auditStatus} </if> <if test = "operateDateStart != null and operateDateStop != null"> @@ -210,17 +210,18 @@ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇鎬昏处璁板綍--> <select id="getGenerals" resultType="com.dy.pipIrrGlobal.voSe.VoGeneral"> SELECT - CAST(id AS char) AS generalId, - CAST(cashier_id AS char) AS cashierId, + id AS generalId, + cashier_id AS cashierId, cashier_name AS cashierName, trade_amount AS tradeAmount, gift, refund_amount AS refundAmount, + (trade_amount + gift + refund_amount) AS totalAmount, Date(operate_date) AS operateDate, (CASE - WHEN audit_status = 1 THEN "鏈鏍�" - WHEN audit_status = 2 THEN "鍚屾剰" - WHEN audit_status = 3 THEN "椹冲洖" + WHEN audit_status = 1 THEN '鏈鏍�' + WHEN audit_status = 2 THEN '鍚屾剰' + WHEN audit_status = 3 THEN '椹冲洖' END) AS auditStatus FROM se_general <where> @@ -229,7 +230,7 @@ </if> <if test = "auditStatus != null and auditStatus > 0"> - AND audit_status = ${auditStatus} + AND audit_status = #{auditStatus} </if> <if test = "operateDateStart != null and operateDateStop != null"> @@ -255,11 +256,11 @@ </if> <if test = "paymentId != null and paymentId >0"> - AND ope.payment_id = ${paymentId} + AND ope.payment_id = #{paymentId} </if> <if test = "cashierId != null and cashierId >0"> - AND ope.operator = ${cashierId} + AND ope.operator = #{cashierId} </if> </where> GROUP BY ope.payment_id, Date(ope.operate_dt) @@ -286,7 +287,7 @@ SELECT * FROM v_trade_summary <where> <if test = "cashierId != null and cashierId > 0"> - AND cashierId = ${cashierId} + AND cashierId = #{cashierId} </if> <if test = "timeStart != null and timeStop != null"> @@ -303,7 +304,7 @@ FROM v_trade_details <where> <if test = "cashierId != null and cashierId > 0"> - AND cashierId = ${cashierId} + AND cashierId = #{cashierId} </if> <if test = "tradeDate != null"> @@ -317,7 +318,7 @@ SELECT * FROM v_trade_details <where> <if test = "cashierId != null and cashierId > 0"> - AND cashierId = ${cashierId} + AND cashierId = #{cashierId} </if> <if test = "tradeDate != null"> -- Gitblit v1.8.0