|
|
|
@ -624,23 +624,39 @@ |
|
|
|
<if test="bo.num != null and bo.num != ''"> |
|
|
|
AND stat.totalCount >= #{bo.num} |
|
|
|
</if> |
|
|
|
ORDER BY |
|
|
|
CASE |
|
|
|
WHEN er.district IS NULL OR er.district = '' THEN 2 |
|
|
|
WHEN area.dict_sort IS NULL THEN 1 |
|
|
|
ELSE 0 |
|
|
|
END, |
|
|
|
area.dict_sort, |
|
|
|
er.district, |
|
|
|
CASE |
|
|
|
WHEN er.street IS NULL OR er.street = '' THEN 2 |
|
|
|
WHEN str.dict_sort IS NULL THEN 1 |
|
|
|
ELSE 0 |
|
|
|
END, |
|
|
|
str.dict_sort, |
|
|
|
er.street, |
|
|
|
er.enforcement_time DESC |
|
|
|
|
|
|
|
<!-- orderByColumn 有值 → 走白名单映射(避免 ${} 注入);没值 → 默认按区域-街道-时间排序 --> |
|
|
|
<choose> |
|
|
|
<when test="bo.orderByColumn != null and bo.orderByColumn != ''"> |
|
|
|
<choose> |
|
|
|
<when test="bo.orderByColumn == 'totalCount'">stat.totalCount</when> |
|
|
|
<when test="bo.orderByColumn == 'enterpriseName'">er.enterprise_name</when> |
|
|
|
<when test="bo.orderByColumn == 'enterpriseNumber'">er.enterprise_number</when> |
|
|
|
<when test="bo.orderByColumn == 'bureauDeptName'">er.bureau_dept_name</when> |
|
|
|
<when test="bo.orderByColumn == 'district'">er.district</when> |
|
|
|
<when test="bo.orderByColumn == 'street'">er.street</when> |
|
|
|
<when test="bo.orderByColumn == 'enforcementTime'">er.enforcement_time</when> |
|
|
|
<otherwise>stat.totalCount</otherwise> |
|
|
|
</choose> |
|
|
|
<if test="bo.isAsc == 'desc'">desc</if> |
|
|
|
</when> |
|
|
|
<otherwise> |
|
|
|
CASE |
|
|
|
WHEN er.district IS NULL OR er.district = '' THEN 2 |
|
|
|
WHEN area.dict_sort IS NULL THEN 1 |
|
|
|
ELSE 0 |
|
|
|
END, |
|
|
|
area.dict_sort, |
|
|
|
er.district, |
|
|
|
CASE |
|
|
|
WHEN er.street IS NULL OR er.street = '' THEN 2 |
|
|
|
WHEN str.dict_sort IS NULL THEN 1 |
|
|
|
ELSE 0 |
|
|
|
END, |
|
|
|
str.dict_sort, |
|
|
|
er.street, |
|
|
|
er.enforcement_time DESC |
|
|
|
</otherwise> |
|
|
|
</choose> |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 执法分析-详情(指定企业的执法明细聚合) --> |
|
|
|
|