Explorar o código

运行数据-每日查获数量(总表)

chenshudong hai 1 día
pai
achega
119101358a

+ 12 - 12
airport-ledger/src/main/resources/mapper/ledger/LedgerSeizureStatsMapper.xml

@@ -96,7 +96,7 @@
96
 
96
 
97
     <select id="countSeizureTotalQuantity" parameterType="com.sundot.airport.ledger.domain.vo.CountQueryReqVO" resultType="com.sundot.airport.ledger.domain.vo.CountSeizureTotalQuantityResVO">
97
     <select id="countSeizureTotalQuantity" parameterType="com.sundot.airport.ledger.domain.vo.CountQueryReqVO" resultType="com.sundot.airport.ledger.domain.vo.CountSeizureTotalQuantityResVO">
98
         SELECT
98
         SELECT
99
-            record_date AS recordDate,
99
+        date(record_date) AS recordDate,
100
             <!-- 动态分组名称 -->
100
             <!-- 动态分组名称 -->
101
             <choose>
101
             <choose>
102
                 <when test="groupId != null">group_name AS groupName</when>
102
                 <when test="groupId != null">group_name AS groupName</when>
@@ -112,18 +112,18 @@
112
         <!-- 动态分组:重点!全为空时仅按日期分组 -->
112
         <!-- 动态分组:重点!全为空时仅按日期分组 -->
113
         GROUP BY
113
         GROUP BY
114
             <choose>
114
             <choose>
115
-                <when test="groupId != null">group_id, record_date, group_name</when>
116
-                <when test="teamId != null">team_id, record_date, team_name</when>
117
-                <when test="deptId != null">dept_id, record_date, dept_name</when>
118
-                <otherwise>record_date</otherwise>
115
+                <when test="groupId != null">group_id, date(record_date), group_name</when>
116
+                <when test="teamId != null">team_id, date(record_date), team_name</when>
117
+                <when test="deptId != null">dept_id, date(record_date), dept_name</when>
118
+                <otherwise>date(record_date)</otherwise>
119
             </choose>
119
             </choose>
120
-        ORDER BY record_date ASC
120
+        ORDER BY date(record_date) ASC
121
     </select>
121
     </select>
122
 
122
 
123
 
123
 
124
     <select id="countSeizureSingleQuantity" parameterType="com.sundot.airport.ledger.domain.vo.CountQueryReqVO" resultType="com.sundot.airport.ledger.domain.vo.CountSeizureSingleQuantityResVO">
124
     <select id="countSeizureSingleQuantity" parameterType="com.sundot.airport.ledger.domain.vo.CountQueryReqVO" resultType="com.sundot.airport.ledger.domain.vo.CountSeizureSingleQuantityResVO">
125
         SELECT
125
         SELECT
126
-            record_date AS recordDate,
126
+        date(record_date) AS recordDate,
127
             <!-- 动态显示维度名称:员工/小组/班组/部门 -->
127
             <!-- 动态显示维度名称:员工/小组/班组/部门 -->
128
             <choose>
128
             <choose>
129
                 <when test="groupId != null">inspector_name AS groupName</when>
129
                 <when test="groupId != null">inspector_name AS groupName</when>
@@ -139,12 +139,12 @@
139
         <!-- 动态分组,严格层级下钻 -->
139
         <!-- 动态分组,严格层级下钻 -->
140
         GROUP BY
140
         GROUP BY
141
             <choose>
141
             <choose>
142
-                <when test="groupId != null">inspector_id, record_date, inspector_name</when>
143
-                <when test="teamId != null">group_id, record_date, group_name</when>
144
-                <when test="deptId != null">team_id, record_date, team_name</when>
145
-                <otherwise>dept_id, record_date, dept_name</otherwise>
142
+                <when test="groupId != null">inspector_id, date(record_date), inspector_name</when>
143
+                <when test="teamId != null">group_id, date(record_date), group_name</when>
144
+                <when test="deptId != null">team_id, date(record_date), team_name</when>
145
+                <otherwise>dept_id, date(record_date), dept_name</otherwise>
146
             </choose>
146
             </choose>
147
-        ORDER BY record_date ASC
147
+        ORDER BY date(record_date) ASC
148
     </select>
148
     </select>
149
     <!-- 明细查询:动态下钻维度 -->
149
     <!-- 明细查询:动态下钻维度 -->
150
     <select id="statsTimeRangeItem" parameterType="com.sundot.airport.ledger.domain.vo.CountQueryReqVO" resultType="com.sundot.airport.ledger.domain.vo.SeizeItemVO">
150
     <select id="statsTimeRangeItem" parameterType="com.sundot.airport.ledger.domain.vo.CountQueryReqVO" resultType="com.sundot.airport.ledger.domain.vo.SeizeItemVO">