gao.qiang hai 1 ano
pai
achega
335e4285b5

+ 24 - 1
business-service/src/main/java/com/ozs/service/impl/BaseCameraManagementServiceImpl.java

@@ -404,11 +404,34 @@ public class BaseCameraManagementServiceImpl extends ServiceImpl<BaseCameraManag
                 camera.eq(BaseCameraManagement::getLineDir, msgAlarm.getLineDir());
                 camera.eq(BaseCameraManagement::getRailwayCode, msgAlarm.getRailwayCode());
                 camera.eq(BaseCameraManagement::getOnline, 2);
-                camera.like(BaseCameraManagement::getEnableOrNot, 1);
+                camera.eq(BaseCameraManagement::getEnableOrNot, 1);
                 if (StringUtils.isNotEmpty(cameraCode)){
                     wrapper.eq("camera_code", cameraCode);
                 }
                 List<BaseCameraManagement> baseCameraManagementList = this.list(camera);
+                for (BaseCameraManagement baseCameraManagement : baseCameraManagementList) {
+                    String end = "";
+                    if (!StringUtils.isEmptySunhh(baseCameraManagement.getEndMile())) {
+                        end = AppendUtils.stringAppend(baseCameraManagement.getEndMile());
+                        baseCameraManagement.setEndMiles(end);
+                        baseCameraManagement.setEndMileBD(new BigDecimal(baseCameraManagement.getEndMile()).divide(new BigDecimal(1000)).setScale(3, RoundingMode.HALF_UP));
+                    }
+                    String begin = "";
+                    if (!StringUtils.isEmptySunhh(baseCameraManagement.getBeginMile())) {
+                        begin = AppendUtils.stringAppend(baseCameraManagement.getBeginMile());
+                        baseCameraManagement.setBeginMiles(begin);
+                        baseCameraManagement.setBeginMileBD(new BigDecimal(baseCameraManagement.getBeginMile()).divide(new BigDecimal(1000)).setScale(3, RoundingMode.HALF_UP));
+                    }
+                    baseCameraManagement.setMilesRange(begin + "+" + end);
+                    String mils = AppendUtils.stringAppend(baseCameraManagement.getInstallMile());
+                    baseCameraManagement.setInstallMiles(mils);
+                    LambdaQueryWrapper<BaseRailwayManagement> queryWrapper = new LambdaQueryWrapper<BaseRailwayManagement>();
+                    if (!ObjectUtils.isEmpty(baseCameraManagement.getRailwayCode())) {
+                        queryWrapper.eq(BaseRailwayManagement::getRailwayCode, baseCameraManagement.getRailwayCode());
+                    }
+                    BaseRailwayManagement baseRailwayManagement = baseRailwayManagementService.getOne(queryWrapper);
+                    baseCameraManagement.setRailwayName(baseRailwayManagement.getRailwayName());
+                }
                 if (!ObjectUtils.isEmpty(baseCameraManagementList)) {
                     list.addAll(baseCameraManagementList);
                 }