You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
863 B
16 lines
863 B
-- 新增警情类型字段
|
|
-- non_economic: 非经侦类(非经侦类警情登记)
|
|
-- pending_review: 待审核类(经侦类登记 + 110系统流转至本系统)
|
|
|
|
ALTER TABLE t_alarm_report ADD COLUMN IF NOT EXISTS alarm_category varchar(32) DEFAULT '';
|
|
COMMENT ON COLUMN t_alarm_report.alarm_category IS '警情类型:non_economic-非经侦类 pending_review-待审核类';
|
|
|
|
UPDATE t_alarm_report SET alarm_category = 'non_economic'
|
|
WHERE disposal_status = 'non_economic' AND (alarm_category IS NULL OR alarm_category = '');
|
|
|
|
UPDATE t_alarm_report SET alarm_category = 'pending_review'
|
|
WHERE alarm_source = '110_transfer' AND (alarm_category IS NULL OR alarm_category = '');
|
|
|
|
UPDATE t_alarm_report SET alarm_category = 'pending_review'
|
|
WHERE (case_type_code IS NOT NULL AND case_type_code != '')
|
|
AND (alarm_category IS NULL OR alarm_category = '');
|
|
|