|
@@ -1,47 +1,62 @@
|
|
|
/**
|
|
/**
|
|
|
行社白名单功能
|
|
行社白名单功能
|
|
|
**/
|
|
**/
|
|
|
--- 添加是否是海洋标签字段
|
|
|
|
|
ALTER TABLE ai_tagging.aitag_tag_log ADD is_marine bit DEFAULT 0;
|
|
ALTER TABLE ai_tagging.aitag_tag_log ADD is_marine bit DEFAULT 0;
|
|
|
COMMENT ON COLUMN ai_tagging.aitag_tag_log.is_marine IS '是否匹配行社白名单,匹配上的默认隶属于海洋经济,在大模型处理阶段给予提示,没匹配上的不给提示,0:否,1:是';
|
|
COMMENT ON COLUMN ai_tagging.aitag_tag_log.is_marine IS '是否匹配行社白名单,匹配上的默认隶属于海洋经济,在大模型处理阶段给予提示,没匹配上的不给提示,0:否,1:是';
|
|
|
|
|
|
|
|
-- 添加法人行社代码字段
|
|
-- 添加法人行社代码字段
|
|
|
-ALTER TABLE ai_tagging.aitag_tag_log ADD org_code varchar(100);
|
|
|
|
|
-comment on column ai_tagging.aitag_tag_log.org_code is '法人行社代码';
|
|
|
|
|
|
|
+ALTER TABLE ai_tagging.aitag_tag_log ADD instucde varchar(100);
|
|
|
|
|
+comment on column ai_tagging.aitag_tag_log.instucde is '法人行社代码';
|
|
|
|
|
+ALTER TABLE ai_tagging.aitag_tag_log DROP COLUMN org_code;
|
|
|
|
|
+ALTER TABLE ai_tagging.aitag_tag_log ADD instucde_nm varchar(100);
|
|
|
|
|
+comment on column ai_tagging.aitag_tag_log.instucde_nm is '法人行社名称';
|
|
|
|
|
+ALTER TABLE ai_tagging.aitag_tag_log add company_nm varchar(100);
|
|
|
|
|
+comment on column ai_tagging.aitag_tag_log.company_nm is '企业名称';
|
|
|
|
|
+ALTER TABLE ai_tagging.aitag_tag_log add company_code varchar(100);
|
|
|
|
|
+comment on column ai_tagging.aitag_tag_log.company_code is '企业统一社会信用代码';
|
|
|
|
|
+ ALTER TABLE ai_tagging.aitag_tag_log add start_user_id varchar(100);
|
|
|
|
|
+comment on column ai_tagging.aitag_tag_log.start_user_id is '发起人ID';
|
|
|
|
|
+ ALTER TABLE ai_tagging.aitag_tag_log add start_user_nm varchar(100);
|
|
|
|
|
+comment on column ai_tagging.aitag_tag_log.start_user_nm is '发起人名字';
|
|
|
|
|
+ ALTER TABLE ai_tagging.aitag_tag_log add start_user_org varchar(100);
|
|
|
|
|
+comment on column ai_tagging.aitag_tag_log.start_user_org is '发起人机构代码';
|
|
|
|
|
+ ALTER TABLE ai_tagging.aitag_tag_log add start_user_endpoint varchar(100);
|
|
|
|
|
+comment on column ai_tagging.aitag_tag_log.start_user_endpoint is '发起人网点';
|
|
|
|
|
|
|
|
|
|
+DROP TABLE ai_tagging.ai_tagging.aitag_org_whitelist;
|
|
|
-- 创建行社白名单表
|
|
-- 创建行社白名单表
|
|
|
-CREATE TABLE ai_tagging.aitag_org_whitelist (
|
|
|
|
|
|
|
+CREATE TABLE ai_tagging.aitag_instucde_whitelist (
|
|
|
id varchar(100),
|
|
id varchar(100),
|
|
|
- org_name varchar(100),
|
|
|
|
|
- org_code varchar(100),
|
|
|
|
|
|
|
+ instucde_name varchar(100),
|
|
|
|
|
+ instucde_code varchar(100),
|
|
|
tag_type varchar(100),
|
|
tag_type varchar(100),
|
|
|
- CONSTRAINT aitag_org_whitelist_PK PRIMARY KEY (id)
|
|
|
|
|
|
|
+ CONSTRAINT aitag_instucde_whitelist_PK PRIMARY KEY (id)
|
|
|
);
|
|
);
|
|
|
-COMMENT ON TABLE ai_tagging.aitag_org_whitelist IS '行社白名单表';
|
|
|
|
|
-COMMENT ON COLUMN ai_tagging.aitag_org_whitelist.tag_type IS '标签类型,marine:海洋标签';
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('1', '福建福州农村商业银行股份有限公司', '901020300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('2', '福建长乐农村商业银行股份有限公司', '901060300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('3', '福建福清汇通农村商业银行股份有限公司', '901070300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('4', '福建平潭农村商业银行股份有限公司', '901080300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('5', '福建连江农村商业银行股份有限公司', '901090300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('6', '罗源县农村信用合作联社', '901100300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('7', '厦门农村商业银行股份有限公司', '902010200', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('8', '福建莆田农村商业银行股份有限公司', '904020300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('9', '福建宁德农村商业银行股份有限公司', '906020300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('10', '福鼎市农村信用合作联社', '906030300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('11', '霞浦县农村信用合作联社', '906040300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('12', '福安市农村信用合作联社', '906050300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('13', '泉州农村商业银行股份有限公司', '907020300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('14', '惠安县农村信用合作联社', '907030300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('15', '福建晋江农村商业银行股份有限公司', '907040300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('16', '福建石狮农村商业银行股份有限公司', '907060300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('17', '福建南安农村商业银行股份有限公司', '907070300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('18', '福建漳州农村商业银行股份有限公司', '908020300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('19', '福建龙海农村商业银行股份有限公司', '908030300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('20', '云霄县农村信用合作联社', '908040300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('21', '福建漳浦农村商业银行股份有限公司', '908050300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('22', '诏安县农村信用合作联社', '908060300', 'marine');
|
|
|
|
|
-INSERT INTO ai_tagging.aitag_org_whitelist (id, org_name, org_code, tag_type) VALUES ('23', '东山县农村信用合作联社', '908080300', 'marine');
|
|
|
|
|
|
|
+COMMENT ON TABLE ai_tagging.aitag_instucde_whitelist IS '行社白名单表';
|
|
|
|
|
+COMMENT ON COLUMN ai_tagging.aitag_instucde_whitelist.tag_type IS '标签类型,marine:海洋标签';
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('1', '福建福州农村商业银行股份有限公司', '901020300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('2', '福建长乐农村商业银行股份有限公司', '901060300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('3', '福建福清汇通农村商业银行股份有限公司', '901070300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('4', '福建平潭农村商业银行股份有限公司', '901080300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('5', '福建连江农村商业银行股份有限公司', '901090300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('6', '罗源县农村信用合作联社', '901100300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('7', '厦门农村商业银行股份有限公司', '902010200', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('8', '福建莆田农村商业银行股份有限公司', '904020300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('9', '福建宁德农村商业银行股份有限公司', '906020300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('10', '福鼎市农村信用合作联社', '906030300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('11', '霞浦县农村信用合作联社', '906040300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('12', '福安市农村信用合作联社', '906050300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('13', '泉州农村商业银行股份有限公司', '907020300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('14', '惠安县农村信用合作联社', '907030300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('15', '福建晋江农村商业银行股份有限公司', '907040300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('16', '福建石狮农村商业银行股份有限公司', '907060300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('17', '福建南安农村商业银行股份有限公司', '907070300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('18', '福建漳州农村商业银行股份有限公司', '908020300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('19', '福建龙海农村商业银行股份有限公司', '908030300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('20', '云霄县农村信用合作联社', '908040300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('21', '福建漳浦农村商业银行股份有限公司', '908050300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('22', '诏安县农村信用合作联社', '908060300', 'marine');
|
|
|
|
|
+INSERT INTO ai_tagging.aitag_instucde_whitelist (id, instucde_name, instucde_code, tag_type) VALUES ('23', '东山县农村信用合作联社', '908080300', 'marine');
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
预设规则的匹配,可以不用人工确认,直接通过推送给画像系统
|
|
预设规则的匹配,可以不用人工确认,直接通过推送给画像系统
|
|
@@ -82,4 +97,38 @@ INSERT INTO ai_tagging.aitag_predefined_rules (id, defined_rule, tag_type, tag_n
|
|
|
('rule_18', '海底管道运输', 'marine', '海洋交通运输业'),
|
|
('rule_18', '海底管道运输', 'marine', '海洋交通运输业'),
|
|
|
('rule_19', '海洋气象服务', 'marine', '海洋自然科学研究和试验发展'),
|
|
('rule_19', '海洋气象服务', 'marine', '海洋自然科学研究和试验发展'),
|
|
|
('rule_20', '海洋环境服务', 'marine', '海洋信息集成服务'),
|
|
('rule_20', '海洋环境服务', 'marine', '海洋信息集成服务'),
|
|
|
-('rule_21', '其他海洋服务', 'marine', '海洋技术服务');
|
|
|
|
|
|
|
+('rule_21', '其他海洋服务', 'marine', '海洋技术服务');
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ 企业白名单
|
|
|
|
|
+**/
|
|
|
|
|
+CREATE TABLE ai_tagging.aitag_company_whitelist (
|
|
|
|
|
+ id varchar(100) NOT NULL,
|
|
|
|
|
+ tag_name varchar(100),
|
|
|
|
|
+ tag_code varchar(100),
|
|
|
|
|
+ is_valid int,
|
|
|
|
|
+ create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
+ CONSTRAINT aitag_company_whitelist_pk PRIMARY KEY (id)
|
|
|
|
|
+);
|
|
|
|
|
+COMMENT ON TABLE ai_tagging.aitag_company_whitelist IS '企业白名单';
|
|
|
|
|
+COMMENT ON COLUMN ai_tagging.aitag_company_whitelist.tag_name is '标签名称';
|
|
|
|
|
+COMMENT ON COLUMN ai_tagging.aitag_company_whitelist.tag_code is '标签代码';
|
|
|
|
|
+COMMENT ON COLUMN ai_tagging.aitag_company_whitelist.is_valid is '0启用;1停用';
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ 企业列表
|
|
|
|
|
+**/
|
|
|
|
|
+CREATE TABLE ai_tagging.aitag_company_whitelist_detail(
|
|
|
|
|
+ id varchar(100) NOT NULL,
|
|
|
|
|
+ aitag_company_whitelist_id varchar(100),
|
|
|
|
|
+ tag_code varchar(100),
|
|
|
|
|
+ company_name varchar(100),
|
|
|
|
|
+ company_code varchar(100),
|
|
|
|
|
+ create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
+ CONSTRAINT aitag_company_whitelist_detail_pk PRIMARY KEY(id)
|
|
|
|
|
+);
|
|
|
|
|
+COMMENT ON TABLE ai_tagging.aitag_company_whitelist_detail IS '企业白名单明细';
|
|
|
|
|
+COMMENT ON COLUMN ai_tagging.aitag_company_whitelist_detail.aitag_company_whitelist_id is '外键';
|
|
|
|
|
+COMMENT ON COLUMN ai_tagging.aitag_company_whitelist_detail.tag_code is '标签代码';
|
|
|
|
|
+COMMENT ON COLUMN ai_tagging.aitag_company_whitelist_detail.company_name is '企业名称';
|
|
|
|
|
+COMMENT ON COLUMN ai_tagging.aitag_company_whitelist_detail.company_code is '企业统一社会信用代码';
|