Browse Source

北向接口删除 branchId参数

jingyuanchao 1 năm trước cách đây
mục cha
commit
1fd8fb0ec5
28 tập tin đã thay đổi với 180 bổ sung188 xóa
  1. 1 3
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/north/NorthError.java
  2. 27 30
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/controller/DataController.java
  3. 17 17
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/controller/ProtectionController.java
  4. 26 28
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/controller/VideoDataController.java
  5. 10 10
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/EquipmentSyncService.java
  6. 1 1
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IIotDeviceService.java
  7. 1 1
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IIotDvrChannelService.java
  8. 1 1
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IVideoDaysCheckService.java
  9. 1 1
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IVideoDiagnosisRecordService.java
  10. 1 1
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IVideoIntegrityCheckService.java
  11. 5 4
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotAlarmDefenceAreaService.java
  12. 2 2
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotAlarmSubsystemService.java
  13. 1 1
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotDeviceDetectionService.java
  14. 1 1
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotDvrDiskService.java
  15. 1 1
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotDvrHardDiskDetectionService.java
  16. 2 2
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotSensorService.java
  17. 11 10
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotAlarmDefenceAreaServiceImpl.java
  18. 21 21
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotAlarmSubSystemServiceImpl.java
  19. 1 1
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDeviceDetectionServiceImpl.java
  20. 2 2
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDeviceServiceImpl.java
  21. 11 11
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDvrChannelServiceImpl.java
  22. 9 10
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDvrDiskServiceImpl.java
  23. 1 1
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDvrHardDiskDetectionServiceImpl.java
  24. 14 14
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotSensorServiceImpl.java
  25. 3 3
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/VideoDaysCheckServiceImpl.java
  26. 1 2
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/VideoDiagnosisRecordServiceImpl.java
  27. 3 3
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/VideoIntegrityCheckServiceImpl.java
  28. 5 6
      soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/util/CheckDataUtil.java

+ 1 - 3
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/north/NorthError.java

@@ -62,14 +62,12 @@ public class NorthError extends Model<NorthError> implements Serializable {
     /**
      * 构造函数
      * @param msgId
-     * @param branchId
      * @param interfacePath
      * @param data
      * @param errorMsg
      */
-    public NorthError(String msgId, String branchId, String interfacePath, Object data, String errorMsg) {
+    public NorthError(String msgId, String interfacePath, Object data, String errorMsg) {
         this.msgId = msgId;
-        this.branchId = branchId;
         this.interfacePath = interfacePath;
         this.errorData = JSON.toJSONString(data);
         this.errorMsg = errorMsg;

+ 27 - 30
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/controller/DataController.java

@@ -58,7 +58,6 @@ public class DataController {
      *  处理逻辑:
      *      先逻辑删除source = 1(北向接口同步过来的数据) deleted = 1
      *      然后更新接收到的数据 deleted = 0
-     * @param branchId
      * @param msgId
      * @param deviceReceivePageDto
      * @return ReceiveErrorDto
@@ -66,16 +65,16 @@ public class DataController {
      * @time 2022/8/17 17:05
      */
     @ApiOperation("设备信息同步")
-    @PostMapping({"/api/{branchId}/data/equipmentList"})
-    public ReceiveErrorDto equipmentList(@PathVariable String branchId, String msgId, @RequestBody DataPageDto<DeviceDto> deviceReceivePageDto) {
+    @PostMapping({"/api/data/equipmentList"})
+    public ReceiveErrorDto equipmentList(String msgId, @RequestBody DataPageDto<DeviceDto> deviceReceivePageDto) {
         rabbitMsgIdService.sendMsgId(msgId, "/data/equipmentList", "设备信息同步");
-        LogUtils.BASE_INFO_EQUIPMENT.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "设备信息同步:/api/data/equipmentList/", branchId, msgId, JSON.toJSONString(deviceReceivePageDto));
+        LogUtils.BASE_INFO_EQUIPMENT.info("【北向接口-{}】【msgId:{}】【接收参数:{}】", "设备信息同步:/api/data/equipmentList/", msgId, JSON.toJSONString(deviceReceivePageDto));
         try {
-            ReceiveErrorDto errorDto = iotDeviceService.saveData(deviceReceivePageDto, msgId,branchId);
-            LogUtils.BASE_INFO_EQUIPMENT.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "设备信息同步:/api/data/equipmentList/", branchId, msgId, JSON.toJSONString(errorDto));
+            ReceiveErrorDto errorDto = iotDeviceService.saveData(deviceReceivePageDto, msgId);
+            LogUtils.BASE_INFO_EQUIPMENT.info("【北向接口-{}】【msgId:{}】【返回参数:{}】", "设备信息同步:/api/data/equipmentList/", msgId, JSON.toJSONString(errorDto));
             return errorDto;
         } catch (Exception e) {
-            LogUtils.BASE_INFO_EQUIPMENT.info("【北向接口-{}】【branchId:{}】【msgId:{}】【异常原因:{}】", "设备信息同步:/api/data/equipmentList/", branchId, msgId, e);
+            LogUtils.BASE_INFO_EQUIPMENT.info("【北向接口-{}】【msgId:{}】【异常原因:{}】", "设备信息同步:/api/data/equipmentList/", msgId, e);
             e.printStackTrace();
         }
         return ReceiveErrorDto.error("数据处理异常");
@@ -87,7 +86,6 @@ public class DataController {
      * 处理逻辑 ,
      * 1.逻辑删除录像机的摄像机数据 deleted = 1
      * 2.更新录像机的摄像机数据 deleted = 0
-     * @param branchId
      * @param msgId
      * @param deviceDtos
      * @return ReceiveErrorDto
@@ -95,18 +93,18 @@ public class DataController {
      * @time 2022/8/17 17:21
      */
     @ApiOperation("通道信息同步")
-    @PostMapping({"/api/{branchId}/data/channelList"})
-    public ReceiveErrorDto channelList(@PathVariable String branchId, String msgId, @RequestBody List<DeviceDto> deviceDtos) {
+    @PostMapping({"/api/data/channelList"})
+    public ReceiveErrorDto channelList(String msgId, @RequestBody List<DeviceDto> deviceDtos) {
         rabbitMsgIdService.sendMsgId(msgId, "/data/channelList", "通道信息同步");
-        LogUtils.BASE_INFO_CHANNEL.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "通道信息同步:/api/data/channelList", branchId, msgId, JSONArray.toJSONString(deviceDtos));
+        LogUtils.BASE_INFO_CHANNEL.info("【北向接口-{}】【msgId:{}】【接收参数:{}】", "通道信息同步:/api/data/channelList", msgId, JSONArray.toJSONString(deviceDtos));
         ReceiveErrorDto errorDto = new ReceiveErrorDto();
         try {
-            errorDto = this.iotDvrChannelService.saveChannel(deviceDtos, branchId, msgId, SecurityConstants.INNER);
-            LogUtils.BASE_INFO_CHANNEL.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "设备信息同步:/api/data/channelList", branchId, msgId, JSON.toJSONString(errorDto));
+            errorDto = this.iotDvrChannelService.saveChannel(deviceDtos, msgId);
+            LogUtils.BASE_INFO_CHANNEL.info("【北向接口-{}】【msgId:{}】【返回参数:{}】", "设备信息同步:/api/data/channelList", msgId, JSON.toJSONString(errorDto));
             return errorDto;
         } catch (Exception e) {
             e.printStackTrace();
-            LogUtils.BASE_INFO_CHANNEL.error("【北向接口-{}】【branchId:{}】【msgId:{}】【异常原因:{}】", "设备信息同步:/api/data/channelList", branchId, msgId, e);
+            LogUtils.BASE_INFO_CHANNEL.error("【北向接口-{}】【msgId:{}】【异常原因:{}】", "设备信息同步:/api/data/channelList", msgId, e);
             return ReceiveErrorDto.error("msgId 异常");
         }
 
@@ -121,35 +119,35 @@ public class DataController {
 
 
     @ApiOperation(value = "传感器通用设备信息同步", notes = "直连主机传感器")
-    @PostMapping({"/api/{branchId}/data/sensorCommonList"})
-    public ReceiveErrorDto sensor(@PathVariable String branchId, String msgId, @RequestBody DataPageDto<SensorDto> sensors) {
-        LogUtils.DIRECT_HOST_SENSOR.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "接受传感器通用设备信息同步:/api/data/sensorCommonList", branchId, msgId, JSON.toJSONString(sensors));
+    @PostMapping({"/api/data/sensorCommonList"})
+    public ReceiveErrorDto sensor(String msgId, @RequestBody DataPageDto<SensorDto> sensors) {
+        LogUtils.DIRECT_HOST_SENSOR.info("【北向接口-{}】【msgId:{}】【接收参数:{}】", "接受传感器通用设备信息同步:/api/data/sensorCommonList", msgId, JSON.toJSONString(sensors));
         ReceiveErrorDto errorDto = ReceiveErrorDto.success();
         try {
-            errorDto = this.iotSensorService.saveDirectHost(sensors, branchId, msgId);
+            errorDto = this.iotSensorService.saveDirectHost(sensors, msgId);
         } catch (Exception e) {
             e.printStackTrace();
             LogUtils.DIRECT_HOST_SENSOR.error("保存失败,{}", e);
             return ReceiveErrorDto.error("保存失败:" + e);
         }
-        LogUtils.DIRECT_HOST_SENSOR.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "接受传感器通用设备信息同步:/api/data/sensorCommonList", branchId, msgId, JSON.toJSONString(errorDto));
+        LogUtils.DIRECT_HOST_SENSOR.info("【北向接口-{}】【msgId:{}】【返回参数:{}】", "接受传感器通用设备信息同步:/api/data/sensorCommonList", msgId, JSON.toJSONString(errorDto));
         return errorDto;
     }
 
 
     @ApiOperation("传感器通用设备实时状态")
-    @PostMapping({"/api/{branchId}/status/sensorCommon"})
-    public ReceiveErrorDto status(@PathVariable String branchId, String msgId, @RequestBody DataPageDto<SensorStatusDto> statuses) {
-        LogUtils.DIRECT_HOST_SENSOR_STATUS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "接受传感器通用设备实时状态信息同步:/api/status/sensorCommon", branchId, msgId, JSON.toJSONString(statuses));
+    @PostMapping({"/api/status/sensorCommon"})
+    public ReceiveErrorDto status(String msgId, @RequestBody DataPageDto<SensorStatusDto> statuses) {
+        LogUtils.DIRECT_HOST_SENSOR_STATUS.info("【北向接口-{}】【msgId:{}】【接收参数:{}】", "接受传感器通用设备实时状态信息同步:/api/status/sensorCommon", msgId, JSON.toJSONString(statuses));
         ReceiveErrorDto errorDto = ReceiveErrorDto.success();
         try {
-            errorDto = this.iotSensorService.saveDirectHostStatus(statuses, branchId, msgId);
+            errorDto = this.iotSensorService.saveDirectHostStatus(statuses, msgId);
         } catch (Exception e) {
             e.printStackTrace();
             LogUtils.DIRECT_HOST_SENSOR_STATUS.error("保存失败,{}", e);
             return ReceiveErrorDto.error("保存失败:" + e);
         }
-        LogUtils.DIRECT_HOST_SENSOR_STATUS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "接受传感器通用设备实时状态信息同步:/api/status/sensorCommon", branchId, msgId, JSON.toJSONString(errorDto));
+        LogUtils.DIRECT_HOST_SENSOR_STATUS.info("【北向接口-{}】【msgId:{}】【返回参数:{}】", "接受传感器通用设备实时状态信息同步:/api/status/sensorCommon", msgId, JSON.toJSONString(errorDto));
         return errorDto;
     }
 
@@ -158,24 +156,23 @@ public class DataController {
      * 主动上报一次恢复信息。
      * 粒度:每个录像机或网络设备网络情况为一个数据包
      *
-     * @param branchId
      * @param msgId
      * @param networkDeviceDetectionEditDto
      * @return
      */
     @ApiOperation("网络设备检测")
-    @PostMapping({"/api/{branchId}/status/network"})
-    ReceiveErrorDto network(@PathVariable String branchId, String msgId, @RequestBody NetworkDeviceDetectionEditDto networkDeviceDetectionEditDto) {
+    @PostMapping({"/api/status/network"})
+    ReceiveErrorDto network(String msgId, @RequestBody NetworkDeviceDetectionEditDto networkDeviceDetectionEditDto) {
         rabbitMsgIdService.sendMsgId(msgId, "/status/network", "网络设备检测");
-        LogUtils.STATUS_INFO_NETWORK.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "网络设备检测:/api/status/network", branchId, msgId, JSON.toJSONString(networkDeviceDetectionEditDto));
+        LogUtils.STATUS_INFO_NETWORK.info("【北向接口-{}】【msgId:{}】【接收参数:{}】", "网络设备检测:/api/status/network", msgId, JSON.toJSONString(networkDeviceDetectionEditDto));
         ReceiveErrorDto result = ReceiveErrorDto.success();
         try {
-            result = this.networkDeviceDetectionService.saveData(networkDeviceDetectionEditDto, msgId, branchId);
+            result = this.networkDeviceDetectionService.saveData(networkDeviceDetectionEditDto, msgId);
         } catch (Exception e) {
             e.printStackTrace();
             LogUtils.STATUS_INFO_NETWORK.error("保存失败,{}", e);
         }
-        LogUtils.STATUS_INFO_NETWORK.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "网络设备检测:/api/status/network", branchId, msgId, JSON.toJSONString(result));
+        LogUtils.STATUS_INFO_NETWORK.info("【北向接口-{}】【msgId:{}】【返回参数:{}】", "网络设备检测:/api/status/network", msgId, JSON.toJSONString(result));
         return result;
 
     }

+ 17 - 17
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/controller/ProtectionController.java

@@ -32,24 +32,25 @@ public class ProtectionController {
     private IotAlarmSubsystemService protectionService;
     @Resource
     private IotAlarmDefenceAreaService defenceAreService;
+
     @ApiOperation("报警主机子系统及防区信息同步")
-    @PostMapping({"/api/{branchId}/data/defenceareaList"})
-    public ReceiveErrorDto defenceareaList(@PathVariable String branchId, String msgId, @RequestBody  DataPageDto<DefenceAreaDto> request) {
+    @PostMapping({"/api/data/defenceareaList"})
+    public ReceiveErrorDto defenceareaList(String msgId, @RequestBody DataPageDto<DefenceAreaDto> request) {
         rabbitMsgIdService.sendMsgId(msgId, "/data/defenceareaList", "报警主机子系统及防区信息同步");
-        LogUtils.BASE_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "报警主机子系统及防区信息同步:/api/data/defenceareaList", branchId, msgId, JSONArray.toJSONString(request));
+        LogUtils.BASE_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "报警主机子系统及防区信息同步:/api/data/defenceareaList", msgId, JSONArray.toJSONString(request));
         ReceiveErrorDto errorDto = ReceiveErrorDto.success();
         try {
             try {
-                errorDto = this.protectionService.defenceAreaList(request, branchId, msgId);
+                errorDto = this.protectionService.defenceAreaList(request, msgId);
             } catch (Exception e) {
                 e.printStackTrace();
                 LogUtils.BASE_INFO_DEFENCEAREA.error("保存失败,{}", e);
             }
-            LogUtils.BASE_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "报警主机子系统及防区信息同步:/api/data/defenceareaList", branchId, msgId, JSON.toJSONString(errorDto));
+            LogUtils.BASE_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "报警主机子系统及防区信息同步:/api/data/defenceareaList", msgId, JSON.toJSONString(errorDto));
             return errorDto;
         } catch (Exception e) {
             e.printStackTrace();
-            LogUtils.BASE_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【异常原因:{}】", "报警主机子系统及防区信息同步:/api/data/defenceareaList", branchId, msgId, e.getMessage());
+            LogUtils.BASE_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【异常原因:{}】", "报警主机子系统及防区信息同步:/api/data/defenceareaList", msgId, e.getMessage());
             return ReceiveErrorDto.error("数据处理异常");
         }
     }
@@ -58,37 +59,36 @@ public class ProtectionController {
      * 频率:每次检查完成后,布防状态发生了改变,就上报推送一次。
      * 粒度:每个组织机构的每个防区为一个数据包
      *
-     * @param branchId
      * @param msgId
      * @param protectionEditDto
      * @return
      */
     @ApiOperation("接收报警主机-子系统布撤防数据")
-    @PostMapping({"/api/{branchId}/status/defencearea"})
-    ReceiveErrorDto info(@PathVariable String branchId, String msgId, @RequestBody ProtectionEditDto protectionEditDto) {
+    @PostMapping({"/api/status/defencearea"})
+    ReceiveErrorDto info(String msgId, @RequestBody ProtectionEditDto protectionEditDto) {
         rabbitMsgIdService.sendMsgId(msgId, "/status/defencearea", "布撤防数据");
-        LogUtils.STATUS_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "接收布防数据:/api/status/defencearea", branchId, msgId, JSON.toJSONString(protectionEditDto));
+        LogUtils.STATUS_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "接收布防数据:/api/status/defencearea", msgId, JSON.toJSONString(protectionEditDto));
         ReceiveErrorDto errorDto = ReceiveErrorDto.success();
         try {
-            errorDto = this.protectionService.saveData(protectionEditDto, msgId, branchId);
+            errorDto = this.protectionService.saveData(protectionEditDto, msgId);
         } catch (Exception e) {
             e.printStackTrace();
             LogUtils.STATUS_INFO_DEFENCEAREA.error("保存错误,{}", e);
         }
-        LogUtils.STATUS_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "接收布防数据:/api/status/defencearea", branchId, msgId, JSON.toJSONString(errorDto));
+        LogUtils.STATUS_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "接收布防数据:/api/status/defencearea", msgId, JSON.toJSONString(errorDto));
         return errorDto;
     }
 
     @ApiOperation("接收防区传感器报警信息")
-    @PostMapping({"/api/{branchId}/status/sensor"})
-    public ReceiveErrorDto sensor(@PathVariable String branchId, String msgId, @RequestBody  SensorDataDto request) {
+    @PostMapping({"/api/status/sensor"})
+    public ReceiveErrorDto sensor(String msgId, @RequestBody SensorDataDto request) {
         rabbitMsgIdService.sendMsgId(msgId, "/status/sensor", "接收防区传感器报警信息");
-        LogUtils.STATUS_INFO_STATUS_SENSOR.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "接收防区传感器报警信息:/api/status/sensor", branchId, msgId, JSON.toJSONString(request));
+        LogUtils.STATUS_INFO_STATUS_SENSOR.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "接收防区传感器报警信息:/api/status/sensor", msgId, JSON.toJSONString(request));
         ReceiveErrorDto errorDto = ReceiveErrorDto.success();
         try {
-            errorDto=  this.defenceAreService.saveData(branchId,msgId,request);
+            errorDto = this.defenceAreService.saveData(msgId, request);
         } catch (Exception e) {
-            LogUtils.STATUS_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "接收防区传感器报警信息:/api/status/sensor", branchId, msgId, JSON.toJSONString(errorDto));
+            LogUtils.STATUS_INFO_DEFENCEAREA.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "接收防区传感器报警信息:/api/status/sensor", msgId, JSON.toJSONString(errorDto));
             throw new RuntimeException(e);
         }
         return errorDto;

+ 26 - 28
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/controller/VideoDataController.java

@@ -40,25 +40,24 @@ public class VideoDataController {
     @Resource
     IotDvrDiskService dvrDiskService;
     @ApiOperation("录像完整性检查")
-    @PostMapping({"/api/{branchId}/video/complete"})
-    public ReceiveErrorDto complete(@PathVariable String branchId, String msgId, @RequestBody VideoIntegrityCheckDto videoIntegrityCheckDto) {
+    @PostMapping({"/api/video/complete"})
+    public ReceiveErrorDto complete( String msgId, @RequestBody VideoIntegrityCheckDto videoIntegrityCheckDto) {
         rabbitMsgIdService.sendMsgId(msgId,"/video/complete","录像完整性检查");
 
-        LogUtils.STATUS_INFO_VIDEO_COMPLETE.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "录像完整性检查:/api/video/complete", branchId, msgId, JSONArray.toJSONString(videoIntegrityCheckDto));
+        LogUtils.STATUS_INFO_VIDEO_COMPLETE.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "录像完整性检查:/api/video/complete", msgId, JSONArray.toJSONString(videoIntegrityCheckDto));
         ReceiveErrorDto result = ReceiveErrorDto.success();
         try{
-            result = this.videoIntegrityCheckService.saveData(videoIntegrityCheckDto, msgId, branchId);
+            result = this.videoIntegrityCheckService.saveData(videoIntegrityCheckDto, msgId);
         }catch (Exception e){
             e.printStackTrace();
             LogUtils.STATUS_INFO_VIDEO_COMPLETE.error("保存失败,{}",e);
         }
-        LogUtils.STATUS_INFO_VIDEO_COMPLETE.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "录像完整性检查:/api/video/complete", branchId, msgId, JSONArray.toJSONString(result));
+        LogUtils.STATUS_INFO_VIDEO_COMPLETE.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "录像完整性检查:/api/video/complete", msgId, JSONArray.toJSONString(result));
         return result;
     }
 
     /***
      *
-     * @param branchId
      * @param msgId
      * @param videoDaysCheckDto
      * @return ReceiveErrorDto
@@ -66,40 +65,40 @@ public class VideoDataController {
      * @time 2022/8/18 rr
      */
     @ApiOperation("录像机天数检查")
-    @PostMapping({"/api/{branchId}/video/daysInfo"})
-    public ReceiveErrorDto daysInfo(@PathVariable String branchId, String msgId, @RequestBody VideoDaysCheckDto videoDaysCheckDto) {
+    @PostMapping({"/api/video/daysInfo"})
+    public ReceiveErrorDto daysInfo( String msgId, @RequestBody VideoDaysCheckDto videoDaysCheckDto) {
         rabbitMsgIdService.sendMsgId(msgId,"/video/daysInfo","录像机天数检查");
-        LogUtils.STATUS_INFO_VIDEO_DAYS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "录像机天数检查:/api/video/daysInfo", branchId, msgId, JSONArray.toJSONString(videoDaysCheckDto));
+        LogUtils.STATUS_INFO_VIDEO_DAYS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "录像机天数检查:/api/video/daysInfo", msgId, JSONArray.toJSONString(videoDaysCheckDto));
         ReceiveErrorDto errorDto = ReceiveErrorDto.success();
         try {
-            errorDto = this.videoDaysCheckService.saveData(videoDaysCheckDto, msgId, branchId);
+            errorDto = this.videoDaysCheckService.saveData(videoDaysCheckDto, msgId);
         }catch (Exception e){
             e.printStackTrace();
             LogUtils.STATUS_INFO_VIDEO_DAYS.error("保存失败,{}",e);
         }
-        LogUtils.STATUS_INFO_VIDEO_DAYS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "录像机天数检查:/api/video/daysInfo", branchId, msgId, JSONArray.toJSONString(errorDto));
+        LogUtils.STATUS_INFO_VIDEO_DAYS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "录像机天数检查:/api/video/daysInfo", msgId, JSONArray.toJSONString(errorDto));
         return errorDto;
     }
 
 
     @ApiOperation("视频质量诊断结果")
-    @PostMapping({"/api/{branchId}/video/diagnosis"})
-    public ReceiveErrorDto plan(@PathVariable String branchId, String msgId, @RequestBody VideoDiagnosisDto videoDiagnosisDto) {
+    @PostMapping({"/api/video/diagnosis"})
+    public ReceiveErrorDto plan( String msgId, @RequestBody VideoDiagnosisDto videoDiagnosisDto) {
         rabbitMsgIdService.sendMsgId(msgId,"/video/diagnosis","视频质量诊断结果");
-        LogUtils.STATUS_INFO_VIDEO_DIAGNOSIS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "视频质量诊断结果:/api/video/diagnosis", branchId, msgId, JSONArray.toJSONString(videoDiagnosisDto));
+        LogUtils.STATUS_INFO_VIDEO_DIAGNOSIS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "视频质量诊断结果:/api/video/diagnosis", msgId, JSONArray.toJSONString(videoDiagnosisDto));
         ReceiveErrorDto result = ReceiveErrorDto.success();
         if (ObjectUtil.isEmpty(videoDiagnosisDto.getOrganizationGuid())) {
             result = ReceiveErrorDto.error("organizationGuid  为空");
-            LogUtils.STATUS_INFO_VIDEO_DIAGNOSIS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "视频质量诊断结果:/api/video/diagnosis", branchId, msgId, JSONArray.toJSONString(result));
+            LogUtils.STATUS_INFO_VIDEO_DIAGNOSIS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "视频质量诊断结果:/api/video/diagnosis", msgId, JSONArray.toJSONString(result));
             return result;
         }
         try{
-            result = videoDiagnosisRecordService.saveData(videoDiagnosisDto, msgId, branchId);
+            result = videoDiagnosisRecordService.saveData(videoDiagnosisDto, msgId);
         }catch (Exception e){
             e.printStackTrace();
             LogUtils.STATUS_INFO_VIDEO_DIAGNOSIS.error("保存失败,{}",e);
         }
-        LogUtils.STATUS_INFO_VIDEO_DIAGNOSIS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "视频质量诊断结果:/api/video/diagnosis", branchId, msgId, JSONArray.toJSONString(result));
+        LogUtils.STATUS_INFO_VIDEO_DIAGNOSIS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "视频质量诊断结果:/api/video/diagnosis", msgId, JSONArray.toJSONString(result));
         return result;
     }
 
@@ -109,24 +108,23 @@ public class VideoDataController {
      * 不做推送,质量问题修复后,主动上报结束信息。
      * 粒度:每个硬盘录像机的硬盘情况为一个数据包
      *
-     * @param branchId
      * @param msgId
      * @param videoRecorderHardDiskDetectionEditDto
      * @return
      */
     @ApiOperation("录像机硬盘检测")
-    @PostMapping({"/api/{branchId}/status/disks"})
-    ReceiveErrorDto disks(@PathVariable String branchId, String msgId, @RequestBody VideoRecorderHardDiskDetectionEditDto videoRecorderHardDiskDetectionEditDto) {
+    @PostMapping({"/api/status/disks"})
+    ReceiveErrorDto disks( String msgId, @RequestBody VideoRecorderHardDiskDetectionEditDto videoRecorderHardDiskDetectionEditDto) {
         rabbitMsgIdService.sendMsgId(msgId, "/status/disks", "录像机硬盘检测");
-        LogUtils.STATUS_INFO_DISKS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "录像机硬盘检测:/api/status/disks", branchId, msgId, JSON.toJSONString(videoRecorderHardDiskDetectionEditDto));
+        LogUtils.STATUS_INFO_DISKS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "录像机硬盘检测:/api/status/disks", msgId, JSON.toJSONString(videoRecorderHardDiskDetectionEditDto));
         ReceiveErrorDto result = ReceiveErrorDto.success();
         try {
-            result = this.videoRecorderHardDiskDetectionService.saveData(videoRecorderHardDiskDetectionEditDto, msgId, branchId);
+            result = this.videoRecorderHardDiskDetectionService.saveData(videoRecorderHardDiskDetectionEditDto, msgId);
         } catch (Exception e) {
             e.printStackTrace();
             LogUtils.STATUS_INFO_DISKS.error("保存失败,{}", e);
         }
-        LogUtils.STATUS_INFO_DISKS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "录像机硬盘检测:/api/status/disks", branchId, msgId, JSON.toJSONString(result));
+        LogUtils.STATUS_INFO_DISKS.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "录像机硬盘检测:/api/status/disks", msgId, JSON.toJSONString(result));
         return result;
     }
 
@@ -141,18 +139,18 @@ public class VideoDataController {
      * @return
      */
     @ApiOperation("DVR硬盘空间信息同步")
-    @PostMapping({"/api/{branchId}/data/dvrDiskList"})
-    ReceiveErrorDto disksList(@PathVariable String branchId, String msgId, @RequestBody DataPageDto<DvrDiskPageDto> dataPageDto) {
+    @PostMapping({"/api/data/dvrDiskList"})
+    ReceiveErrorDto disksList( String msgId, @RequestBody DataPageDto<DvrDiskPageDto> dataPageDto) {
         rabbitMsgIdService.sendMsgId(msgId, "/api/data/dvrDiskList", "DVR硬盘空间信息同步");
-        LogUtils.BASE_INFO_DVR_DISK.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "DVR硬盘空间信息同步:/api/data/dvrDiskList", branchId, msgId, JSON.toJSONString(dataPageDto));
+        LogUtils.BASE_INFO_DVR_DISK.info("【北向接口-{}】【branchId:{}】【msgId:{}】【接收参数:{}】", "DVR硬盘空间信息同步:/api/data/dvrDiskList", msgId, JSON.toJSONString(dataPageDto));
         ReceiveErrorDto result = ReceiveErrorDto.success();
         try {
-            result = this.dvrDiskService.saveData(dataPageDto, msgId, branchId);
+            result = this.dvrDiskService.saveData(dataPageDto, msgId);
         } catch (Exception e) {
             e.printStackTrace();
             LogUtils.BASE_INFO_DVR_DISK.error("保存失败,{}", e);
         }
-        LogUtils.BASE_INFO_DVR_DISK.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "DVR硬盘空间信息同步:/api/data/dvrDiskList", branchId, msgId, JSON.toJSONString(result));
+        LogUtils.BASE_INFO_DVR_DISK.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "DVR硬盘空间信息同步:/api/data/dvrDiskList", msgId, JSON.toJSONString(result));
         return result;
     }
 }

+ 10 - 10
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/EquipmentSyncService.java

@@ -65,7 +65,7 @@ public class EquipmentSyncService {
      * @param
      */
     @Transactional(rollbackFor = Exception.class)
-    public void saveDeviceData( List<DeviceDto> pages,String msgId, String branchId) {
+    public void saveDeviceData( List<DeviceDto> pages,String msgId) {
 
         String key = "base_info_equipment_" + DateUtil.format(new Date(), "yyyy-MM-dd");
         /**
@@ -97,7 +97,7 @@ public class EquipmentSyncService {
         Map<String, MediatorCategory> categorys = new HashMap<>();
         List<IotDevice> olds = new ArrayList();
         List<IotDevice> list = new ArrayList<>();
-        Map<String, List<IotDevice>> rel = analysisDeviceList(pages, orgs, categorys,msgId,branchId);
+        Map<String, List<IotDevice>> rel = analysisDeviceList(pages, orgs, categorys,msgId);
         olds.addAll(rel.get("olds"));
         list.addAll(rel.get("list"));
         //第一步逻辑删除数据,逻辑删除
@@ -137,7 +137,7 @@ public class EquipmentSyncService {
      * @param
      * @return
      */
-    private Map<String, List<IotDevice>> analysisDeviceList(List<DeviceDto> dtos, Map<String, Map<String, Object>> orgs, Map<String, MediatorCategory> categorys,String msgId, String branchId) {
+    private Map<String, List<IotDevice>> analysisDeviceList(List<DeviceDto> dtos, Map<String, Map<String, Object>> orgs, Map<String, MediatorCategory> categorys,String msgId) {
         Map<String, List<IotDevice>> rel = new HashMap<>();
 
         /**
@@ -154,35 +154,35 @@ public class EquipmentSyncService {
         while (var2.hasNext()) {
             datum = (DeviceDto) var2.next();
             if (StringUtils.isEmpty(datum.getEquipmentCode())) {
-                error = new NorthError(msgId, branchId, "/data/equipmentList"
+                error = new NorthError(msgId, "/data/equipmentList"
                         , datum, "equipmentCode 为空");
                 errors.add(error);
                 continue;
             }
 
             if (StringUtils.isEmpty(datum.getOrganizationGuid())) {
-                error = new NorthError(msgId, branchId, "/data/equipmentList"
+                error = new NorthError(msgId, "/data/equipmentList"
                         , datum, "organizationGuid 为空");
                 errors.add(error);
                 continue;
             }
 
             if (StringUtils.isEmpty(datum.getEquipmentName())) {
-                error = new NorthError(msgId, branchId, "/data/equipmentList"
+                error = new NorthError(msgId, "/data/equipmentList"
                         , datum, "equipmentName 为空");
                 errors.add(error);
                 continue;
             }
 
             if (datum.getEquipmentType() == null || datum.getEquipmentType().equals(0)) {
-                error = new NorthError(msgId, branchId, "/data/equipmentList"
+                error = new NorthError(msgId, "/data/equipmentList"
                         , datum, "equipmentType 为空");
                 errors.add(error);
                 continue;
             }
 
             if (StringUtils.isEmpty(datum.getNetAddress())) {
-                error = new NorthError(msgId, branchId, "/data/equipmentList"
+                error = new NorthError(msgId, "/data/equipmentList"
                         , datum, "netAddress 为空");
                 errors.add(error);
                 continue;
@@ -194,7 +194,7 @@ public class EquipmentSyncService {
                 if (theOrg == null) {
                     org.put("isOk", "N");
                     org.put("msg", "organizationGuid:" + datum.getOrganizationGuid() + "不正确");
-                    error = new NorthError(msgId, branchId, "/data/equipmentList"
+                    error = new NorthError(msgId, "/data/equipmentList"
                             , datum, "orgGUID:" + datum.getOrganizationGuid() + "不正确");
                     errors.add(error);
                     continue;
@@ -208,7 +208,7 @@ public class EquipmentSyncService {
                 String isOk = obj.get("isOk").toString();
                 if (isOk.equals("N")) {
                     String msg = obj.get("msg").toString();
-                    error = new NorthError(msgId, branchId, "/data/equipmentList"
+                    error = new NorthError(msgId, "/data/equipmentList"
                             , datum, msg);
                     errors.add(error);
                     continue;

+ 1 - 1
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IIotDeviceService.java

@@ -29,7 +29,7 @@ public interface IIotDeviceService extends IService<IotDevice> {
 
     void batchInsertDevice(List<IotDevice> list);
 
-    ReceiveErrorDto saveData(DataPageDto<DeviceDto> deviceReceivePageDto, String msgId, String branchId);
+    ReceiveErrorDto saveData(DataPageDto<DeviceDto> deviceReceivePageDto, String msgId);
 
     List<IotDevice> findByCategory(Long categoryId);
 }

+ 1 - 1
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IIotDvrChannelService.java

@@ -20,7 +20,7 @@ public interface IIotDvrChannelService extends IService<IotDvrChannel> {
 
     IotDvrChannel findChannel(String channelCode, String equipmentCode, Long orgId);
 
-    ReceiveErrorDto saveChannel(List<DeviceDto> deviceDtos, String branchId, String msgId, String inner);
+    ReceiveErrorDto saveChannel(List<DeviceDto> deviceDtos, String msgId);
 
     void channelCacheDeal();
 

+ 1 - 1
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IVideoDaysCheckService.java

@@ -18,5 +18,5 @@ public interface IVideoDaysCheckService extends IService<MediatorVideoDaysCheck>
 
     MediatorVideoDaysCheck findByOrgIdAndEquipmentCodeAndChannelCode(Long orgId, String equipmentCode, String channelCode);
 
-    ReceiveErrorDto saveData(VideoDaysCheckDto videoDaysCheckDto, String msgId, String branchId);
+    ReceiveErrorDto saveData(VideoDaysCheckDto videoDaysCheckDto, String msgId);
 }

+ 1 - 1
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IVideoDiagnosisRecordService.java

@@ -20,7 +20,7 @@ import java.util.Map;
  */
 public interface IVideoDiagnosisRecordService extends IService<MediatorVideoDiagnosisRecord> {
 
-    ReceiveErrorDto saveData(VideoDiagnosisDto videoDiagnosisDto, String msgId, String branchId) throws IllegalAccessException, ParseException;
+    ReceiveErrorDto saveData(VideoDiagnosisDto videoDiagnosisDto, String msgId) throws IllegalAccessException, ParseException;
 
     MediatorVideoDiagnosisRecord findByOrgIdAndEquipmentCodeAndChannelCode(Long orgId, String equipmentCode, String channelCode);
 

+ 1 - 1
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IVideoIntegrityCheckService.java

@@ -17,7 +17,7 @@ import java.util.Date;
  */
 public interface IVideoIntegrityCheckService extends IService<MediatorVideoIntegrityCheck> {
 
-    ReceiveErrorDto saveData(VideoIntegrityCheckDto videoIntegrityCheckDto, String msgId, String branchId);
+    ReceiveErrorDto saveData(VideoIntegrityCheckDto videoIntegrityCheckDto, String msgId);
 
     MediatorVideoIntegrityCheck findByOrgIdAndEquipmentCodeAndAndChannelCodeAndRecordDate(Long orgId, String equipmentCode, String channelCode);
 

+ 5 - 4
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotAlarmDefenceAreaService.java

@@ -10,7 +10,7 @@ import java.util.List;
 
 /**
  * <p>
- *  服务类
+ * 服务类
  * </p>
  *
  * @author oygj
@@ -19,9 +19,10 @@ import java.util.List;
 public interface IotAlarmDefenceAreaService extends IService<IotAlarmDefenceArea> {
 
     List<IotAlarmDefenceArea> findBySubSystemCode(String defenceAreaCode);
-    IotAlarmDefenceArea findBySubSystemCodeAndIdx(String defenceAreaCode, Integer idx,String orgGuid);
 
-    ReceiveErrorDto saveData(String branchId, String msgId, SensorDataDto request);
+    IotAlarmDefenceArea findBySubSystemCodeAndIdx(String defenceAreaCode, Integer idx, String orgGuid);
 
-    ReceiveErrorDto sensorData(SensorDataDto sensorData, String branchId, String msgId);
+    ReceiveErrorDto saveData(String msgId, SensorDataDto request);
+
+    ReceiveErrorDto sensorData(SensorDataDto sensorData, String msgId);
 }

+ 2 - 2
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotAlarmSubsystemService.java

@@ -19,9 +19,9 @@ import com.xunmei.system.api.dto.protection.ReceiveErrorDto;
 public interface IotAlarmSubsystemService extends IService<IotAlarmSubsystem> {
 
 
-    ReceiveErrorDto defenceAreaList(DataPageDto<DefenceAreaDto> request, String branchId, String msgId);
+    ReceiveErrorDto defenceAreaList(DataPageDto<DefenceAreaDto> request, String msgId);
 
     IotAlarmSubsystem findByCodeAndOrgId(String defenceAreaCode, Long orgId);
 
-    ReceiveErrorDto saveData(ProtectionEditDto protectionEditDto, String msgId, String branchId);
+    ReceiveErrorDto saveData(ProtectionEditDto protectionEditDto, String msgId);
 }

+ 1 - 1
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotDeviceDetectionService.java

@@ -16,7 +16,7 @@ import com.xunmei.system.api.dto.protection.ReceiveErrorDto;
  */
 public interface IotDeviceDetectionService extends IService<IotDeviceDetection> {
 
-    ReceiveErrorDto saveData(NetworkDeviceDetectionEditDto networkDeviceDetectionEditDto, String msgId, String branchId) throws IllegalAccessException;
+    ReceiveErrorDto saveData(NetworkDeviceDetectionEditDto networkDeviceDetectionEditDto, String msgId) throws IllegalAccessException;
 
     IotDeviceDetection findByEquipmentCodeAndOrgId(String equipmentCode, Long orgId);
 }

+ 1 - 1
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotDvrDiskService.java

@@ -16,6 +16,6 @@ import com.xunmei.system.api.dto.protection.ReceiveErrorDto;
  */
 public interface IotDvrDiskService extends IService<IotDvrDisk> {
 
-    ReceiveErrorDto saveData(DataPageDto<DvrDiskPageDto> dataPageDto, String msgId, String branchId) throws Exception;
+    ReceiveErrorDto saveData(DataPageDto<DvrDiskPageDto> dataPageDto, String msgId) throws Exception;
 
 }

+ 1 - 1
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotDvrHardDiskDetectionService.java

@@ -18,7 +18,7 @@ import java.util.Map;
  */
 public interface IotDvrHardDiskDetectionService extends IService<IotDvrHardDiskDetection> {
 
-    ReceiveErrorDto saveData(VideoRecorderHardDiskDetectionEditDto videoRecorderHardDiskDetectionEditDto, String msgId, String branchId) throws IllegalAccessException;
+    ReceiveErrorDto saveData(VideoRecorderHardDiskDetectionEditDto videoRecorderHardDiskDetectionEditDto, String msgId) throws IllegalAccessException;
 
     Map<String, Object> checkVideoRecorderHardDiskDetectionEditDto(VideoRecorderHardDiskDetectionEditDto videoRecorderHardDiskDetectionEditDto) throws IllegalAccessException;
 

+ 2 - 2
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/IotSensorService.java

@@ -17,7 +17,7 @@ import com.xunmei.system.api.dto.protection.ReceiveErrorDto;
  */
 public interface IotSensorService extends IService<IotSensor> {
 
-    ReceiveErrorDto saveDirectHost(DataPageDto<SensorDto> sensors, String branchId, String msgId);
+    ReceiveErrorDto saveDirectHost(DataPageDto<SensorDto> sensors, String msgId);
 
-    ReceiveErrorDto saveDirectHostStatus(DataPageDto<SensorStatusDto> statuses, String branchId, String msgId);
+    ReceiveErrorDto saveDirectHostStatus(DataPageDto<SensorStatusDto> statuses, String msgId);
 }

+ 11 - 10
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotAlarmDefenceAreaServiceImpl.java

@@ -62,13 +62,14 @@ public class IotAlarmDefenceAreaServiceImpl extends ServiceImpl<IotAlarmDefenceA
     IIotDefenceAreaAlarmDataService defenceAreAlarmDataService;
     @Resource
     IIotDefenceAreaDataService defenceAreaDataService;
+
     @Override
     public List<IotAlarmDefenceArea> findBySubSystemCode(String defenceAreaCode) {
         return lambdaQuery().eq(IotAlarmDefenceArea::getSubSystemCode, defenceAreaCode).eq(IotAlarmDefenceArea::getDeleted, 0).list();
     }
 
     @Override
-    public IotAlarmDefenceArea findBySubSystemCodeAndIdx(String defenceAreaCode, Integer idx,String orgGuid) {
+    public IotAlarmDefenceArea findBySubSystemCodeAndIdx(String defenceAreaCode, Integer idx, String orgGuid) {
         return lambdaQuery()
                 .eq(IotAlarmDefenceArea::getOrganizationGuid, orgGuid)
                 .eq(IotAlarmDefenceArea::getSubSystemCode, defenceAreaCode)
@@ -80,7 +81,7 @@ public class IotAlarmDefenceAreaServiceImpl extends ServiceImpl<IotAlarmDefenceA
     }
 
     @Override
-    public ReceiveErrorDto sensorData(SensorDataDto sensorData, String branchId, String msgId) {
+    public ReceiveErrorDto sensorData(SensorDataDto sensorData, String msgId) {
         ReceiveErrorDto result = new ReceiveErrorDto();
         if (StringUtils.isEmpty(sensorData.getOrganizationGuid())) {
             result.setSuccess(false);
@@ -122,7 +123,7 @@ public class IotAlarmDefenceAreaServiceImpl extends ServiceImpl<IotAlarmDefenceA
 
         SysOrg org = orgService.findByCode(sensorData.getOrganizationGuid(), SecurityConstants.INNER);
         if (org == null) {
-            NorthError error = new NorthError(msgId, branchId, "/api/status/sensor"
+            NorthError error = new NorthError(msgId, "/api/status/sensor"
                     , sensorData, "orgGUID:" + sensorData.getOrganizationGuid() + "不正确");
             northErrorService.saveError(error);
             return result;
@@ -138,7 +139,7 @@ public class IotAlarmDefenceAreaServiceImpl extends ServiceImpl<IotAlarmDefenceA
         }
 
 
-        IotAlarmDefenceArea sensor = this.findBySubSystemCodeAndIdx(sensorData.getDefenceareaCode(),sensorData.getInputIndex(),sensorData.getOrganizationGuid());
+        IotAlarmDefenceArea sensor = this.findBySubSystemCodeAndIdx(sensorData.getDefenceareaCode(), sensorData.getInputIndex(), sensorData.getOrganizationGuid());
         if (sensor == null) {
             result.setSuccess(false);
             result.setErrorMsg("没有找到对应的设备");
@@ -172,13 +173,13 @@ public class IotAlarmDefenceAreaServiceImpl extends ServiceImpl<IotAlarmDefenceA
         data.setDefenceAreaIndex(sensorData.getInputIndex());
         data.setDefenceAreaName(sensorData.getInputName());
         data.setDefenceAreaStatus(sensorData.getInputState());
-        data.setUpdateTime(LocalDateTime.parse(sensorData.getUpdateTime(),DateTimeFormatter.ISO_DATE_TIME));
+        data.setUpdateTime(LocalDateTime.parse(sensorData.getUpdateTime(), DateTimeFormatter.ISO_DATE_TIME));
         data.setOrgId(org.getId());
         data.setOrganizationGuid(sensorData.getOrganizationGuid());
         data.setOrgName(org.getName());
         data.setOrgPath(org.getPath());
 
-        IotAlarmDefenceAreaData dataOld = defenceAreaDataService.findByCodeAndIdx(sensorData.getDefenceareaCode(), sensorData.getInputIndex(),data.getOrgId());
+        IotAlarmDefenceAreaData dataOld = defenceAreaDataService.findByCodeAndIdx(sensorData.getDefenceareaCode(), sensorData.getInputIndex(), data.getOrgId());
         if (dataOld != null) {
             BeanHelper.copyProperties(dataOld, data);
             data.setUpdateTime(LocalDateTime.now());
@@ -212,7 +213,7 @@ public class IotAlarmDefenceAreaServiceImpl extends ServiceImpl<IotAlarmDefenceA
     }
 
     @Override
-    public ReceiveErrorDto saveData(String branchId, String msgId, SensorDataDto sensorData) {
+    public ReceiveErrorDto saveData(String msgId, SensorDataDto sensorData) {
         ReceiveErrorDto errorDto = null;
         try {
             String value = sensorData.getInputState();
@@ -233,8 +234,8 @@ public class IotAlarmDefenceAreaServiceImpl extends ServiceImpl<IotAlarmDefenceA
                 this.redisTemplate.expire(key, 60, TimeUnit.MINUTES);
             }
             if (flag) {
-                errorDto = this.sensorData(sensorData, branchId, msgId);
-                LogUtils.STATUS_INFO_STATUS_SENSOR.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "防区传感器报警信息:/api/status/sensor", branchId, msgId, JSON.toJSONString(errorDto));
+                errorDto = this.sensorData(sensorData, msgId);
+                LogUtils.STATUS_INFO_STATUS_SENSOR.info("【北向接口-{}】【branchId:{}】【msgId:{}】【返回参数:{}】", "防区传感器报警信息:/api/status/sensor", msgId, JSON.toJSONString(errorDto));
                 return errorDto;
             } else {
                 ReceiveErrorDto dto = new ReceiveErrorDto();
@@ -245,7 +246,7 @@ public class IotAlarmDefenceAreaServiceImpl extends ServiceImpl<IotAlarmDefenceA
 
         } catch (Exception e) {
             e.printStackTrace();
-            LogUtils.STATUS_INFO_STATUS_SENSOR.info("【北向接口-{}】【branchId:{}】【msgId:{}】【异常原因:{}】", "防区传感器报警信息:/api/status/sensor", branchId, msgId, e.getMessage());
+            LogUtils.STATUS_INFO_STATUS_SENSOR.info("【北向接口-{}】【branchId:{}】【msgId:{}】【异常原因:{}】", "防区传感器报警信息:/api/status/sensor", msgId, e.getMessage());
             return ReceiveErrorDto.error("数据处理异常");
         }
     }

+ 21 - 21
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotAlarmSubSystemServiceImpl.java

@@ -84,7 +84,7 @@ public class IotAlarmSubSystemServiceImpl extends ServiceImpl<IotAlarmSubsystemM
     }
 
     @Override
-    public ReceiveErrorDto saveData(ProtectionEditDto protectionEditDto, String msgId, String branchId) {
+    public ReceiveErrorDto saveData(ProtectionEditDto protectionEditDto, String msgId) {
 
         ReceiveErrorDto result = new ReceiveErrorDto();
         String organizationGuid = protectionEditDto.getOrganizationGuid();
@@ -125,7 +125,7 @@ public class IotAlarmSubSystemServiceImpl extends ServiceImpl<IotAlarmSubsystemM
 
         SysOrg org = orgService.findByCode(organizationGuid, SecurityConstants.INNER);
         if (org == null) {
-            NorthError error = new NorthError(msgId, branchId, "/status/defencearea"
+            NorthError error = new NorthError(msgId, "/status/defencearea"
                     , protectionEditDto, "orgGUID:" + organizationGuid + "不正确");
             northErrorService.saveError(error);
             return result;
@@ -257,7 +257,7 @@ public class IotAlarmSubSystemServiceImpl extends ServiceImpl<IotAlarmSubsystemM
     }
 
     @Override
-    public ReceiveErrorDto defenceAreaList(DataPageDto<DefenceAreaDto> request, String branchId, String msgId) {
+    public ReceiveErrorDto defenceAreaList(DataPageDto<DefenceAreaDto> request, String msgId) {
         String packageGuid = request.getPackageGuid();
         if (StringUtils.isEmpty(packageGuid)) {
             return ReceiveErrorDto.error("packageGuid参数非法");
@@ -270,7 +270,7 @@ public class IotAlarmSubSystemServiceImpl extends ServiceImpl<IotAlarmSubsystemM
         if (CollectionUtils.isEmpty(request.getData())) {
             return ReceiveErrorDto.error("报警主机子系统及防区信息为空");
         }
-        final List<DefenceAreaDto> defenceareaList = RedisCheckRepeatDataUtil.isCompleted(request,DefenceAreaDto.class);
+        final List<DefenceAreaDto> defenceareaList = RedisCheckRepeatDataUtil.isCompleted(request, DefenceAreaDto.class);
         LogUtils.BASE_INFO_DEFENCEAREA.info("判断是否获取全部报警主机子系统及防区信息分页数据:{}", defenceareaList.size() > 0);
         if (ObjectUtil.isEmpty(defenceareaList)) {
             return ReceiveErrorDto.error("尚未获取全部报警主机子系统及防区信息分页数据,暂不处理!");
@@ -278,12 +278,12 @@ public class IotAlarmSubSystemServiceImpl extends ServiceImpl<IotAlarmSubsystemM
         LogUtils.BASE_INFO_DEFENCEAREA.info("获取全部的报警主机子系统及防区信息,开始数据处理界面!");
         this.northStatisticsSyncService.saveOrUpdateBaseCountByDataType(DataType.protectionCount.getIndex(), defenceareaList.size(), false);
         new Thread(() -> {
-            this.saveAndUpdate(defenceareaList, branchId, msgId);
+            this.saveAndUpdate(defenceareaList, msgId);
         }).start();
         return ReceiveErrorDto.success();
     }
 
-    public ReceiveErrorDto saveAndUpdate(List<DefenceAreaDto> defenceareaList, String branchId, String msgId) {
+    public ReceiveErrorDto saveAndUpdate(List<DefenceAreaDto> defenceareaList, String msgId) {
         if (CollectionUtils.isEmpty(defenceareaList)) {
             return ReceiveErrorDto.error("报警主机子系统及防区信息为空");
         }
@@ -297,23 +297,23 @@ public class IotAlarmSubSystemServiceImpl extends ServiceImpl<IotAlarmSubsystemM
         List<MediatorCategory> categorys = categoryService.list();
         //查询报警主机主机设备列表
         List<IotDevice> devices = iotDeviceService.findByCategory(CategoryDataEnum.ALARM_HOST_DEVICE.getId());
-        checkParam(defenceareaList, branchId, msgId, errors, orgList, categorys, devices, deviceList, protectionList, sensorList);
+        checkParam(defenceareaList, msgId, errors, orgList, categorys, devices, deviceList, protectionList, sensorList);
         return ReceiveErrorDto.success();
     }
 
-    private void checkParam(List<DefenceAreaDto> defenceareaList, String branchId, String msgId, List<NorthError> errors, List<SysOrgVO> orgList, List<MediatorCategory> categorys, List<IotDevice> devices, List<IotAlarmSubsystem> deviceList, List<IotAlarmSubsystem> protectionList, List<IotAlarmDefenceArea> sensorList) {
+    private void checkParam(List<DefenceAreaDto> defenceareaList, String msgId, List<NorthError> errors, List<SysOrgVO> orgList, List<MediatorCategory> categorys, List<IotDevice> devices, List<IotAlarmSubsystem> deviceList, List<IotAlarmSubsystem> protectionList, List<IotAlarmDefenceArea> sensorList) {
         NorthError error = null;
         for (DefenceAreaDto dto : defenceareaList) {
             SysOrgVO org = null;
             if (StringUtils.isEmpty(dto.getOrganizationGuid())) {
-                error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                error = new NorthError(msgId, "/api/data/defenceareaList"
                         , dto, "参数非法:未传organizationGuid");
                 errors.add(error);
                 continue;
             } else {
                 List<SysOrgVO> orgs = orgList.stream().filter(r -> r.getGuid().equals(dto.getOrganizationGuid())).collect(Collectors.toList()); //orgDao.findByGuid(dto.getOrganizationGuid());
                 if (orgs.size() == 0) {
-                    error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                    error = new NorthError(msgId, "/api/data/defenceareaList"
                             , dto, "orgGUID:" + dto.getOrganizationGuid() + "不正确");
                     errors.add(error);
                     continue;
@@ -323,28 +323,28 @@ public class IotAlarmSubSystemServiceImpl extends ServiceImpl<IotAlarmSubsystemM
             }
 
             if (StringUtils.isEmpty(dto.getDefenceareaCode())) {
-                error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                error = new NorthError(msgId, "/api/data/defenceareaList"
                         , dto, "参数非法:未传defenceareaCode");
                 errors.add(error);
                 continue;
             }
 
             if (StringUtils.isEmpty(dto.getDefenceareaName())) {
-                error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                error = new NorthError(msgId, "/api/data/defenceareaList"
                         , dto, "参数非法:未传defenceareaName");
                 errors.add(error);
                 continue;
             }
 
             if (StringUtils.isEmpty(dto.getAlarmHostCode())) {
-                error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                error = new NorthError(msgId, "/api/data/defenceareaList"
                         , dto, "参数非法:未传alarmHostCode");
                 errors.add(error);
                 continue;
             }
 
             if (dto.getSensorArray() == null || dto.getSensorArray().size() == 0) {
-                error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                error = new NorthError(msgId, "/api/data/defenceareaList"
                         , dto, "参数非法:未传sensorArray");
                 errors.add(error);
                 //continue;
@@ -353,38 +353,38 @@ public class IotAlarmSubSystemServiceImpl extends ServiceImpl<IotAlarmSubsystemM
 
                 for (SensorDto sensorDto : sensorArray) {
                     if (StringUtils.isEmpty(sensorDto.getInputName())) {
-                        error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                        error = new NorthError(msgId, "/api/data/defenceareaList"
                                 , dto, "参数非法:未传InputName");
                         errors.add(error);
                         continue;
                     }
                     if (sensorDto.getInputIndex() == null) {
-                        error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                        error = new NorthError(msgId, "/api/data/defenceareaList"
                                 , dto, "参数非法:未传InputIndex");
                         errors.add(error);
                         continue;
                     }
                     if (StringUtils.isEmpty(sensorDto.getModuleAddress())) {
-                        error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                        error = new NorthError(msgId, "/api/data/defenceareaList"
                                 , dto, "参数非法:未传ModuleAddress");
                         errors.add(error);
                         continue;
                     }
                     if (StringUtils.isEmpty(sensorDto.getSensorType())) {
-                        error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                        error = new NorthError(msgId, "/api/data/defenceareaList"
                                 , dto, "参数非法:未传SensorType");
                         errors.add(error);
                         continue;
                     }
                     if (StringUtils.isEmpty(sensorDto.getSensorTypeName())) {
-                        error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                        error = new NorthError(msgId, "/api/data/defenceareaList"
                                 , dto, "参数非法:未传SensorTypeName");
                         errors.add(error);
                     }
 
                     List<MediatorCategory> categorysa = categorys.stream().filter(r -> r.getName().equals(sensorDto.getSensorTypeName())).collect(Collectors.toList());//categoryDao.getOne(qw);
                     if (categorysa.size() == 0) {
-                        error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                        error = new NorthError(msgId, "/api/data/defenceareaList"
                                 , dto, "参数非法:没有找到设备类型,默认归到其他类型中");
                         errors.add(error);
                     }
@@ -393,7 +393,7 @@ public class IotAlarmSubSystemServiceImpl extends ServiceImpl<IotAlarmSubsystemM
             SysOrgVO finalOrg = org;
             List<IotDevice> devicesa = devices.stream().filter(r -> r.getEquipmentCode().equals(dto.getAlarmHostCode()) && r.getOrgId().equals(finalOrg.getId())).collect(Collectors.toList());
             if (devicesa.size() == 0) {
-                error = new NorthError(msgId, branchId, "/api/data/defenceareaList"
+                error = new NorthError(msgId, "/api/data/defenceareaList"
                         , dto, "参数非法:没有找到报警主机");
                 errors.add(error);
                 continue;

+ 1 - 1
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDeviceDetectionServiceImpl.java

@@ -62,7 +62,7 @@ public class IotDeviceDetectionServiceImpl extends ServiceImpl<IotDeviceDetectio
     }
 
     @Override
-    public ReceiveErrorDto saveData(NetworkDeviceDetectionEditDto networkDeviceDetectionEditDto, String msgId, String branchId) throws IllegalAccessException {
+    public ReceiveErrorDto saveData(NetworkDeviceDetectionEditDto networkDeviceDetectionEditDto, String msgId) throws IllegalAccessException {
         ReceiveErrorDto error = new ReceiveErrorDto();
         Map<String, Object> map = this.checkNetworkDeviceDetectionEditDto(networkDeviceDetectionEditDto);
         error = (ReceiveErrorDto) map.get("error");

+ 2 - 2
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDeviceServiceImpl.java

@@ -86,7 +86,7 @@ public class IotDeviceServiceImpl extends ServiceImpl<IotDeviceMapper, IotDevice
     }
 
     @Override
-    public ReceiveErrorDto saveData(DataPageDto<DeviceDto> deviceReceivePageDto, String msgId, String branchId) {
+    public ReceiveErrorDto saveData(DataPageDto<DeviceDto> deviceReceivePageDto, String msgId) {
         String packageGuid = deviceReceivePageDto.getPackageGuid();
         if (StringUtils.isEmpty(packageGuid)) {
             return ReceiveErrorDto.error("packageGuid参数非法");
@@ -104,7 +104,7 @@ public class IotDeviceServiceImpl extends ServiceImpl<IotDeviceMapper, IotDevice
         if (ObjectUtil.isNotEmpty(list)) {
             LogUtils.BASE_INFO_EQUIPMENT.info("设备数据判断是否获取全部分页数据,开始数据处理界面!");
             northStatisticsSyncService.saveOrUpdateBaseCountByDataType(DataType.deviceCount.getIndex(), deviceReceivePageDto.getData().size(), false);
-            equipmentSyncService.saveDeviceData(list, msgId, branchId);
+            equipmentSyncService.saveDeviceData(list, msgId);
         }
         return ReceiveErrorDto.success();
     }

+ 11 - 11
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDvrChannelServiceImpl.java

@@ -36,7 +36,7 @@ import java.util.stream.Collectors;
 
 /**
  * <p>
- *  服务实现类
+ * 服务实现类
  * </p>
  *
  * @author oygj
@@ -61,15 +61,15 @@ public class IotDvrChannelServiceImpl extends ServiceImpl<IotDvrChannelMapper, I
     @Override
     public IotDvrChannel findChannel(String channelCode, String equipmentCode, Long orgId) {
         return lambdaQuery()
-                .eq(IotDvrChannel::getHostCode,equipmentCode)
-                .eq(IotDvrChannel::getOrgId,orgId)
-                .eq(IotDvrChannel::getChannelCode,channelCode)
+                .eq(IotDvrChannel::getHostCode, equipmentCode)
+                .eq(IotDvrChannel::getOrgId, orgId)
+                .eq(IotDvrChannel::getChannelCode, channelCode)
                 .last(Constants.LIMIT1)
                 .one();
     }
 
     @Override
-    public ReceiveErrorDto saveChannel(List<DeviceDto> deviceDtoList, String branchId, String msgId, String inner) {
+    public ReceiveErrorDto saveChannel(List<DeviceDto> deviceDtoList, String msgId) {
         if (org.apache.commons.collections4.CollectionUtils.isEmpty(deviceDtoList)) {
             return ReceiveErrorDto.error("通道数据为空");
         } else {
@@ -105,28 +105,28 @@ public class IotDvrChannelServiceImpl extends ServiceImpl<IotDvrChannelMapper, I
             for (int i = 0; i < deviceDtoList.size(); i++) {
                 deviceDto = deviceDtoList.get(i);
                 if (StringUtils.isEmpty(deviceDto.getEquipmentCode())) {
-                    NorthError error = new NorthError(msgId, branchId, "/data/channelList"
+                    NorthError error = new NorthError(msgId, "/data/channelList"
                             , deviceDto, "equipmentCode 为空");
                     errors.add(error);
                     continue;
                 }
 
                 if (StringUtils.isEmpty(deviceDto.getOrganizationGuid())) {
-                    NorthError error = new NorthError(msgId, branchId, "/data/channelList"
+                    NorthError error = new NorthError(msgId, "/data/channelList"
                             , deviceDto, "organizationGuid 为空");
                     errors.add(error);
                     continue;
                 }
 
                 if (StringUtils.isEmpty(deviceDto.getChannelCode())) {
-                    NorthError error = new NorthError(msgId, branchId, "/data/channelList"
+                    NorthError error = new NorthError(msgId, "/data/channelList"
                             , deviceDto, "channelCode 为空");
                     errors.add(error);
                     continue;
                 }
 
                 if (StringUtils.isEmpty(deviceDto.getChannelName())) {
-                    NorthError error = new NorthError(msgId, branchId, "/data/channelList"
+                    NorthError error = new NorthError(msgId, "/data/channelList"
                             , deviceDto, "channelName 为空");
                     errors.add(error);
                     continue;
@@ -134,7 +134,7 @@ public class IotDvrChannelServiceImpl extends ServiceImpl<IotDvrChannelMapper, I
 
 
                 if (org == null) {
-                    NorthError error = new NorthError(msgId, branchId, "/data/channelList"
+                    NorthError error = new NorthError(msgId, "/data/channelList"
                             , deviceDto, "orgGUID:" + deviceDto.getOrganizationGuid() + " 不正确");
                     errors.add(error);
                     continue;
@@ -149,7 +149,7 @@ public class IotDvrChannelServiceImpl extends ServiceImpl<IotDvrChannelMapper, I
                 deviceDto.setOrg(org);
                 IotDevice host = iIotDeviceService.findByHostCode(deviceDto.getEquipmentCode(), org.getId());
                 if (host == null) {
-                    NorthError error = new NorthError(msgId, branchId, "/data/channelList"
+                    NorthError error = new NorthError(msgId, "/data/channelList"
                             , deviceDto, "equipmentCode:" + deviceDto.getEquipmentCode() + "该主机code不存在");
                     errors.add(error);
                     continue;

+ 9 - 10
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDvrDiskServiceImpl.java

@@ -54,7 +54,7 @@ public class IotDvrDiskServiceImpl extends ServiceImpl<IotDvrDiskMapper, IotDvrD
     private IIotDeviceService iotDeviceService;
 
     @Override
-    public ReceiveErrorDto saveData(DataPageDto<DvrDiskPageDto> request, String msgId, String branchId) throws Exception {
+    public ReceiveErrorDto saveData(DataPageDto<DvrDiskPageDto> request, String msgId) throws Exception {
         //验证基础分页信息
         ReceiveErrorDto dto = CheckDataUtil.checkObjFieldIsNull(request);
         if (!dto.getSuccess()) {
@@ -65,14 +65,14 @@ public class IotDvrDiskServiceImpl extends ServiceImpl<IotDvrDiskMapper, IotDvrD
 
         LogUtils.BASE_INFO_DVR_DISK.info("判断是否获取DVR硬盘空间全部信息分页数据:{}", dvrDiskPageLists.size() > 0);
         if (ObjectUtil.isNotEmpty(dvrDiskPageLists)) {
-            Map<String, Object> map = this.checkDvrDiskPageDto(dvrDiskPageLists, branchId, msgId);
+            Map<String, Object> map = this.checkDvrDiskPageDto(dvrDiskPageLists, msgId);
             this.saveAll(map);
         }
         return dto;
     }
 
     @Transactional(rollbackFor = Exception.class)
-    public void saveAll(Map<String, Object> map) throws Exception {
+    public void saveAll(Map<String, Object> map) {
 
         List<NorthError> errors = (List<NorthError>) map.get("errors");
 
@@ -80,7 +80,7 @@ public class IotDvrDiskServiceImpl extends ServiceImpl<IotDvrDiskMapper, IotDvrD
 
         this.northStatisticsSyncService.saveOrUpdateBaseCountByDataType(DataType.dvrdiskCount.getIndex(), dvrdisks.size(), false);
 
-            northErrorService.saveErrorData(errors);
+        northErrorService.saveErrorData(errors);
         if (ObjectUtil.isNotEmpty(dvrdisks)) {
 
             try {
@@ -93,7 +93,7 @@ public class IotDvrDiskServiceImpl extends ServiceImpl<IotDvrDiskMapper, IotDvrD
         }
     }
 
-    private Map<String, Object> checkDvrDiskPageDto(List<DvrDiskPageDto> dvrdiskPageLists, String branchId, String msgId) throws IllegalAccessException {
+    private Map<String, Object> checkDvrDiskPageDto(List<DvrDiskPageDto> dvrdiskPageLists, String msgId) throws IllegalAccessException {
         //获取所有的监控主机
         final List<IotDevice> deviceListAll = iotDeviceService.findByCategory(CategoryDataEnum.MONITOR_HOST_DEVICE.getId());
 
@@ -108,9 +108,8 @@ public class IotDvrDiskServiceImpl extends ServiceImpl<IotDvrDiskMapper, IotDvrD
         for (DvrDiskPageDto pageDto : dvrdiskPageLists) {
             NorthError error = null;
             SysOrgVO org = null;
-            IotDevice device = null;
             //验证DvrdiskPageDto对象中是否有参数为null
-            error = CheckDataUtil.checkObjFieldIsNull(pageDto, branchId, msgId, "/api/data/dvrDiskList", null);
+            error = CheckDataUtil.checkObjFieldIsNull(pageDto, msgId, "/api/data/dvrDiskList", null);
             if (error != null) {
                 errors.add(error);
                 continue;
@@ -118,7 +117,7 @@ public class IotDvrDiskServiceImpl extends ServiceImpl<IotDvrDiskMapper, IotDvrD
             //验证机构是否存在
             final Optional<SysOrgVO> optional = orgList.stream().filter(r -> r.getCode().equals(pageDto.getOrganizationGuid())).findFirst();
             if (!optional.isPresent()) {
-                error = new NorthError(msgId, branchId, "/api/data/dvrDiskList"
+                error = new NorthError(msgId, "/api/data/dvrDiskList"
                         , pageDto, "OrganizationGuid:" + pageDto.getOrganizationGuid() + "不正确");
                 errors.add(error);
                 continue;
@@ -131,7 +130,7 @@ public class IotDvrDiskServiceImpl extends ServiceImpl<IotDvrDiskMapper, IotDvrD
                     && r.getOrgId().equals(finalOrg.getId())).collect(Collectors.toList());
 
             if (deviceList.size() == 0) {
-                error = new NorthError(msgId, branchId, "/api/data/dvrDiskList"
+                error = new NorthError(msgId, "/api/data/dvrDiskList"
                         , pageDto, "EquipmentCode:" + pageDto.getEquipmentCode() + "不正确");
                 errors.add(error);
                 continue;
@@ -145,7 +144,7 @@ public class IotDvrDiskServiceImpl extends ServiceImpl<IotDvrDiskMapper, IotDvrD
                 //验证DvrdiskDto是否有字段为null
                 List<String> fields = new ArrayList<>();
                 fields.add("name");
-                error = CheckDataUtil.checkObjFieldIsNull(dto, branchId, msgId, "/api/data/dvrDiskList", fields);
+                error = CheckDataUtil.checkObjFieldIsNull(dto, msgId, "/api/data/dvrDiskList", fields);
                 if (error != null) {
                     errors.add(error);
                     continue;

+ 1 - 1
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotDvrHardDiskDetectionServiceImpl.java

@@ -159,7 +159,7 @@ public class IotDvrHardDiskDetectionServiceImpl extends ServiceImpl<IotDvrHardDi
     }
 
     @Override
-    public ReceiveErrorDto saveData(VideoRecorderHardDiskDetectionEditDto videoRecorderHardDiskDetectionEditDto, String msgId, String branchId) throws IllegalAccessException {
+    public ReceiveErrorDto saveData(VideoRecorderHardDiskDetectionEditDto videoRecorderHardDiskDetectionEditDto, String msgId) throws IllegalAccessException {
         ReceiveErrorDto error = new ReceiveErrorDto();
         Map<String, Object> map = this.checkVideoRecorderHardDiskDetectionEditDto(videoRecorderHardDiskDetectionEditDto);
         error = (ReceiveErrorDto) map.get("error");

+ 14 - 14
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/IotSensorServiceImpl.java

@@ -59,13 +59,13 @@ public class IotSensorServiceImpl extends ServiceImpl<IotSensorMapper, IotSensor
     private EquipmentSyncService equipmentSyncService;
 
     @Override
-    public ReceiveErrorDto saveDirectHostStatus(DataPageDto<SensorStatusDto> request, String branchId, String msgId) {
+    public ReceiveErrorDto saveDirectHostStatus(DataPageDto<SensorStatusDto> request, String msgId) {
         ReceiveErrorDto dto = CheckDataUtil.checkObjFieldIsNull(request);
 
         if (dto.getSuccess() && ObjectUtil.isNotEmpty(request.getData())) {
             new Thread(() -> {
                 try {
-                    saveStatusAsync(request, msgId, branchId);
+                    saveStatusAsync(request, msgId);
                 } catch (ParseException e) {
                     throw new RuntimeException(e);
                 }
@@ -75,7 +75,7 @@ public class IotSensorServiceImpl extends ServiceImpl<IotSensorMapper, IotSensor
         return dto;
     }
 
-    private void saveStatusAsync(DataPageDto<SensorStatusDto> request, String msgId, String branchId) throws ParseException {
+    private void saveStatusAsync(DataPageDto<SensorStatusDto> request, String msgId) throws ParseException {
         String path = "/api/{branchId}/status/sensorCommon";
         List<NorthError> errors = new ArrayList<>();
         Map<String, List<IotSensor>> productDeviceMap = getAllDevice();
@@ -83,20 +83,20 @@ public class IotSensorServiceImpl extends ServiceImpl<IotSensorMapper, IotSensor
         List<IotSensorLog> sensorLogList = new ArrayList<>();
         for (SensorStatusDto status : request.getData()) {
             if (StringUtils.isEmpty(status.getOrgCode())) {
-                errors.add(new NorthError(msgId, branchId, path
+                errors.add(new NorthError(msgId, path
                         , status, "参数非法:未传orgCode"));
                 continue;
             }
             final SysOrg org = remoteOrgService.findByCode(status.getOrgCode(), SecurityConstants.INNER);
             if (org == null) {
-                errors.add(new NorthError(msgId, branchId, path
+                errors.add(new NorthError(msgId, path
                         , status, "参数非法:机构orgCode不存在:" + status.getOrgCode()));
                 continue;
             }
             final List<IotSensor> iotSensors = productDeviceMap.get(String.valueOf(org.getId()));
             final Optional<IotSensor> optional = iotSensors.stream().filter(sensor -> ObjectUtil.equal(sensor.getDeviceCode(), status.getDeviceCode())).findFirst();
             if (!optional.isPresent()) {
-                errors.add(new NorthError(msgId, branchId, path
+                errors.add(new NorthError(msgId, path
                         , status, "对应设备不存在:" + status.getDeviceCode()));
                 continue;
             }
@@ -148,7 +148,7 @@ public class IotSensorServiceImpl extends ServiceImpl<IotSensorMapper, IotSensor
     }
 
     @Override
-    public ReceiveErrorDto saveDirectHost(DataPageDto<SensorDto> request, String branchId, String msgId) {
+    public ReceiveErrorDto saveDirectHost(DataPageDto<SensorDto> request, String msgId) {
         //验证基础分页信息
         ReceiveErrorDto dto = CheckDataUtil.checkObjFieldIsNull(request);
 
@@ -168,14 +168,14 @@ public class IotSensorServiceImpl extends ServiceImpl<IotSensorMapper, IotSensor
             }).start();*/
 
             List<Long> deletedDeviceIds = new ArrayList<>();
-            List<IotSensor> devices = convertToDomain(data, msgId, branchId, deletedDeviceIds);
+            List<IotSensor> devices = convertToDomain(data, msgId, deletedDeviceIds);
             this.removeByIds(deletedDeviceIds);
             this.saveOrUpdateBatch(devices);
         }
         return dto;
     }
 
-    private List<IotSensor> convertToDomain(List<SensorDto> sensorDtos, String msgId, String branchId, List<Long> deletedDeviceIds) {
+    private List<IotSensor> convertToDomain(List<SensorDto> sensorDtos, String msgId,List<Long> deletedDeviceIds) {
         List<IotSensor> domains = new ArrayList<>();
         List<NorthError> errors = new ArrayList<>();
         String path = "/api/{branchId}/data/sensorCommonList";
@@ -186,7 +186,7 @@ public class IotSensorServiceImpl extends ServiceImpl<IotSensorMapper, IotSensor
             IotSensor domain = new IotSensor();
 
             if (StringUtils.isEmpty(sensorDto.getOrgCode())) {
-                error = new NorthError(msgId, branchId, path
+                error = new NorthError(msgId, path
                         , sensorDto, "参数非法:未传orgCode");
                 errors.add(error);
                 continue;
@@ -194,20 +194,20 @@ public class IotSensorServiceImpl extends ServiceImpl<IotSensorMapper, IotSensor
 
             SysOrg org = remoteOrgService.findByCode(sensorDto.getOrgCode(), SecurityConstants.INNER);
             if (org == null) {
-                error = new NorthError(msgId, branchId, path
+                error = new NorthError(msgId, path
                         , sensorDto, "参数非法:机构orgCode不存在:" + sensorDto.getOrgCode());
                 errors.add(error);
                 continue;
             }
             String key = org.getId() + sensorDto.getDeviceCode();
             if (uniqueSet.contains(key)) {
-                errors.add(new NorthError(msgId, branchId, path
+                errors.add(new NorthError(msgId, path
                         , sensorDto, "数据来源中,同机构中设备编号重复。"));
                 continue;
             }
             Long deviceType = convertDeviceType(sensorDto.getDeviceType());
             if (ObjectUtil.isNull(deviceType)) {
-                errors.add(new NorthError(msgId, branchId, path
+                errors.add(new NorthError(msgId, path
                         , sensorDto, "无法识别的设备类型"));
                 continue;
             }
@@ -220,7 +220,7 @@ public class IotSensorServiceImpl extends ServiceImpl<IotSensorMapper, IotSensor
 
             if (ObjectUtil.isNotEmpty(exists)) {
                 if (exists.size() > 1) {
-                    errors.add(new NorthError(msgId, branchId, path, sensorDto, "同机构下设备编号重复,将取第一条"));
+                    errors.add(new NorthError(msgId, path, sensorDto, "同机构下设备编号重复,将取第一条"));
                 }
                 domain = exists.get(0);
             }

+ 3 - 3
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/VideoDaysCheckServiceImpl.java

@@ -58,7 +58,7 @@ public class VideoDaysCheckServiceImpl extends ServiceImpl<VideoDaysCheckMapper,
     IVideoDaysCheckLogService daysCheckLogService;
 
     @Override
-    public ReceiveErrorDto saveData(VideoDaysCheckDto videoDaysCheckDto, String msgId, String branchId) {
+    public ReceiveErrorDto saveData(VideoDaysCheckDto videoDaysCheckDto, String msgId) {
         if (null == videoDaysCheckDto) {
             return ReceiveErrorDto.error("未接收到数据");
         }
@@ -90,7 +90,7 @@ public class VideoDaysCheckServiceImpl extends ServiceImpl<VideoDaysCheckMapper,
         String organizationGuid = videoDaysCheckDto.getOrganizationGuid();
         SysOrg org = orgService.findByCode(organizationGuid, SecurityConstants.INNER);
         if (org == null) {
-            NorthError error = new NorthError(msgId, branchId, "/video/daysInfo"
+            NorthError error = new NorthError(msgId,"/video/daysInfo"
                     , videoDaysCheckDto, "参数非法:organizationGuid:" + organizationGuid + "不正确");
             northErrorService.saveError(error);
             return ReceiveErrorDto.success();
@@ -143,7 +143,7 @@ public class VideoDaysCheckServiceImpl extends ServiceImpl<VideoDaysCheckMapper,
 
         final IotDvrChannel channel = dvrChannelService.findChannel(videoDaysCheckDto.getChannelCode(), videoDaysCheckDto.getEquipmentCode(), org.getId());
         if (ObjectUtil.isNull(channel)) {
-            NorthError error = new NorthError(msgId, branchId, "/video/daysInfo"
+            NorthError error = new NorthError(msgId,"/video/daysInfo"
                     , videoDaysCheckDto, "通道/设备不存在!");
             northErrorService.saveError(error);
             return ReceiveErrorDto.success();

+ 1 - 2
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/VideoDiagnosisRecordServiceImpl.java

@@ -19,7 +19,6 @@ import com.xunmei.mediator.api.service.IIotDvrChannelService;
 import com.xunmei.mediator.api.service.IVideoDiagnosisLogService;
 import com.xunmei.mediator.api.service.IVideoDiagnosisRecordService;
 import com.xunmei.system.api.dto.protection.ReceiveErrorDto;
-import com.xunmei.mediator.domain.dto.redis.RedisKey;
 import com.xunmei.mediator.domain.dto.videoDiagnosis.VideoDiagnosisDetailInfoVo;
 import com.xunmei.mediator.domain.dto.videoDiagnosis.VideoDiagnosisDto;
 import com.xunmei.mediator.util.CheckDataUtil;
@@ -58,7 +57,7 @@ public class VideoDiagnosisRecordServiceImpl extends ServiceImpl<VideoDiagnosisR
     @Resource
     IotAlarmCodeMapper alarmCodeMapper;
     @Override
-    public ReceiveErrorDto saveData(VideoDiagnosisDto videoDiagnosisDto, String msgId, String branchId) throws IllegalAccessException, ParseException {
+    public ReceiveErrorDto saveData(VideoDiagnosisDto videoDiagnosisDto, String msgId) throws IllegalAccessException, ParseException {
         ReceiveErrorDto error = new ReceiveErrorDto();
         //与上次接收到的数据进行比较,如果相同则不进行处理
         //这里要返回true,不然接口调用端会重复发送

+ 3 - 3
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/service/impl/VideoIntegrityCheckServiceImpl.java

@@ -68,7 +68,7 @@ public class VideoIntegrityCheckServiceImpl extends ServiceImpl<VideoIntegrityCh
     IIotDvrChannelService dvrChannelService;
 
     @Override
-    public ReceiveErrorDto saveData(VideoIntegrityCheckDto videoIntegrityCheckDto, String msgId, String branchId) {
+    public ReceiveErrorDto saveData(VideoIntegrityCheckDto videoIntegrityCheckDto, String msgId) {
         String msg = this.checkParam(videoIntegrityCheckDto);
         if (ObjectUtil.isNotEmpty(msg)) {
             return ReceiveErrorDto.error(msg);
@@ -81,14 +81,14 @@ public class VideoIntegrityCheckServiceImpl extends ServiceImpl<VideoIntegrityCh
         String organizationGuid = videoIntegrityCheckDto.getOrganizationGuid();
         SysOrg org = orgService.findByCode(organizationGuid, SecurityConstants.INNER);
         if (org == null) {
-            NorthError error = new NorthError(msgId, branchId, "/video/complete"
+            NorthError error = new NorthError(msgId, "/video/complete"
                     , videoIntegrityCheckDto, "参数非法:organizationGuid:" + organizationGuid + "不正确");
             northErrorService.saveError(error);
             return ReceiveErrorDto.success();
         }
         final IotDvrChannel channel = dvrChannelService.findChannel(videoIntegrityCheckDto.getChannelCode(), videoIntegrityCheckDto.getEquipmentCode(), org.getId());
         if (ObjectUtil.isNull(channel)) {
-            NorthError error = new NorthError(msgId, branchId, "/video/complete"
+            NorthError error = new NorthError(msgId, "/video/complete"
                     , videoIntegrityCheckDto, "通道/设备不存在");
             northErrorService.saveError(error);
             return ReceiveErrorDto.success();

+ 5 - 6
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/util/CheckDataUtil.java

@@ -40,14 +40,13 @@ public class CheckDataUtil {
 
     /**
      * @param obj
-     * @param branchId
      * @param msgId
      * @param path
      * @param fields   允许为null的字段
      * @return NorthError
      * @throws IllegalAccessException
      */
-    public static NorthError checkObjFieldIsNull(Object obj, String branchId, String msgId, String path, List<String> fields) throws IllegalAccessException {
+    public static NorthError checkObjFieldIsNull(Object obj,String msgId, String path, List<String> fields) throws IllegalAccessException {
         NorthError error = null;
         for (Field f : obj.getClass().getDeclaredFields()) {
             f.setAccessible(true);
@@ -58,11 +57,11 @@ public class CheckDataUtil {
                 if (objects == null || objects.size() == 0) {
                     if (fields != null && fields.size() > 0) {
                         if (!fields.contains(f.getName())) {
-                            error = new NorthError(msgId, branchId, path, obj, "参数非法:未传" + f.getName());
+                            error = new NorthError(msgId,  path, obj, "参数非法:未传" + f.getName());
                             break;
                         }
                     } else {
-                        error = new NorthError(msgId, branchId, path, obj, "参数非法:未传" + f.getName());
+                        error = new NorthError(msgId,  path, obj, "参数非法:未传" + f.getName());
                         break;
                     }
                 }
@@ -70,11 +69,11 @@ public class CheckDataUtil {
                 if (f.get(obj) == null || (f.get(obj) != null && StringUtils.isEmpty(f.get(obj).toString().trim()))) {
                     if (fields != null && fields.size() > 0) {
                         if (!fields.contains(f.getName())) {
-                            error = new NorthError(msgId, branchId, path, obj, "参数非法:未传" + f.getName());
+                            error = new NorthError(msgId,  path, obj, "参数非法:未传" + f.getName());
                             break;
                         }
                     } else {
-                        error = new NorthError(msgId, branchId, path, obj, "参数非法:未传" + f.getName());
+                        error = new NorthError(msgId,  path, obj, "参数非法:未传" + f.getName());
                         break;
                     }