|
@@ -159,30 +159,26 @@ public class BaseCameraManagementServiceImpl extends ServiceImpl<BaseCameraManag
|
|
|
// accountManagement.setInstallMile(accountManagement.getInstallMileBD() * 1000);
|
|
|
// accountManagement.setEndMile(accountManagement.getEndMile() * 1000);
|
|
|
// accountManagement.setBeginMile(accountManagement.getBeginMile() * 1000);
|
|
|
- if (accountManagement.getBeginMile() <= accountManagement.getEndMile()) {
|
|
|
- if (!StringUtils.isEmpty(cameraManagementVos.getMonitoringDirectionName())) {
|
|
|
- List<SysDictData> data = dictTypeService.selectDictDataByType("monitoring_direction");
|
|
|
- for (SysDictData datum : data) {
|
|
|
- if (datum.getDictLabel().equals(cameraManagementVos.getMonitoringDirectionName())) {
|
|
|
- accountManagement.setMonitoringDirection(Integer.valueOf(datum.getDictValue()));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(cameraManagementVos.getEnableOrNotName())) {
|
|
|
- accountManagement.setEnableOrNot(cameraManagementVos.getEnableOrNotName().equals("启用") ? 1 : 2);
|
|
|
+
|
|
|
+ if (!StringUtils.isEmpty(cameraManagementVos.getMonitoringDirectionName())) {
|
|
|
+ List<SysDictData> data = dictTypeService.selectDictDataByType("monitoring_direction");
|
|
|
+ for (SysDictData datum : data) {
|
|
|
+ if (datum.getDictLabel().equals(cameraManagementVos.getMonitoringDirectionName())) {
|
|
|
+ accountManagement.setMonitoringDirection(Integer.valueOf(datum.getDictValue()));
|
|
|
}
|
|
|
- baseCameraManagementMapper.insert(accountManagement);
|
|
|
- BaseDeviceDynamicManagement baseDeviceDynamicManagement = new BaseDeviceDynamicManagement();
|
|
|
- baseDeviceDynamicManagement.setCameraCode(accountManagement.getCameraCode());
|
|
|
- baseDeviceDynamicManagement.setUpdateBy(userId);
|
|
|
- baseDeviceDynamicManagement.setCreateBy(userId);
|
|
|
- baseDeviceDynamicManagementMapper.insert(baseDeviceDynamicManagement);
|
|
|
- successNum++;
|
|
|
- successMsg.append(successNum + "、相机编码 " + accountManagement.getCameraCode() + " 导入成功");
|
|
|
- } else {
|
|
|
- failureNum++;
|
|
|
- failureMsg.append(failureNum + "、相机编码为: " + accountManagement.getCameraCode() + "的数据,监控范围开始里程位置不能大于监控范围结束里程位置");
|
|
|
}
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(cameraManagementVos.getEnableOrNotName())) {
|
|
|
+ accountManagement.setEnableOrNot(cameraManagementVos.getEnableOrNotName().equals("启用") ? 1 : 2);
|
|
|
+ }
|
|
|
+ baseCameraManagementMapper.insert(accountManagement);
|
|
|
+ BaseDeviceDynamicManagement baseDeviceDynamicManagement = new BaseDeviceDynamicManagement();
|
|
|
+ baseDeviceDynamicManagement.setCameraCode(accountManagement.getCameraCode());
|
|
|
+ baseDeviceDynamicManagement.setUpdateBy(userId);
|
|
|
+ baseDeviceDynamicManagement.setCreateBy(userId);
|
|
|
+ baseDeviceDynamicManagementMapper.insert(baseDeviceDynamicManagement);
|
|
|
+ successNum++;
|
|
|
+ successMsg.append(successNum + "、相机编码 " + accountManagement.getCameraCode() + " 导入成功");
|
|
|
}
|
|
|
} else {
|
|
|
failureNum++;
|
|
@@ -434,7 +430,7 @@ public class BaseCameraManagementServiceImpl extends ServiceImpl<BaseCameraManag
|
|
|
camera.eq(BaseCameraManagement::getRailwayCode, msgAlarm.getRailwayCode());
|
|
|
camera.eq(BaseCameraManagement::getOnline, 2);
|
|
|
camera.eq(BaseCameraManagement::getEnableOrNot, 1);
|
|
|
- if (StringUtils.isNotEmpty(cameraCode)){
|
|
|
+ if (StringUtils.isNotEmpty(cameraCode)) {
|
|
|
wrapper.eq("camera_code", cameraCode);
|
|
|
}
|
|
|
List<BaseCameraManagement> baseCameraManagementList = this.list(camera);
|
|
@@ -485,7 +481,7 @@ public class BaseCameraManagementServiceImpl extends ServiceImpl<BaseCameraManag
|
|
|
List<BaseCameraManagement> list = new ArrayList<>(baseCameraManagementList);
|
|
|
for (BaseCameraManagement baseCameraManagement : list) {
|
|
|
String flv = CameraUtil.getPlayFlv(baseCameraManagement.getCameraCode(), baseCameraManagement.getChannel());
|
|
|
- BaseVehicleTerminalDto dto=new BaseVehicleTerminalDto();
|
|
|
+ BaseVehicleTerminalDto dto = new BaseVehicleTerminalDto();
|
|
|
dto.setUrl(flv);
|
|
|
dto.setCameraCode(baseCameraManagement.getCameraCode());
|
|
|
dto.setTime(new Date());
|