| @@ -152,6 +152,12 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| private FloorBuildingIdDTO getFloorBuildingIds(TenantEntity tenantEntity,List<Long> floorIds,List<Long> buildingIds) { | private FloorBuildingIdDTO getFloorBuildingIds(TenantEntity tenantEntity,List<Long> floorIds,List<Long> buildingIds) { | ||||
| //如果楼层是全选了的,则代表的是楼座。 | //如果楼层是全选了的,则代表的是楼座。 | ||||
| if (null == buildingIds || buildingIds.size() <= 0 ) { | |||||
| FloorBuildingIdDTO dto = new FloorBuildingIdDTO(); | |||||
| dto.setType(EnumEnergyMeterShopFloorType.FLOOR); | |||||
| dto.setIds(floorIds); | |||||
| return dto; | |||||
| } | |||||
| //根据楼座id查询楼层 | //根据楼座id查询楼层 | ||||
| WxMallFloor fq = new WxMallFloor(); | WxMallFloor fq = new WxMallFloor(); | ||||
| fq.updateTenantInfo(tenantEntity); | fq.updateTenantInfo(tenantEntity); | ||||
| @@ -184,11 +190,10 @@ public class WxEnergyServiceImpl implements WxEnergyService { | |||||
| } | } | ||||
| }else if (record.getPhysicsType() == EnumEnergyMeterPhysicsType.PUBLIC.getCode() || record.getPhysicsType() == EnumEnergyMeterPhysicsType.SUMMARY.getCode()) { | }else if (record.getPhysicsType() == EnumEnergyMeterPhysicsType.PUBLIC.getCode() || record.getPhysicsType() == EnumEnergyMeterPhysicsType.SUMMARY.getCode()) { | ||||
| List<Long> floorIds = record.getFloorIds(); | List<Long> floorIds = record.getFloorIds(); | ||||
| List<Long> buildindIds = record.getBuildingIds(); | |||||
| if (null == floorIds || floorIds.size() <= 0 || null == buildindIds || buildindIds.size() <= 0 ) { | |||||
| if (null == floorIds || floorIds.size() <= 0) { | |||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"必须选择楼层和楼座"); | throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"必须选择楼层和楼座"); | ||||
| } | } | ||||
| FloorBuildingIdDTO dto = getFloorBuildingIds(record, floorIds, buildindIds); | |||||
| FloorBuildingIdDTO dto = getFloorBuildingIds(record, floorIds, record.getBuildingIds()); | |||||
| record.setType(dto.getType().getCode()); | record.setType(dto.getType().getCode()); | ||||
| aliasIds = dto.getIds(); | aliasIds = dto.getIds(); | ||||
| if (null == aliasIds || aliasIds.size() <= 0 ) { | if (null == aliasIds || aliasIds.size() <= 0 ) { | ||||