预警导出
This commit is contained in:
+8
-5
@@ -112,10 +112,11 @@
|
||||
FROM sar_stand_warning AS warning
|
||||
LEFT JOIN sar_standards_info AS sarInfo on sarInfo.id=warning.STAND_ID
|
||||
LEFT JOIN sar_stand_attr_info AS attr on attr.STAND_ID=warning.STAND_ID
|
||||
LEFT JOIN ts_dictype as dicType on dicType.DIC_TYPE_CODE =attr.CLLX
|
||||
LEFT JOIN ts_dictype as dicType on (attr.CLLX = dicType.DIC_TYPE_CODE AND attr.CLLX !=null AND attr.CLLX != '')
|
||||
<where>
|
||||
POWER = '1'
|
||||
AND (MARK = 'stand')
|
||||
AND sarInfo.VALID_FLAG='0'
|
||||
<if test="idList != null and idList.size() > 0">
|
||||
AND
|
||||
warning.ID
|
||||
@@ -148,12 +149,13 @@
|
||||
FROM
|
||||
sar_stand_warning AS warning
|
||||
LEFT JOIN sar_standards_info AS sarInfo ON sarInfo.id = warning.STAND_ID
|
||||
LEFT JOIN sar_stand_items AS items ON items.STAND_ID = warning.STAND_ID
|
||||
LEFT JOIN sar_stand_items AS items ON items.ID = warning.ITEMS_ID
|
||||
LEFT JOIN sar_stand_attr_info AS attr ON attr.STAND_ID = warning.STAND_ID
|
||||
LEFT JOIN ts_dictype as dicType on dicType.DIC_TYPE_CODE =items.APPLY_ARCTIC
|
||||
LEFT JOIN ts_dictype as dicType on (dicType.DIC_TYPE_CODE = items.APPLY_ARCTIC AND items.APPLY_ARCTIC !=null AND items.APPLY_ARCTIC != '')
|
||||
<where>
|
||||
POWER = '1'
|
||||
AND (MARK = 'item')
|
||||
AND sarInfo.VALID_FLAG='0'
|
||||
<if test="idList != null and idList.size() > 0">
|
||||
AND
|
||||
warning.ID
|
||||
@@ -169,10 +171,11 @@
|
||||
WARNING_RESULT
|
||||
LEFT JOIN
|
||||
(
|
||||
SELECT law_id,MIN(SSRQ) SSRQ_MIN FROM warning_date
|
||||
GROUP BY warning_date.law_id
|
||||
SELECT item_id,law_id,MIN(SSRQ) SSRQ_MIN FROM warning_date
|
||||
GROUP BY warning_date.law_id,item_id
|
||||
) warning_date
|
||||
ON warning_date.law_id = WARNING_RESULT.STAND_ID
|
||||
AND warning_date.item_id = WARNING_RESULT.ITEMS_ID
|
||||
ORDER BY warning_date.SSRQ_MIN
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user