ソースを参照

bug修改,代码提交

jingyuanchao 10 ヶ月 前
コミット
e805533196

+ 35 - 34
project_data/sql/1.0.11/soc/soc.sql

@@ -51,39 +51,39 @@ ALTER TABLE  `iot_server_product`
 END IF;
 
 delete from iot_server_product;
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('01e50bb0-17cd-24bf-3db9-3a141541ea12', 'FSU_Theft', 'FSU 防盗传感器', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('055e9571-52b0-06ab-c359-3a14623b2d8d', 'FSU_DoPowerCollection', 'FSU 回路通电状态', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('06f8fc23-26c8-edc1-bd8b-3a141540c0fb', 'FSU_AirConditioner', 'FSU 空调', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('0a3fa02d-c677-4f8a-a053-4e30e592df7e', 'TALK_HOST', '对讲主机', 1, '[\r\n  \"Host_Talk\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('0f26e066-9e07-beb3-55bd-3a147bd0d913', 'FSU_DoPowerControlBoxButton', 'FSU DO8小时控电箱按钮', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('15367b47-d383-48aa-99ea-a1c5dc573056', 'FSU_DoPowerControl', 'FSU DO8小时控电', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('19ed86f7-780d-29ec-4bc7-3a13a7097ea1', 'VGSII_Hik', '海康视频存储设备2023年入围设备', 1, '[\r\n  \"Dvs\"\r\n]', '[\r\n  \"Hik\"\r\n]', '海康');
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('1b7adc13-af87-fe22-7d49-3a141540fad9', 'FSU_Water', 'FSU 水浸传感器', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('20fa2a1a-a069-4975-8d64-091a39539e02', 'DOOR_HOST', '门禁主机', 1, '[\r\n  \"Host_Door\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('2369b2eb-f0ae-7f68-f49c-3a0ad342f60a', 'InAnter_BM1600NTSmall', '英安特BM1600NTSmall报警主机', 1, '[\r\n  \"AlarmHost\"\r\n]', '[\r\n  \"GlobalNT2/NT3\"\r\n]', '英安特');
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('2f7b0f00-43b1-07b2-dfcd-3a0bba6d4ccb', 'Hik_DS19A', 'Hik_DS19A系列报警主机', 1, '[\r\n  \"AlarmHost\"\r\n]', '[\r\n  \"DS-19A\"\r\n]', '海康');
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('384287b5-f556-b9cc-e84e-3a1057095e04', 'HikModule', '海康报警网络模块', 1, '[\r\n  \"AlarmHost\"\r\n]', '[\r\n  \"Mta120\",\r\n	\"Mta128\"\r\n]', '海康报警网络模块');
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('51a1f179-8fcf-ea4f-988c-3a13f9904a04', 'FSU_Gateway', 'FSU主机', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"GXX-ZMAF-3100\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('54eb3a1c-8f7d-4b9e-9a5c-2e8f66750000', 'FSU_SmartMeter', 'FSU 智能电表', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('649e9822-b487-6b9f-865b-3a0ad341b9c0', 'FengYe_H402', '枫叶HD402报警主机', 1, '[\r\n  \"AlarmHost\"\r\n]', '[\r\n  \"HD402\"\r\n]', '枫叶');
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('6acce932-9e54-e3d3-5241-3a13d1d3584a', 'DetectionHost', '物联网主机产品,VIMD服务', 1, '[\r\n  \"DetectionHost\"\r\n]', '[\r\n  \"DetectionHost\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('6acce932-9e54-e3d3-5d4a-3a13d1d3584a', 'IoTServer', 'IoT内置产品,IoT服务', 1, '[\r\n  \"IoT\",\r\n  \"IoTServer\"\r\n]', '[\r\n  \"IoTServer\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('6ba7b810-9dad-11d1-80b4-00c04fd430c8', 'FSU_Infrared', 'FSU 红外传感器', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('73af892b-2bee-4126-b498-7460c483509d', 'FSU_ThreePhaseACVoltage', 'FSU 三相电电压传感器', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('783bb246-6ebe-7e69-e055-3a14adfe10c9', 'VGSII_DaHua_V1', '大华视频存储设备(通用设备)', 1, '[\r\n  \"Dvs\"\r\n]', '[\r\n  \"Normal\"\r\n]', '大华');
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('7a5f5e54-17d7-4c2e-99b2-e4d6181f8b62', 'FSU_Gas', 'FSU 燃气传感器', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('85659b02-4fe7-cb85-6b00-3a14153fec6e', 'FSU_Smoke', 'FSU 烟雾传感器', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('92467897-92ef-647f-e55e-3a13b7f3ca9a', 'VGSII_DaHua', '大华视频存储设备2023年入围设备', 1, '[\r\n  \"Dvs\"\r\n]', '[\r\n  \"DaHua\"\r\n]', '大华');
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('98308508-be46-8eb3-ff40-3a14153f55f9', 'FSU_TemperatureAndHumidity', 'FSU 温湿度传感器', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('a1ae8610-70d1-b856-5bdf-3a141540732d', 'FSU_Ups', 'UPS', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('abce638c-33c6-bc91-39dd-3a1415401bcd', 'FSU_DoorMagnetic', 'FSU 门磁传感器', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('bed76841-d3ee-2fd0-64ed-3a0d374167a5', 'HengTong_CKWU01C', '恒通CKWU01C报警主机', 1, '[\r\n  \"AlarmHost\"\r\n]', '[\r\n  \"CKWU01C\"\r\n]', '恒通');
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('ce00cabd-b2c2-8532-f56f-3a10556f2bfe', 'MtaOCX', '迈特安网络报警模块', 1, '[\r\n  \"AlarmHost\"\r\n]', '[\r\n  \"Mta120\",\r\n	\"Mta128\"\r\n]', '迈特安网络报警模块');
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('cead84cb-7d99-1b7f-b309-3a0ca885fbe5', 'CrossProcessDemo', 'CrossProcessDemo', 0, '[\r\n  \"AlarmHost\"\r\n]', NULL, NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('e9d22150-a123-c88d-568e-3a0cd6d1b434', 'HoneywellOCX_IPM', 'HoneywellOCX_IPM', 1, '[\r\n  \"AlarmHost\"\r\n]', '[\r\n  \"Standard\",\r\n  \"PT_23\",\r\n  \"Vista120\",\r\n  \"Vista10P\",\r\n  \"Vista20P\",\r\n  \"Super_23\",\r\n  \"Vista_Super\"\r\n]', '霍尼韦尔');
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('f6a73ea2-1cc7-d7ff-8018-3a0ad3408d98', 'DaHuaAlarmHost', 'DaHua报警主机', 1, '[\r\n  \"AlarmHost\"\r\n]', '[\r\n  \"ARC2008\",\r\n  \"ARC2016C\",\r\n  \"ARC2016C_V3\",\r\n  \"ARC9016C\",\r\n  \"ARC9016C_V3\"\r\n]', '大华');
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('f81d4fae-7dec-11d0-a765-00a0c91e6bf6', 'FSU_RollingShutterDoor', 'FSU 卷帘门传感器', 1, '[\r\n  \"FSU\"\r\n]', '[\r\n  \"Normal\"\r\n]', NULL);
-INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('f9c5d636-dac4-d515-dfbe-3a0d3da7d805', 'BOSCH_CMS', 'BOSCH_CMS报警主机', 1, '[\r\n  \"AlarmHost\"\r\n]', '[\r\n  \"CMS40\",\r\n	\"CMS41\"\r\n]', '博世');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('cead84cb-7d99-1b7f-b309-3a0ca885fbe5', 'CrossProcessDemo', 'CrossProcessDemo', 0, '[\"AlarmHost\"]', NULL, NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('f6a73ea2-1cc7-d7ff-8018-3a0ad3408d98', 'DaHuaAlarmHost', 'DaHua报警主机', 1, '[\"AlarmHost\"]', '[\"ARC2008\",\"ARC2016C\",\"ARC2016C_V3\",\"ARC9016C\",\"ARC9016C_V3\"]', '大华');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('bed76841-d3ee-2fd0-64ed-3a0d374167a5', 'HengTong_CKWU01C', '恒通CKWU01C报警主机', 1, '[\"AlarmHost\"]', '[\"CKWU01C\"]', '恒通');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('f9c5d636-dac4-d515-dfbe-3a0d3da7d805', 'BOSCH_CMS', 'BOSCH_CMS报警主机', 1, '[\"AlarmHost\"]', '[\"CMS40\",\"CMS41\"]', '博世');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('92467897-92ef-647f-e55e-3a13b7f3ca9a', 'VGSII_DaHua', '大华视频存储设备2023年入围设备', 1, '[\"Dvs\"]', '[\"DaHua\"]', '大华');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('2f7b0f00-43b1-07b2-dfcd-3a0bba6d4ccb', 'Hik_DS19A', 'Hik_DS19A系列报警主机', 1, '[\"AlarmHost\"]', '[\"DS-19A\"]', '海康');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('2369b2eb-f0ae-7f68-f49c-3a0ad342f60a', 'InAnter_BM1600NTSmall', '英安特BM1600NTSmall报警主机', 1, '[\"AlarmHost\"]', '[\"GlobalNT2/NT3\"]', '英安特');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('51a1f179-8fcf-ea4f-988c-3a13f9904a04', 'FSU_Gateway', 'FSU主机', 1, '[\"FSU\"]', '[\"GXX-ZMAF-3100\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('649e9822-b487-6b9f-865b-3a0ad341b9c0', 'FengYe_H402', '枫叶HD402报警主机', 1, '[\"AlarmHost\"]', '[\"HD402\"]', '枫叶');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('19ed86f7-780d-29ec-4bc7-3a13a7097ea1', 'VGSII_Hik', '海康视频存储设备2023年入围设备', 1, '[\"Dvs\"]', '[\"Hik\"]', '海康');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('6acce932-9e54-e3d3-5d4a-3a13d1d3584a', 'IoTServer', 'IoT内置产品,IoT服务', 1, '[\"IoT\",\"IoTServer\"]', '[\"IoTServer\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('ce00cabd-b2c2-8532-f56f-3a10556f2bfe', 'MtaOCX', '迈特安网络报警模块', 1, '[\"AlarmHost\"]', '[\"Mta120\",\"Mta128\"]', '迈特安网络报警模块');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('055e9571-52b0-06ab-c359-3a14623b2d8d', 'FSU_DoPowerCollection', 'FSU 回路通电状态', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('06f8fc23-26c8-edc1-bd8b-3a141540c0fb', 'FSU_AirConditioner', 'FSU 空调', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('0a3fa02d-c677-4f8a-a053-4e30e592df7e', 'TALK_HOST', '对讲主机', 1, '[\"Host_Talk\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('0f26e066-9e07-beb3-55bd-3a147bd0d913', 'FSU_DoPowerControlBoxButton', 'FSU DO8小时控电箱按钮', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('15367b47-d383-48aa-99ea-a1c5dc573056', 'FSU_DoPowerControl', 'FSU DO8小时控电', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('1b7adc13-af87-fe22-7d49-3a141540fad9', 'FSU_Water', 'FSU 水浸传感器', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('6ba7b810-9dad-11d1-80b4-00c04fd430c8', 'FSU_Infrared', 'FSU 红外传感器', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('73af892b-2bee-4126-b498-7460c483509d', 'FSU_ThreePhaseACVoltage', 'FSU 三相电电压传感器', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('783bb246-6ebe-7e69-e055-3a14adfe10c9', 'VGSII_DaHua_V1', '大华视频存储设备(通用设备)', 1, '[\"Dvs\"]', '[\"Normal\"]', '大华');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('7a5f5e54-17d7-4c2e-99b2-e4d6181f8b62', 'FSU_Gas', 'FSU 燃气传感器', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('85659b02-4fe7-cb85-6b00-3a14153fec6e', 'FSU_Smoke', 'FSU 烟雾传感器', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('98308508-be46-8eb3-ff40-3a14153f55f9', 'FSU_TemperatureAndHumidity', 'FSU 温湿度传感器', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('a1ae8610-70d1-b856-5bdf-3a141540732d', 'FSU_Ups', 'UPS', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('abce638c-33c6-bc91-39dd-3a1415401bcd', 'FSU_DoorMagnetic', 'FSU 门磁传感器', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('54eb3a1c-8f7d-4b9e-9a5c-2e8f66750000', 'FSU_SmartMeter', 'FSU 智能电表', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('20fa2a1a-a069-4975-8d64-091a39539e02', 'DOOR_HOST', '门禁主机', 1, '[\"Host_Door\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('f81d4fae-7dec-11d0-a765-00a0c91e6bf6', 'FSU_RollingShutterDoor', 'FSU 卷帘门传感器', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('01e50bb0-17cd-24bf-3db9-3a141541ea12', 'FSU_Theft', 'FSU 防盗传感器', 1, '[\"FSU\"]', '[\"Normal\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('e9d22150-a123-c88d-568e-3a0cd6d1b434', 'HoneywellOCX_IPM', 'HoneywellOCX_IPM', 1, '[\"AlarmHost\"]', '[\"Standard\",\"PT_23\",\"Vista120\",\"Vista10P\",\"Vista20P\",\"Super_23\",\"Vista_Super\"]', '霍尼韦尔');
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('6acce932-9e54-e3d3-5241-3a13d1d3584a', 'DetectionHost', '物联网主机产品,VIMD服务', 1, '[\"DetectionHost\"]', '[\"DetectionHost\"]', NULL);
+INSERT INTO `iot_server_product`(`id`, `name`, `display_name`, `enabled`, `categories`, `models`, `producer`) VALUES ('384287b5-f556-b9cc-e84e-3a1057095e04', 'HikModule', '海康报警网络模块', 1, '[\"AlarmHost\"]', '[\"Mta120\",\"Mta128\",\"DS-PMA-CMKT\"]', '海康报警网络模块');
 
 IF NOT EXISTS(SELECT *
                       FROM information_schema.columns
@@ -111,7 +111,6 @@ end if;
                         AND column_name = 'sync_status') THEN
 ALTER TABLE `iot_device_info`
     ADD COLUMN `sync_status` int(0) NULL DEFAULT 0 COMMENT '下发状态;0未下发,1下发中,2下发成功,3下发失败' AFTER `enable`;
-update iot_device_info set sync_status = 2;
 end if;
 
 
@@ -172,6 +171,8 @@ END ??
 DELIMITER ;
 CALL schema_change();
 
+update iot_device_info set sync_status = 2;
+
 -- 新增设备同步状态字典
 delete from sys_dict_type where dict_type='sync_status';
 delete from sys_dict_data where dict_type='sync_status';

+ 1 - 1
soc-modules/soc-modules-host/src/main/java/com/xunmei/host/websocket/enums/DeviceNetStatusEnum.java → soc-common/soc-common-core/src/main/java/com/xunmei/common/core/enums/iot/DeviceNetStatusEnum.java

@@ -1,4 +1,4 @@
-package com.xunmei.host.websocket.enums;
+package com.xunmei.common.core.enums.iot;
 
 import lombok.AllArgsConstructor;
 import lombok.Getter;

+ 10 - 4
soc-modules/soc-modules-host/src/main/java/com/xunmei/host/iot/service/impl/IotDeviceInfoServiceImpl.java

@@ -44,7 +44,7 @@ import com.xunmei.host.websocket.dto.dvs.DevicePushResult;
 import com.xunmei.host.websocket.dto.dvs.DvsBaseInfo;
 import com.xunmei.host.websocket.dto.dvs.SubDeviceInfo;
 import com.xunmei.host.websocket.enums.DeviceCacheEnum;
-import com.xunmei.host.websocket.enums.DeviceNetStatusEnum;
+import com.xunmei.common.core.enums.iot.DeviceNetStatusEnum;
 import com.xunmei.host.websocket.enums.ProductEnums;
 import com.xunmei.host.websocket.enums.TopicTypeEnums;
 import com.xunmei.host.websocket.redis.delay.RedisDelayQueueHandle;
@@ -338,7 +338,7 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
     public WebsocketResult execute(WebsocketExecuteReq req) {
         try {
-            LogUtils.SOCKET_BASE_DEVICE_INFO.info("收到消息:{}", JacksonUtils.toJSONString(req));
+            LogUtils.SYNC_DEVICE.info("收到消息:{}", JacksonUtils.toJSONString(req));
             final Object data = req.getData();
             if (ObjectUtil.isEmpty(data)) {
                 return WebsocketResult.replySuccess(req);
@@ -374,7 +374,7 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
                     return WebsocketResult.replyError(req, ErrorMsgConstants.ERROR_ROUTE);
             }
         } catch (Exception e) {
-            LogUtils.SOCKET_BASE_DEVICE_INFO.error("设备基础数据,处理失败", e);
+            LogUtils.SYNC_DEVICE.error("设备基础数据,处理失败", e);
             throw new RuntimeException("设备基础数据,处理失败", e);
         }
         return WebsocketResult.replySuccess(req);
@@ -1380,8 +1380,14 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
         object.put("deviceId", deviceInfo.getId());
         object.put("name", deviceInfo.getDeviceName());
         object.put("equipmentTypeId", deviceTypeEnum.getCode());
-        //object.put("producer", deviceInfo.getManufacturer());
+        final Long deviceBrand = deviceInfo.getDeviceBrand();
+        final SysMultiLayerDictionary dictionary = baseMapper.selectSysMultiLayerDictionaryById(deviceBrand);
+        if (dictionary!=null){
+            object.put("producer", dictionary.getName());
+        }
         object.put("netAddress", extend.getNetAddress());
+        object.put("deviceCode", deviceInfo.getDeviceCode());
+        object.put("deviceProduct", deviceInfo.getDeviceProduct());
         object.put("deviceType", deviceTypeEnum.name());
         object.put("enable", ObjectUtil.equal(0, deviceInfo.getEnable()));
 

+ 1 - 1
soc-modules/soc-modules-host/src/main/java/com/xunmei/host/iot/service/impl/IotDeviceStatusServiceImpl.java

@@ -28,7 +28,7 @@ import com.xunmei.host.server.service.IotServerInfoService;
 import com.xunmei.host.websocket.constant.WebSocketConstants;
 import com.xunmei.host.websocket.dto.WebsocketExecuteReq;
 import com.xunmei.host.websocket.dto.WebsocketResult;
-import com.xunmei.host.websocket.enums.DeviceNetStatusEnum;
+import com.xunmei.common.core.enums.iot.DeviceNetStatusEnum;
 import com.xunmei.host.websocket.enums.ProductEnums;
 import com.xunmei.host.websocket.service.RouterService;
 import com.xunmei.system.api.domain.SysOrg;

+ 10 - 0
soc-modules/soc-modules-host/src/main/java/com/xunmei/host/north/controller/HostController.java

@@ -9,14 +9,17 @@ import com.xunmei.host.iot.service.IIotDeviceInfoService;
 import com.xunmei.host.iot.service.IotCameraMissionRuleService;
 import com.xunmei.host.north.service.IotWebsocketMsgService;
 import com.xunmei.host.protection.service.IIotAlarmHostService;
+import com.xunmei.host.websocket.holder.WebSocketSessionHolder;
 import com.xunmei.host.websocket.service.WebsocketService;
 import com.xunmei.system.api.Eto.SubSystemControlEto;
+import com.xunmei.system.api.util.LogUtils;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.io.IOException;
 import java.util.List;
+import java.util.Set;
 
 
 /**
@@ -46,6 +49,7 @@ public class HostController {
     @ApiOperation("主动获取所有的主机基本信息")
     @GetMapping({"/getDevices"})
     public AjaxResult baseDeviceInfo() {
+        LogUtils.SYNC_DEVICE.info("平台主动获取主机上基础设备信息");
         websocketService.getDevices();
         return AjaxResult.success();
     }
@@ -144,4 +148,10 @@ public class HostController {
         websocketMsgService.deletedRetryMsg(date);
         return AjaxResult.success();
     }
+
+    @GetMapping("/hostInfo")
+    AjaxResult hostInfo(){
+        final Set<String> sessionsAll = WebSocketSessionHolder.getSessionsAll();
+        return AjaxResult.success(sessionsAll);
+    }
 }

+ 2 - 1
soc-modules/soc-modules-host/src/main/java/com/xunmei/host/websocket/service/impl/WebsocketServiceImpl.java

@@ -36,9 +36,10 @@ public class WebsocketServiceImpl implements WebsocketService {
         final WebsocketResult result = WebsocketResult.invokeHostServer(topic, new JSONObject(), WebSocketConstants.GET_DEVICES_SERVICES, new JSONObject());
         final Set<String> set = getAllIotCode();
         if (set.isEmpty()) {
+            LogUtils.SYNC_DEVICE.error("获取设备基础信息时,无任何巡检主机在线,获取失败");
             return;
         }
-        LogUtils.WEBSOCKET_MSG.info("获取设备基础信息,目标主机code:{}", JSON.toJSONString(set));
+        LogUtils.SYNC_DEVICE.info("获取设备基础信息,目标主机code:{}", JSON.toJSONString(set));
         for (String token : set) {
             sendMsgByTokens(result, token);
         }

+ 1 - 4
soc-modules/soc-modules-iot/src/main/java/com/xunmei/iot/controller/IotDeviceInfoController.java

@@ -8,7 +8,6 @@ import com.xunmei.iot.dto.deviceInfo.EditNetHostDeviceDto;
 import com.xunmei.iot.dto.deviceInfo.IotDeviceInfoPageDto;
 import com.xunmei.iot.service.IIotDeviceInfoService;
 import com.xunmei.iot.vo.deviceInfo.IotDeviceInfoPageVo;
-import com.xunmei.system.api.RemoteHostService;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
 
@@ -21,8 +20,6 @@ public class IotDeviceInfoController {
 
     @Resource
     private IIotDeviceInfoService deviceInfoService;
-    @Resource
-    private RemoteHostService remoteHostService;
 
     @ApiOperation("iot设备列表")
     @GetMapping({"/page"})
@@ -88,7 +85,7 @@ public class IotDeviceInfoController {
     @ApiOperation("从主机拉取基础设备")
     @GetMapping({"/baseDeviceGet"})
     AjaxResult baseDeviceGet() {
-        return AjaxResult.success(remoteHostService.getDevices());
+        return deviceInfoService.baseDeviceGet();
     }
 
     @ApiOperation("同步设备")

+ 4 - 0
soc-modules/soc-modules-iot/src/main/java/com/xunmei/iot/service/IIotDeviceInfoService.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.xunmei.common.core.domain.iot.domain.IotServerProduct;
 import com.xunmei.common.core.enums.iot.BaseDeviceTypeEnum;
+import com.xunmei.common.core.web.domain.AjaxResult;
 import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.iot.dto.deviceInfo.*;
 import com.xunmei.iot.vo.deviceInfo.DeviceDetailInfoVo;
@@ -49,4 +50,7 @@ public interface IIotDeviceInfoService extends IService<IotDeviceInfo> {
     Integer syncDevice(Long id);
 
     void deletedDevice(Long deviceId);
+
+    AjaxResult baseDeviceGet();
+
 }

+ 9 - 0
soc-modules/soc-modules-iot/src/main/java/com/xunmei/iot/service/impl/IotDeviceInfoServiceImpl.java

@@ -17,8 +17,10 @@ import com.xunmei.common.core.domain.iot.domain.IotAlarmDefenceArea;
 import com.xunmei.common.core.domain.iot.domain.IotAlarmSubsystem;
 import com.xunmei.common.core.domain.iot.domain.IotServerProduct;
 import com.xunmei.common.core.enums.iot.BaseDeviceTypeEnum;
+import com.xunmei.common.core.enums.iot.DeviceNetStatusEnum;
 import com.xunmei.common.core.utils.DateUtils;
 import com.xunmei.common.core.utils.StringUtils;
+import com.xunmei.common.core.web.domain.AjaxResult;
 import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.common.redis.utils.RedisUtils;
 import com.xunmei.common.security.utils.SecurityUtils;
@@ -532,6 +534,7 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
             deviceInfo.setOrgName(sysOrg.getShortName());
             deviceInfo.setOrgPath(sysOrg.getPath());
             deviceInfo.setDeleted(0);
+            deviceInfo.setNetStatus(DeviceNetStatusEnum.UNKNOWN.getValue());
             switch (typeEnum) {
                 case Host_Talk:
                     deviceInfo.setDeviceProduct("TALK_HOST");
@@ -552,6 +555,7 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
         BeanUtil.copyProperties(req, deviceInfo);
         deviceInfo.setUpdateTime(new Date());
         deviceInfo.setUpdateBy(sysUser.getId().toString());
+        deviceInfo.setSyncStatus(DeviceSyncStatus.NOT_SYNC.getCode());
         saveOrUpdate(deviceInfo);
         extendService.updateNetHostExtendByDeviceId(deviceInfo.getId(), req);
         return 1;
@@ -585,6 +589,11 @@ public class IotDeviceInfoServiceImpl extends ServiceImpl<IotDeviceInfoMapper, I
     }
 
     @Override
+    public AjaxResult baseDeviceGet() {
+        return remoteHostService.getDevices();
+    }
+
+    @Override
     @Transactional(rollbackFor = Exception.class)
     public void deletedDevice(Long deviceId) {
         final IotDeviceInfo deviceInfo = getById(deviceId);

+ 3 - 0
soc-modules/soc-modules-iot/src/main/java/com/xunmei/iot/vo/deviceInfo/IotDeviceInfoPageVo.java

@@ -55,4 +55,7 @@ public class IotDeviceInfoPageVo implements Serializable {
 
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date updateTime;
+
+    @ApiModelProperty(value = "ip地址")
+    private String ip;
 }

+ 7 - 3
soc-modules/soc-modules-iot/src/main/resources/mapper/IotDeviceInfoMapper.xml

@@ -6,10 +6,13 @@
             d.*,
             o.affiliated_area AS firstOrgName,
             o.affiliated_bank AS secondOrgName,
-            o.short_name AS orgName
+            o.short_name AS orgName,
+            ie.net_address as ip,
+            ifnull(d.net_status,0) as netStatus
         FROM
             iot_device_info d
-            LEFT JOIN sys_org o ON o.id = d.org_id
+            inner JOIN sys_org o ON o.id = d.org_id
+            left JOIN iot_device_info_extend ie  ON ie.iot_token=d.iot_token and ie.device_id=d.id and ie.deleted=0
         where d.deleted = 0
             <if test="req.deviceName !=null and req.deviceName !=''">
                 and d.device_name like concat('%',#{req.deviceName},'%')
@@ -45,7 +48,8 @@
             o.affiliated_bank AS secondOrgName,
             o.short_name AS orgName,
             e.net_address AS deviceAddress,
-            e.`port` AS devicePort
+            e.`port` AS devicePort,
+            ifnull(d.net_status,0) as netStatus
         FROM
             iot_device_info d
             LEFT JOIN sys_org o ON o.id = d.org_id