feat: Enhance API path handling and normalize company industry names
This commit is contained in:
36
sql/normalize_company_industry.sql
Normal file
36
sql/normalize_company_industry.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
-- Normalize company industry names used by the dashboard industry analysis.
|
||||
-- The backend treats these three names as the canonical categories:
|
||||
-- 食品加工、纺织服装、装备制造
|
||||
|
||||
UPDATE company
|
||||
SET industry = '食品加工'
|
||||
WHERE del_flag = '0'
|
||||
AND industry IS NOT NULL
|
||||
AND (
|
||||
industry IN ('食品产业', '食品加工', '绿色有机食品', '食品/饮料/酒水')
|
||||
OR industry LIKE '%食品%'
|
||||
OR industry LIKE '%饮料%'
|
||||
OR industry LIKE '%酒%'
|
||||
);
|
||||
|
||||
UPDATE company
|
||||
SET industry = '纺织服装'
|
||||
WHERE del_flag = '0'
|
||||
AND industry IS NOT NULL
|
||||
AND (
|
||||
industry = '纺织服装'
|
||||
OR industry LIKE '%纺织%'
|
||||
OR industry LIKE '%服装%'
|
||||
);
|
||||
|
||||
UPDATE company
|
||||
SET industry = '装备制造'
|
||||
WHERE del_flag = '0'
|
||||
AND industry IS NOT NULL
|
||||
AND (
|
||||
industry = '装备制造'
|
||||
OR industry LIKE '%装备%'
|
||||
OR industry LIKE '%制造%'
|
||||
OR industry LIKE '%机械%'
|
||||
OR industry LIKE '%设备%'
|
||||
);
|
||||
Reference in New Issue
Block a user