|
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.generator.config.IFileCreate;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
|
+import com.ozs.common.core.domain.entity.SysDictData;
|
|
|
import com.ozs.common.exception.ServiceException;
|
|
|
import com.ozs.common.utils.AppendUtils;
|
|
|
import com.ozs.common.utils.StringUtils;
|
|
@@ -21,6 +22,7 @@ import com.ozs.mapper.*;
|
|
|
import com.ozs.service.BaseCameraManagementService;
|
|
|
import com.ozs.service.BaseRailwayManagementService;
|
|
|
import com.ozs.service.BaseUserService;
|
|
|
+import com.ozs.system.service.ISysDictTypeService;
|
|
|
import com.ozs.utils.CameraUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -63,6 +65,8 @@ public class BaseCameraManagementServiceImpl extends ServiceImpl<BaseCameraManag
|
|
|
private SkynetHeartbeatLogMapper skynetHeartbeatLogMapper;
|
|
|
@Autowired
|
|
|
private BaseRailwayManagementMapper baseRailwayManagementMapper;
|
|
|
+ @Autowired
|
|
|
+ private ISysDictTypeService dictTypeService;
|
|
|
|
|
|
/**
|
|
|
* 相机台账管理表导入
|
|
@@ -153,6 +157,14 @@ public class BaseCameraManagementServiceImpl extends ServiceImpl<BaseCameraManag
|
|
|
// 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()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
baseCameraManagementMapper.insert(accountManagement);
|
|
|
BaseDeviceDynamicManagement baseDeviceDynamicManagement = new BaseDeviceDynamicManagement();
|
|
|
baseDeviceDynamicManagement.setCameraCode(accountManagement.getCameraCode());
|
|
@@ -185,6 +197,14 @@ public class BaseCameraManagementServiceImpl extends ServiceImpl<BaseCameraManag
|
|
|
log.debug(accountManagement.getDeptName() + "主键id:" + deptId);
|
|
|
// if (!ObjectUtils.isEmpty(deptId)) {
|
|
|
accountManagement.setDeptId(deptId);
|
|
|
+ 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.update(accountManagement, lw);
|
|
|
LambdaQueryWrapper<BaseDeviceDynamicManagement> wrapper = new LambdaQueryWrapper<BaseDeviceDynamicManagement>();
|
|
|
if (!StringUtils.isEmptySunhh(baseAccountManagement.getCameraCode())) {
|