|
@@ -171,9 +171,17 @@ public class TPumpingStationServiceImpl implements ITPumpingStationService
|
|
//通过楼号和泵站查询对应的楼号是否已经添加过了
|
|
//通过楼号和泵站查询对应的楼号是否已经添加过了
|
|
List<TPumpingStationNeighbourhoodNumber> tPumpingStationNeighbourhoodNumbers = this.tPumpingStationNeighbourhoodNumberMapper.selectTPumpingStationNeighbourhoodNumberList(TPumpingStationNeighbourhoodNumber.builder().pumpingStationId(pumpingStationId).neighborhoodId(tNeighborhoodBuilding.getNeighborhoodId()).neighborhoodBuildingId(tNeighborhoodBuilding.getId()).build());
|
|
List<TPumpingStationNeighbourhoodNumber> tPumpingStationNeighbourhoodNumbers = this.tPumpingStationNeighbourhoodNumberMapper.selectTPumpingStationNeighbourhoodNumberList(TPumpingStationNeighbourhoodNumber.builder().pumpingStationId(pumpingStationId).neighborhoodId(tNeighborhoodBuilding.getNeighborhoodId()).neighborhoodBuildingId(tNeighborhoodBuilding.getId()).build());
|
|
if(!CollectionUtils.isEmpty(tPumpingStationNeighbourhoodNumbers)){
|
|
if(!CollectionUtils.isEmpty(tPumpingStationNeighbourhoodNumbers)){
|
|
- TPumpingStationNeighbourhoodNumber tPumpingStationNeighbourhoodNumber = tPumpingStationNeighbourhoodNumbers.get(0);
|
|
|
|
- neighbourhoodNumberAndAddFlag.setId(tPumpingStationNeighbourhoodNumber.getId());
|
|
|
|
- neighbourhoodNumberAndAddFlag.setAdd(true);
|
|
|
|
|
|
+// TPumpingStationNeighbourhoodNumber tPumpingStationNeighbourhoodNumber = tPumpingStationNeighbourhoodNumbers.get(0);
|
|
|
|
+// neighbourhoodNumberAndAddFlag.setId(tPumpingStationNeighbourhoodNumber.getId());
|
|
|
|
+ neighbourhoodNumberAndAddFlag.setAddStatus(2);
|
|
|
|
+ }else{
|
|
|
|
+ //查看对应的楼号是不是被其他泵站添加了
|
|
|
|
+ List<TPumpingStationNeighbourhoodNumber> tPumpingStationNeighbourhoodNumbers1 = this.tPumpingStationNeighbourhoodNumberMapper.selectTPumpingStationNeighbourhoodNumberList(TPumpingStationNeighbourhoodNumber.builder().neighborhoodId(tNeighborhoodBuilding.getNeighborhoodId()).neighborhoodBuildingId(tNeighborhoodBuilding.getId()).build());
|
|
|
|
+ if(!CollectionUtils.isEmpty(tPumpingStationNeighbourhoodNumbers1)){
|
|
|
|
+ neighbourhoodNumberAndAddFlag.setAddStatus(1);
|
|
|
|
+ }else{
|
|
|
|
+ neighbourhoodNumberAndAddFlag.setAddStatus(0);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
result.add(neighbourhoodNumberAndAddFlag);
|
|
result.add(neighbourhoodNumberAndAddFlag);
|
|
}
|
|
}
|