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