From 001f24d4efd7b818bc2224b976c82faf4f9e564c Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 01 十一月 2024 11:25:00 +0800
Subject: [PATCH] 1、通信协议要增加版本号(目的为远程升级准备),原来没有版本号的协议默认为版本号为1,所以调整了程序命名; 2、流浪控制器与控制器数据库表都增加了协议版本号字段; 3、VO中Double和Float类型的属性增加注解@JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" )
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml | 48 +++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 41 insertions(+), 7 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 977aa19..d42ffae 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml
@@ -140,7 +140,9 @@
SELECT
DISTINCT Date(ope.operate_dt) AS operateDate
FROM se_card_operate ope
- WHERE Date(ope.operate_dt) NOT IN(SELECT operate_date FROM se_general) AND Date(ope.operate_dt) != CURDATE()
+ WHERE Date(ope.operate_dt) NOT IN(SELECT operate_date FROM se_general)
+<!-- 鍙栨秷褰撳ぉ闄愬埗-->
+<!-- AND Date(ope.operate_dt) != CURDATE()-->
</select>
<!--鏍规嵁浜ゆ槗鏃ユ湡鑾峰彇鎬昏处璁板綍鍒楄〃锛堝緟鐢熸垚鐨勶級 -->
@@ -216,7 +218,7 @@
trade_amount AS tradeAmount,
gift,
refund_amount AS refundAmount,
- (trade_amount + gift + refund_amount) AS totalAmount,
+ (trade_amount + gift - refund_amount) AS totalAmount,
Date(operate_date) AS operateDate,
(CASE
WHEN audit_status = 1 THEN '鏈鏍�'
@@ -248,9 +250,10 @@
<!--鑾峰彇鎸囧畾鏃ユ湡銆佹寚瀹氭敹閾跺憳銆佹寚瀹氭敮浠樻柟寮忓疄鏀堕噾棰濆悎璁�-->
<select id="getPaymentSums" resultType="java.lang.Float">
SELECT
- SUM(ope.trade_amount) AS tradeAmount
+ (SUM(ope.trade_amount) + SUM(ope.card_cost)) AS tradeAmount
FROM se_card_operate ope
<where>
+ AND ope.operate_valid = 2
<if test = "tradeDate != null and tradeDate !=''">
AND Date(ope.operate_dt) = #{tradeDate}
</if>
@@ -263,7 +266,7 @@
AND ope.operator = #{cashierId}
</if>
</where>
- GROUP BY ope.payment_id, Date(ope.operate_dt)
+<!-- GROUP BY ope.payment_id, Date(ope.operate_dt)-->
</select>
<!-- 璐㈠姟瀵硅处瀹℃牳椤碉紝鏀堕摱鍛�+鏃ユ湡鍒嗙粍锛屾帓闄や氦鏄撶被鍨嬪垎缁勶紝璁板綍鏁�-->
@@ -284,17 +287,48 @@
<!--寮�鍗$郴缁熶氦鏄撶粺璁★紝鏀堕摱鍛�+鏃ユ湡+绫诲瀷鍒嗙粍-->
<select id="getSummaries" resultType="com.dy.pipIrrGlobal.voSe.VoTransactionStatistics">
- SELECT * FROM v_trade_summary
+ SELECT
+ CASE
+ WHEN ope.operate_type = 1 THEN '寮�鍗�'
+ WHEN ope.operate_type = 2 THEN '鍏呭��'
+ WHEN ope.operate_type = 3 THEN '閿�鍗�'
+ WHEN ope.operate_type = 4 THEN '琛ュ崱'
+ WHEN ope.operate_type = 5 THEN '杩旇繕'
+ WHEN ope.operate_type = 10 THEN '鍙嶅啓'
+ END AS operateType,
+ Date(ope.operate_dt) AS tradeDate,
+ COUNT(*) AS count,
+ (IFNULL(SUM(ope.trade_amount), 0) + IFNULL(SUM(ope.card_cost), 0)) AS received,
+ IFNULL(SUM(ope.gift), 0) AS gift,
+ IFNULL(sum(ope.refund_amount),0) AS refundAmount,
+ us.id AS cashierId
+ FROM se_card_operate ope
+ INNER JOIN ba_user us ON us.id = ope.operator
<where>
+ AND ope.operate_type IN(1,2,3,4,5,10)
+ AND ope.operate_valid = 2
<if test = "cashierId != null and cashierId > 0">
- AND cashierId = #{cashierId}
+ AND us.id = #{cashierId}
</if>
<if test = "timeStart != null and timeStop != null">
- AND Date(tradeDate) BETWEEN #{timeStart} AND #{timeStop}
+ AND Date(ope.operate_dt) BETWEEN #{timeStart} AND #{timeStop}
</if>
</where>
+ GROUP BY ope.operate_type, Date(ope.operate_dt), us.id
ORDER BY tradeDate
+
+<!-- SELECT * FROM v_trade_summary-->
+<!-- <where>-->
+<!-- <if test = "cashierId != null and cashierId > 0">-->
+<!-- AND cashierId = #{cashierId}-->
+<!-- </if>-->
+
+<!-- <if test = "timeStart != null and timeStop != null">-->
+<!-- AND Date(tradeDate) BETWEEN #{timeStart} AND #{timeStop}-->
+<!-- </if>-->
+<!-- </where>-->
+<!-- ORDER BY tradeDate-->
</select>
<!-- 鏍规嵁鏀堕摱鍛業D鍙婃棩鏈熻幏鍙栬储鍔″璐浜ゆ槗鏄庣粏璁板綍鏁�-->
--
Gitblit v1.8.0