java110
2023-03-29 0b04f664887c73e90bf684a4e69c0fdbfe26349d
service-community/src/main/java/com/java110/community/cmd/communityLocation/ListCommunityLocationCmd.java
@@ -23,9 +23,7 @@
import com.java110.dto.FloorDto;
import com.java110.dto.UnitDto;
import com.java110.dto.community.CommunityLocationDto;
import com.java110.intf.community.ICommunityLocationInnerServiceSMO;
import com.java110.intf.community.IFloorInnerServiceSMO;
import com.java110.intf.community.IUnitInnerServiceSMO;
import com.java110.intf.community.*;
import com.java110.utils.exception.CmdException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
@@ -90,12 +88,20 @@
                    List<UnitDto> unitDtos = unitInnerServiceSMOImpl.queryUnits(unitDto);
                    Assert.listOnlyOne(unitDtos, "查询单元错误");
                    communityLocation.setFloorId(unitDtos.get(0).getFloorId());
                    communityLocation.setUnitNum(unitDtos.get(0).getUnitNum());
                    communityLocation.setUnitId(unitDtos.get(0).getUnitId());
                    FloorDto floorDto = new FloorDto();
                    floorDto.setFloorId(unitDtos.get(0).getFloorId());
                    List<FloorDto> floorDtos = floorInnerServiceSMOImpl.queryFloors(floorDto);
                    Assert.listOnlyOne(floorDtos, "查询楼栋错误");
                    communityLocation.setFloorNum(floorDtos.get(0).getFloorNum());
                } else if (!StringUtil.isEmpty(communityLocation.getLocationType()) && communityLocation.getLocationType().equals("6000")
                        && !StringUtil.isEmpty(communityLocation.getLocationObjId()) && !communityLocation.getLocationObjId().equals("-1")) { //楼栋
                    communityLocation.setFloorId(communityLocation.getLocationObjId());
                } else if (!StringUtil.isEmpty(communityLocation.getLocationType()) && communityLocation.getLocationType().equals("7000")
                        && !StringUtil.isEmpty(communityLocation.getLocationObjId()) && !communityLocation.getLocationObjId().equals("-1")) { //停车场
                    communityLocation.setPaId(communityLocation.getLocationObjId());
                } else if (!StringUtil.isEmpty(communityLocation.getLocationType()) && communityLocation.getLocationType().equals("4000")
                        && !StringUtil.isEmpty(communityLocation.getLocationObjId()) && !communityLocation.getLocationObjId().equals("-1")) { //岗亭
                    communityLocation.setBoxId(communityLocation.getLocationObjId());
                }
                communityLocationDtos.add(communityLocation);
            }