فهرست منبع

取消导入判断

gao.qiang 6 ماه پیش
والد
کامیت
8584cfab65
1فایلهای تغییر یافته به همراه17 افزوده شده و 22 حذف شده
  1. 17 22
      business-service/src/main/java/com/ozs/service/impl/BaseCameraManagementServiceImpl.java

+ 17 - 22
business-service/src/main/java/com/ozs/service/impl/BaseCameraManagementServiceImpl.java

@@ -161,30 +161,25 @@ 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.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);
-                                    }
-                                    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++;