lifuquan 2 years ago
parent
commit
eb7b68a451

+ 46 - 0
doc/部署文档/建表语句/cfm.cfg_0_4g_siteinfo.sql

@@ -0,0 +1,46 @@
+-- cfm.cfg_0_4g_siteinfo definition
+
+-- Drop table
+
+-- DROP TABLE cfm.cfg_0_4g_siteinfo;
+
+CREATE TABLE cfm.cfg_0_4g_siteinfo (
+	sdate date NULL,
+	city_code numeric NULL,
+	city_name varchar(200) NULL,
+	district_code numeric NULL,
+	district_name varchar(200) NULL,
+	network_name varchar(200) NULL,
+	phystation_address varchar(200) NULL,
+	bbu_name varchar(200) NULL,
+	enbid numeric NULL,
+	cell_name varchar(200) NULL,
+	cell_id numeric NULL,
+	cgi varchar(200) NULL,
+	lon numeric NULL,
+	lat numeric NULL,
+	direction numeric NULL,
+	height numeric NULL,
+	m_downtilt numeric NULL,
+	e_downtilt numeric NULL,
+	station_type varchar(200) NULL,
+	isdigitalindoor varchar(200) NULL,
+	down_freq numeric NULL,
+	vender varchar(200) NULL,
+	own_schoolyard varchar(200) NULL,
+	toweraddress_code varchar(200) NULL,
+	property varchar(200) NULL,
+	scene varchar(200) NULL,
+	is_scenesite varchar(200) NULL,
+	marketing_network varchar(200) NULL,
+	terminalamount_5g varchar(200) NULL,
+	sector_incoming varchar(200) NULL,
+	is_busy varchar(200) NULL,
+	is_alive numeric NULL,
+	is_alive_update_time date NULL,
+	construction varchar(200) NULL,
+	is_same_address varchar(200) NULL,
+	same_address_sites numeric NULL,
+	is_same_address_ct varchar(200) NULL
+)
+DISTRIBUTED BY (sdate);

+ 46 - 0
doc/部署文档/建表语句/cfm.cfg_0_5g_siteinfo.sql

@@ -0,0 +1,46 @@
+-- cfm.cfg_0_5g_siteinfo definition
+
+-- Drop table
+
+-- DROP TABLE cfm.cfg_0_5g_siteinfo;
+
+CREATE TABLE cfm.cfg_0_5g_siteinfo (
+	sdate date NULL,
+	city_code numeric NULL,
+	city_name varchar(200) NULL,
+	district_code numeric NULL,
+	district_name varchar(200) NULL,
+	network_name varchar(200) NULL,
+	phystation_address varchar(200) NULL,
+	station_name varchar(200) NULL,
+	gnbid numeric NULL,
+	cell_name varchar(200) NULL,
+	cell_id numeric NULL,
+	cgisai varchar(200) NULL,
+	lon numeric NULL,
+	lat numeric NULL,
+	direction numeric NULL,
+	height numeric NULL,
+	m_downtilt numeric NULL,
+	e_downtilt numeric NULL,
+	station_type varchar(200) NULL,
+	isdigitalindoor varchar(200) NULL,
+	down_freq numeric NULL,
+	vender varchar(200) NULL,
+	own_schoolyard varchar(200) NULL,
+	toweraddress_code varchar(200) NULL,
+	property varchar(200) NULL,
+	scene varchar(200) NULL,
+	is_scenesite varchar(200) NULL,
+	marketing_network varchar(200) NULL,
+	terminalamount_5g varchar(200) NULL,
+	sector_incoming varchar(200) NULL,
+	is_busy varchar(200) NULL,
+	is_alive numeric NULL,
+	is_alive_update_time date NULL,
+	construction varchar(200) NULL,
+	is_same_address varchar(200) NULL,
+	same_address_sites numeric NULL,
+	is_same_address_ct varchar(200) NULL
+)
+DISTRIBUTED BY (sdate);

+ 15 - 0
doc/部署文档/建表语句/customer_service.cfg_cell_info.sql

@@ -0,0 +1,15 @@
+-- customer_service.cfg_cell_info definition
+
+-- Drop table
+
+-- DROP TABLE customer_service.cfg_cell_info;
+
+CREATE TABLE customer_service.cfg_cell_info (
+	cell_id varchar(200) NULL,
+	site_name varchar(200) NULL,
+	city_name varchar(200) NULL,
+	longitude varchar(200) NULL,
+	latitude varchar(200) NULL,
+	tac varchar(200) NULL
+)
+DISTRIBUTED RANDOMLY;

+ 50 - 0
doc/部署文档/建表语句/customer_service.cfg_p_netconf_std.sql

@@ -0,0 +1,50 @@
+-- customer_service.cfg_p_netconf_std definition
+
+-- Drop table
+
+-- DROP TABLE customer_service.cfg_p_netconf_std;
+
+CREATE TABLE customer_service.cfg_p_netconf_std (
+	id varchar(400) NULL,
+	city_id varchar(400) NULL,
+	city_name varchar(400) NULL,
+	area_id varchar(400) NULL,
+	core_ne_name varchar(400) NULL,
+	radio_ne_name varchar(400) NULL,
+	site_name varchar(400) NULL,
+	site_id varchar(400) NULL,
+	cell_no varchar(400) NULL,
+	cell_name varchar(400) NULL,
+	cell_id varchar(400) NULL,
+	ecgi int8 NULL,
+	gnb_cu_id varchar(400) NULL,
+	gnb_du_id varchar(400) NULL,
+	gsm_cell_id varchar(400) NULL,
+	network_type varchar(400) NULL,
+	type_5g varchar(400) NULL,
+	tac varchar(400) NULL,
+	cover_type varchar(400) NULL,
+	nodeb_type varchar(400) NULL,
+	rac varchar(400) NULL,
+	lac varchar(400) NULL,
+	grid varchar(400) NULL,
+	areatype varchar(400) NULL,
+	sub_areatype varchar(400) NULL,
+	area3 varchar(400) NULL,
+	longitude varchar(400) NULL,
+	latitude varchar(400) NULL,
+	vendor varchar(400) NULL,
+	height varchar(400) NULL,
+	downtilt varchar(400) NULL,
+	azimuth varchar(400) NULL,
+	fr varchar(400) NULL,
+	scramber varchar(400) NULL,
+	province_id varchar(400) NULL,
+	bsbusip varchar(400) NULL,
+	bsbusip_1 varchar(400) NULL,
+	isanchor varchar(400) NULL,
+	"operator" varchar(400) NULL,
+	isshare varchar(400) NULL,
+	slice_type varchar(400) NULL
+)
+DISTRIBUTED RANDOMLY;

+ 51 - 3
doc/需求文档/工参更新需求汇总.md

@@ -1,7 +1,55 @@
 # 工参更新需求汇总
 
-1. 周期性更新投诉系统工参
+## 需更新数据
 
-2. 更新工参包括公共工参表(投诉3线在用)及智能客服工参表(对接北一的接口用,上线需谨慎)
+1. 数据库信息
 
-3. 数据源当前未定,一个是黄岳负责的工参治理,另一个是李勇负责的。
+    - 测试环境数据库
+
+        测试环境数据库URL jdbc:postgresql://192.168.50.5:5432/sqmmt
+
+        sqmdb/sqmdb_1QAZ
+
+    - 正式环境数据库
+
+        正式环境数据库URL jdbc:postgresql://192.168.70.109:5432/sqmmt
+
+        sqmdb/sqmdb_1QAZ
+
+2. 更新周期
+
+    暂定为每周更新一次,周一凌晨1点更新,如果更新出错,必须有提醒机制,必须有人关注提醒信息,第二天早上8点前要完成恢复流程。
+
+3. 更新内容
+
+    主要更新四张表,分别是`cfm.cfg_0_4g_siteinfo`,`cfm.cfg_0_5g_siteinfo`,`customer_service.cfg_cell_info`,`customer_service.cfg_p_netconf_std`
+
+    `cfm.cfg_0_4g_siteinfo`,`cfm.cfg_0_5g_siteinfo` 两张表是简单更新
+
+    `customer_service.cfg_cell_info`,`customer_service.cfg_p_netconf_std` 两张表需要从`cfm.cfg_0_4g_siteinfo`,`cfm.cfg_0_5g_siteinfo`取出需要的数据列进行更新。
+
+    ***当前存在一个特殊情况,需要把`cfm.cfg_0_4g_siteinfo_gx`和`cfm.cfg_0_5g_siteinfo_gx`两个表中,按照唯一id不存在的数据也更新到`customer_service.cfg_cell_info`,`customer_service.cfg_p_netconf_std`两张表中***
+
+## 数据源信息
+
+***由于新数据源不具备,当前开发采用黄岳的工参治理数据源进行***
+
+- 李勇
+
+20220811 未拿到数据表名,数据尚未开始定时更新,只有测试数据
+
+数据库URL: jdbc:postgresql://10.17.182.35:5432/sqmmt
+
+pmparse
+abc123!
+
+- 黄岳工参治理
+
+数据库url: jdbc:postgresql://192.168.10.9:5432/sqmmt
+
+账号:pmparse
+密码:Richr00t#
+
+4G工参表 o2p.cfg_0_4g_siteinfo
+
+5G工参表 o2p.cfg_0_5g_siteinfo

+ 134 - 0
doc/需求文档/更新智能客服工参的参考.md

@@ -0,0 +1,134 @@
+
+```sql
+-- customer_service.cfg_p_netconf_std 更新
+select
+ '' as id,
+ city_code as city_id,
+ city_name as city_name ,
+ district_name as area_id,
+ '' as core_ne_name,
+ '' as radio_ne_name,
+ bbu_name as site_name,
+ enbid as site_id,
+ cell_id as cell_no,
+ cell_name as cell_name ,
+ 46001000000000 + enbid * 256 + cell_id as cell_id ,
+ enbid * 256 + cell_id as ecgi,
+ '' as gnb_cu_id,
+ '' as gnb_du_id,
+ '' as gsm_cell_id,
+ 4 as network_type,
+ '' as type_5g,
+ '' as tac,
+ (case
+  station_type when '宏站' then '室外'
+  else '室内'
+ end) as cover_type,
+ '' as nodeb_type,
+ '' as rac,
+ '' as lac,
+ '' as grid,
+ scene as areatype,
+ '' as sub_areatype,
+ '' as area3,
+ lon as longitude,
+ lat as latitude,
+ vender as vendor,
+ height as height ,
+ m_downtilt + e_downtilt as downtilt,
+ direction as azimuth,
+ down_freq as fr,
+ '' as scramber,
+ '河北省' as province_id,
+ '' as bsbusip,
+ '' as bsbusip_1,
+ '' as isanchor,
+ construction as "operator",
+ '' as isshare,
+ '' as slice_type
+from
+ cfm.cfg_0_4g_siteinfo cgs 
+```
+
+```sql
+-- customer_service.cfg_p_netconf_std 更新
+select
+ '' as id,
+ city_code as city_id,
+ city_name as city_name ,
+ district_name as area_id,
+ '' as core_ne_name,
+ '' as radio_ne_name,
+ station_name as site_name,
+ gnbid as site_id,
+ cell_id as cell_no,
+ cell_name as cell_name ,
+ 4600100000000000 + gnbid * 4096 + cell_id as cell_id ,
+ gnbid * 4096 + cell_id as ecgi,
+ '' as gnb_cu_id,
+ '' as gnb_du_id,
+ '' as gsm_cell_id,
+ 4 as network_type,
+ '' as type_5g,
+ '' as tac,
+ (case
+  station_type when '宏站' then '室外'
+  else '室内'
+ end) as cover_type,
+ '' as nodeb_type,
+ '' as rac,
+ '' as lac,
+ '' as grid,
+ scene as areatype,
+ '' as sub_areatype,
+ '' as area3,
+ lon as longitude,
+ lat as latitude,
+ vender as vendor,
+ height as height ,
+ m_downtilt + e_downtilt as downtilt,
+ direction as azimuth,
+ down_freq as fr,
+ '' as scramber,
+ '河北省' as province_id,
+ '' as bsbusip,
+ '' as bsbusip_1,
+ '' as isanchor,
+ construction as "operator",
+ '' as isshare,
+ '' as slice_type
+from
+ cfm.cfg_0_5g_siteinfo cgs
+```
+
+```sql
+select '' as id, city_code as city_id, city_name as city_name , district_name as area_id, '' as core_ne_name, '' as radio_ne_name, bbu_name as site_name, enbid as site_id, cell_id as cell_no, cell_name as cell_name , 46001000000000 + enbid * 256 + cell_id as cell_id , enbid * 256 + cell_id as ecgi, '' as gnb_cu_id, '' as gnb_du_id, '' as gsm_cell_id, 4 as network_type, '' as type_5g, '' as tac, (case  station_type when '宏站' then '室外'  else '室内' end) as cover_type, '' as nodeb_type, '' as rac, '' as lac, '' as grid, scene as areatype, '' as sub_areatype, '' as area3, lon as longitude, lat as latitude, vender as vendor, height as height , m_downtilt + e_downtilt as downtilt, direction as azimuth, down_freq as fr, '' as scramber, '河北省' as province_id, '' as bsbusip, '' as bsbusip_1, '' as isanchor, construction as "operator", '' as isshare, '' as slice_type from cfm.cfg_0_4g_siteinfo cgs;
+```
+
+```sql
+select  '' as id,  city_code as city_id,  city_name as city_name ,  district_name as area_id,  '' as core_ne_name,  '' as radio_ne_name,  station_name as site_name,  gnbid as site_id,  cell_id as cell_no, cell_name as cell_name , 4600100000000000 + gnbid * 4096 + cell_id as cell_id ,  gnbid * 4096 + cell_id as ecgi,  '' as gnb_cu_id,  '' as gnb_du_id,  '' as gsm_cell_id,  4 as network_type,  '' as type_5g,  '' as tac,  (case   station_type when '宏站' then '室外'   else '室内'  end) as cover_type,  '' as nodeb_type,  '' as rac,  '' as lac,  '' as grid,  scene as areatype,  '' as sub_areatype,  '' as area3,  lon as longitude,  lat as latitude,  vender as vendor,  height as height ,  m_downtilt + e_downtilt as downtilt,  direction as azimuth,  down_freq as fr,  '' as scramber,  '河北省' as province_id,  '' as bsbusip,  '' as bsbusip_1,  '' as isanchor,  construction as "operator",  '' as isshare,  '' as slice_type from  cfm.cfg_0_5g_siteinfo cgs;  
+```
+
+```sql
+select cell_id, site_name, city_name , longitude , latitude , tac from customer_service.cfg_p_netconf_std;
+```
+
+```sh
+psql
+
+\c sqmmt
+
+# 5G工参
+\copy (select  '' as id,  city_code as city_id,  city_name as city_name ,  district_name as area_id,  '' as core_ne_name,  '' as radio_ne_name,  station_name as site_name,  gnbid as site_id,  cell_id as cell_no, cell_name as cell_name , 4600100000000000 + gnbid * 4096 + cell_id as cell_id ,  gnbid * 4096 + cell_id as ecgi,  '' as gnb_cu_id,  '' as gnb_du_id,  '' as gsm_cell_id,  4 as network_type,  '' as type_5g,  '' as tac,  (case   station_type when '宏站' then '室外'   else '室内'  end) as cover_type,  '' as nodeb_type,  '' as rac,  '' as lac,  '' as grid,  scene as areatype,  '' as sub_areatype,  '' as area3,  lon as longitude,  lat as latitude,  vender as vendor,  height as height ,  m_downtilt + e_downtilt as downtilt,  direction as azimuth,  down_freq as fr,  '' as scramber,  '河北省' as province_id,  '' as bsbusip,  '' as bsbusip_1,  '' as isanchor,  construction as "operator",  '' as isshare,  '' as slice_type from  cfm.cfg_0_5g_siteinfo cgs) TO '/data1/cfg_0_5g_siteinfo.csv' with (FORMAT csv, NULL '',DELIMITER ',', HEADER true);
+
+# 4G工参
+\copy (select '' as id, city_code as city_id, city_name as city_name , district_name as area_id, '' as core_ne_name, '' as radio_ne_name, bbu_name as site_name, enbid as site_id, cell_id as cell_no, cell_name as cell_name , 46001000000000 + enbid * 256 + cell_id as cell_id , enbid * 256 + cell_id as ecgi, '' as gnb_cu_id, '' as gnb_du_id, '' as gsm_cell_id, 4 as network_type, '' as type_5g, '' as tac, (case  station_type when '宏站' then '室外'  else '室内' end) as cover_type, '' as nodeb_type, '' as rac, '' as lac, '' as grid, scene as areatype, '' as sub_areatype, '' as area3, lon as longitude, lat as latitude, vender as vendor, height as height , m_downtilt + e_downtilt as downtilt, direction as azimuth, down_freq as fr, '' as scramber, '河北省' as province_id, '' as bsbusip, '' as bsbusip_1, '' as isanchor, construction as "operator", '' as isshare, '' as slice_type from cfm.cfg_0_4g_siteinfo cgs) TO '/data1/cfg_0_4g_siteinfo.csv' with (FORMAT csv, NULL '',DELIMITER ',', HEADER true);
+
+# 备份
+\copy (select * from customer_service.cfg_p_netconf_std cpns) TO '/data1/cfg_p_netconf_std_20220704_bk.csv' with (FORMAT csv, NULL '',DELIMITER ',', HEADER true);
+
+\copy (select * from customer_service.cfg_cell_info) TO '/data1/cfg_cell_info_20220704_bk.csv' with (FORMAT csv, NULL '',DELIMITER ',', HEADER true);
+
+# cfg_cell_info
+\copy (select cell_id, site_name, city_name , longitude , latitude , tac from customer_service.cfg_p_netconf_std) TO '/data1/cfg_cell_info.csv' with (FORMAT csv, NULL '',DELIMITER ',', HEADER true);
+```