|
@@ -329,7 +329,7 @@ public class StatMeterReadRateByBuildingServiceImpl implements StatMeterReadRate
|
|
|
//2、根据数据项查询客户
|
|
|
//List<Customer> customerList = customerService.getCustomerListByItem(loginUser.getSiteId(), buildingIds, customerId);
|
|
|
|
|
|
-
|
|
|
+ List<Integer> customerIds = customerId != null?newArrayList(customerId):null;
|
|
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
|
|
|
//Integer startDate = Integer.valueOf(LocalDate.now().plusDays(-1).format(formatter));
|
|
@@ -341,16 +341,16 @@ public class StatMeterReadRateByBuildingServiceImpl implements StatMeterReadRate
|
|
|
|
|
|
if (period == 2) { // 昨天,查询天表
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
- customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building",loginUser.getSiteId(), startDate, buildingIds,channelId,newArrayList(customerId));
|
|
|
+ customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building",loginUser.getSiteId(), startDate, buildingIds,channelId,customerIds);
|
|
|
} else if (period == 7) { // 近7天,查询7天表
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
- customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_7day",loginUser.getSiteId(), startDate, buildingIds,channelId,newArrayList(customerId));
|
|
|
+ customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_7day",loginUser.getSiteId(), startDate, buildingIds,channelId,customerIds);
|
|
|
} else if (period == 15) {// 近15天,查询15天表
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
- customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_15day",loginUser.getSiteId(), startDate, buildingIds,channelId,newArrayList(customerId));
|
|
|
+ customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_15day",loginUser.getSiteId(), startDate, buildingIds,channelId,customerIds);
|
|
|
}else if (period == 99) {// 上个月,查询15天表
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
- customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_month",loginUser.getSiteId(), startDate, buildingIds,channelId,newArrayList(customerId));
|
|
|
+ customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_month",loginUser.getSiteId(), startDate, buildingIds,channelId,customerIds);
|
|
|
}
|
|
|
if (customerRateDtoList != null && customerRateDtoList.size()>0) {
|
|
|
for (CustomerRateDto customerRateDto : customerRateDtoList) {
|