|
|
@@ -152,10 +152,10 @@
|
|
152
|
152
|
</where>
|
|
153
|
153
|
GROUP BY
|
|
154
|
154
|
<choose>
|
|
155
|
|
- <when test="groupId != null">inspector_id</when>
|
|
156
|
|
- <when test="teamId != null">group_id</when>
|
|
157
|
|
- <when test="deptId != null">team_id</when>
|
|
158
|
|
- <otherwise>dept_id</otherwise>
|
|
|
155
|
+ <when test="groupId != null">inspector_id, inspector_name</when>
|
|
|
156
|
+ <when test="teamId != null">group_id, group_name</when>
|
|
|
157
|
+ <when test="deptId != null">team_id, team_name</when>
|
|
|
158
|
+ <otherwise>dept_id, dept_name</otherwise>
|
|
159
|
159
|
</choose>
|
|
160
|
160
|
ORDER BY seizeNum DESC
|
|
161
|
161
|
</select>
|
|
|
@@ -169,17 +169,17 @@
|
|
169
|
169
|
</where>
|
|
170
|
170
|
</select>
|
|
171
|
171
|
|
|
172
|
|
- <select id="countSeizeSubjectCategoryQuantity" parameterType="com.sundot.airport.ledger.domain.vo.CountQueryReqVO" resultType="com.sundot.airport.ledger.domain.vo.SeizeCategoryQuantityVO">
|
|
173
|
|
- SELECT item_category AS categoryName, IFNULL(SUM(item_quantity), 0) AS categoryNum
|
|
|
172
|
+ <select id="countSeizeSubjectItemQuantity" parameterType="com.sundot.airport.ledger.domain.vo.CountQueryReqVO" resultType="com.sundot.airport.ledger.domain.vo.SeizeCategoryQuantityVO">
|
|
|
173
|
+ SELECT item_name AS itemName, IFNULL(SUM(item_quantity), 0) AS itemNum
|
|
174
|
174
|
FROM ledger_seizure_stats
|
|
175
|
175
|
<where>
|
|
176
|
176
|
<include refid="FILTER_FIXED_CRITERIA_SQL"/>
|
|
177
|
177
|
<!-- 过滤空类别,避免脏数据 -->
|
|
178
|
|
- AND item_category IS NOT NULL
|
|
179
|
|
- AND item_category != ''
|
|
|
178
|
+ AND item_name IS NOT NULL
|
|
|
179
|
+ AND item_name != ''
|
|
180
|
180
|
</where>
|
|
181
|
|
- GROUP BY item_category
|
|
182
|
|
- ORDER BY categoryNum DESC
|
|
|
181
|
+ GROUP BY item_name
|
|
|
182
|
+ ORDER BY itemNum DESC
|
|
183
|
183
|
</select>
|
|
184
|
184
|
|
|
185
|
185
|
<select id="countSeizeAreaQuantity" parameterType="com.sundot.airport.ledger.domain.vo.CountQueryReqVO" resultType="com.sundot.airport.ledger.domain.vo.SeizureAreaVO">
|
|
|
@@ -196,7 +196,9 @@
|
|
196
|
196
|
|
|
197
|
197
|
<sql id="FILTER_FIXED_CRITERIA_SQL">
|
|
198
|
198
|
del_flag = '0'
|
|
199
|
|
- AND record_date BETWEEN #{startDate} AND #{endDate}
|
|
|
199
|
+ <if test="startDate != null and endDate != null">
|
|
|
200
|
+ AND record_date BETWEEN #{startDate,jdbcType=DATE} AND #{endDate,jdbcType=DATE}
|
|
|
201
|
+ </if>
|
|
200
|
202
|
<include refid="FILTER_CRITERIA_SQL"/>
|
|
201
|
203
|
</sql>
|
|
202
|
204
|
|