Commit dbb37824 authored by wujipeng's avatar wujipeng
Browse files

优化

parent 38e3fcf2
...@@ -115,9 +115,9 @@ public class RoadServiceImpl extends ServiceImpl<RoadMapper, RoadEntity> impleme ...@@ -115,9 +115,9 @@ public class RoadServiceImpl extends ServiceImpl<RoadMapper, RoadEntity> impleme
List<DefectEntity> defectList = defectService.queryByRoadName(relIds, roadDTO.getLev()); List<DefectEntity> defectList = defectService.queryByRoadName(relIds, roadDTO.getLev());
for (DefectEntity defectEntity : defectList) { for (DefectEntity defectEntity : defectList) {
if ("结构性".equals(defectEntity.getType())) { if ("结构性".equals(defectEntity.getType())) {
structuralDefect++; structuralDefect += defectEntity.getNum();
} else if ("功能性".equals(defectEntity.getType())) { } else if ("功能性".equals(defectEntity.getType())) {
functionalDefect++; functionalDefect += defectEntity.getNum();
} }
if (StrUtil.isEmpty(roadDTO.getDefectType()) || roadDTO.getDefectType().equals(defectEntity.getType())) { if (StrUtil.isEmpty(roadDTO.getDefectType()) || roadDTO.getDefectType().equals(defectEntity.getType())) {
RoadVO roadVO = new RoadVO(); RoadVO roadVO = new RoadVO();
...@@ -132,9 +132,9 @@ public class RoadServiceImpl extends ServiceImpl<RoadMapper, RoadEntity> impleme ...@@ -132,9 +132,9 @@ public class RoadServiceImpl extends ServiceImpl<RoadMapper, RoadEntity> impleme
List<RepairEntity> repairList = repairService.queryByRoadName(relIds, roadDTO.getLev()); List<RepairEntity> repairList = repairService.queryByRoadName(relIds, roadDTO.getLev());
for (RepairEntity repairEntity : repairList) { for (RepairEntity repairEntity : repairList) {
if ("结构性".equals(repairEntity.getType())) { if ("结构性".equals(repairEntity.getType())) {
structuralDefect++; structuralDefect += repairEntity.getNum();
} else if ("功能性".equals(repairEntity.getType())) { } else if ("功能性".equals(repairEntity.getType())) {
functionalDefect++; functionalDefect += repairEntity.getNum();
} }
if (StrUtil.isEmpty(roadDTO.getDefectType()) || roadDTO.getDefectType().equals(repairEntity.getType())) { if (StrUtil.isEmpty(roadDTO.getDefectType()) || roadDTO.getDefectType().equals(repairEntity.getType())) {
RoadVO roadVO = new RoadVO(); RoadVO roadVO = new RoadVO();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment