|
@@ -110,6 +110,16 @@ public class StatMeterReadRateByConcentratorServiceImpl implements StatMeterRead
|
|
|
public void exportRateListByConcentrator(CommonQueryCondition condition, HttpServletResponse httpServletResponse) {
|
|
|
log.info("begin StatMeterReadRateByConcentratorService exportRateListByConcentrator,condition ={} ", JSON.toJSONString(condition));
|
|
|
// 1,查询数据
|
|
|
+ if(condition.getPeriod().equals(MeterReadPeriod.TODAY)){
|
|
|
+ condition.setStatDay(Integer.parseInt(DateTimeUtil.formatNow("yyyyMMdd")));
|
|
|
+ }
|
|
|
+ else if(condition.getPeriod().equals(MeterReadPeriod.LAST_MONTH)){
|
|
|
+ DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyyMM");
|
|
|
+ condition.setStatDay(Integer.parseInt(LocalDateTime.now().plusMonths(-1).format(df)));
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ condition.setStatDay(Integer.parseInt(DateTimeUtil.formatDate(DateTimeUtil.beforeNow(1), "yyyyMMdd")));
|
|
|
+ }
|
|
|
List<StatMeterReadRateDto> list = baseQuery(condition);
|
|
|
// 2,定义excel格式&内容
|
|
|
String title = "按集中器统计抄表率";
|
|
@@ -120,7 +130,7 @@ public class StatMeterReadRateByConcentratorServiceImpl implements StatMeterRead
|
|
|
StatMeterReadRateDto dto = list.get(i);
|
|
|
objs = new Object[rowsName.length];
|
|
|
objs[0] = i;
|
|
|
- objs[1] = dto.getCollectorNo() ;
|
|
|
+ objs[1] = dto.getConcentratorId() ;
|
|
|
objs[2] = dto.getCustomerName();
|
|
|
objs[3] = dto.getDeviceTypeName();
|
|
|
objs[4] = dto.getDeviceCount();
|