Commit f10478ec authored by chenzhao's avatar chenzhao

Merge branch 'developer' of http://36.40.66.175:5000/moa/amos-boot-biz into developer

parents f359b5a3 5efa1e42
...@@ -261,10 +261,10 @@ public class JpInverterController extends BaseController { ...@@ -261,10 +261,10 @@ public class JpInverterController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/jpInverterMonthReport") @GetMapping(value = "/jpInverterMonthReport")
@ApiOperation(httpMethod = "GET", value = "逆变器月报表", notes = "逆变器月报表") @ApiOperation(httpMethod = "GET", value = "逆变器月报表", notes = "逆变器月报表")
public ResponseModel<Page<TdHYGFInverterYearGenerate>> jpInverterMonthReport(@RequestParam(value = "current") int current, @RequestParam(value = "size") int size, String time, @RequestParam(required = false) List<String> snCodes) { public ResponseModel<Page<TdHYGFInverterMonthGenerate>> jpInverterMonthReport(@RequestParam(value = "current") int current, @RequestParam(value = "size") int size, String time, @RequestParam(required = false) List<String> snCodes) {
List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto()); List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto());
List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList()); List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList());
return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterYearReport(current,size,time,snCodes,stationIds)); return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterMonthReport(current,size,time,snCodes,stationIds));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
...@@ -285,10 +285,10 @@ public class JpInverterController extends BaseController { ...@@ -285,10 +285,10 @@ public class JpInverterController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/jpInverterYearReport") @GetMapping(value = "/jpInverterYearReport")
@ApiOperation(httpMethod = "GET", value = "逆变器年报表", notes = "逆变器年报表") @ApiOperation(httpMethod = "GET", value = "逆变器年报表", notes = "逆变器年报表")
public ResponseModel<Page<TdHYGFInverterDayGenerate>> jpInverterYearReport(@RequestParam(value = "current") int current, @RequestParam(value = "size") int size, String time, @RequestParam(required = false) List<String> snCodes) { public ResponseModel<Page<TdHYGFInverterYearGenerate>> jpInverterYearReport(@RequestParam(value = "current") int current, @RequestParam(value = "size") int size, String time, @RequestParam(required = false) List<String> snCodes) {
List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto()); List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto());
List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList()); List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList());
return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterDayReport(current,size,time,snCodes,stationIds)); return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterYearReport(current,size,time,snCodes,stationIds));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
...@@ -176,11 +176,11 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter ...@@ -176,11 +176,11 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
queryWrapper.in("sn_code", sncodes); queryWrapper.in("sn_code", sncodes);
} }
queryWrapper.orderByDesc("day_time"); queryWrapper.orderByDesc("day_time");
queryWrapper.last(" limit "+(current-1)*size+","+(current*size));
List<TdHYGFInverterMonthGenerate> tdHYGFInverterMonthGenerates = tdHYGFInverterMonthGenerateMapper.selectList(queryWrapper); List<TdHYGFInverterMonthGenerate> tdHYGFInverterMonthGenerates = tdHYGFInverterMonthGenerateMapper.selectList(queryWrapper);
tdHYGFInverterMonthGeneratePage.setTotal(tdHYGFInverterMonthGenerates.size()); tdHYGFInverterMonthGeneratePage.setTotal(tdHYGFInverterMonthGenerates.size());
tdHYGFInverterMonthGeneratePage.setSize(size); tdHYGFInverterMonthGeneratePage.setSize(size);
tdHYGFInverterMonthGeneratePage.setCurrent(current); tdHYGFInverterMonthGeneratePage.setCurrent(current);
tdHYGFInverterMonthGenerates = tdHYGFInverterMonthGenerates.subList((current - 1) * size, current * size > tdHYGFInverterMonthGenerates.size() ? tdHYGFInverterMonthGenerates.size() : current * size);
tdHYGFInverterMonthGeneratePage.setRecords(tdHYGFInverterMonthGenerates); tdHYGFInverterMonthGeneratePage.setRecords(tdHYGFInverterMonthGenerates);
return tdHYGFInverterMonthGeneratePage; return tdHYGFInverterMonthGeneratePage;
} }
...@@ -206,11 +206,11 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter ...@@ -206,11 +206,11 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
queryWrapper.in("sn_code", sncodes); queryWrapper.in("sn_code", sncodes);
} }
queryWrapper.orderByDesc("month_time"); queryWrapper.orderByDesc("month_time");
queryWrapper.last(" limit "+(current-1)*size+","+(current*size));
List<TdHYGFInverterYearGenerate> tdHYGFInverterYearGenerates = tdHYGFInverterYearGenerateMapper.selectList(queryWrapper); List<TdHYGFInverterYearGenerate> tdHYGFInverterYearGenerates = tdHYGFInverterYearGenerateMapper.selectList(queryWrapper);
tdHYGFInverterYearGeneratePage.setTotal(tdHYGFInverterYearGenerates.size()); tdHYGFInverterYearGeneratePage.setTotal(tdHYGFInverterYearGenerates.size());
tdHYGFInverterYearGeneratePage.setSize(size); tdHYGFInverterYearGeneratePage.setSize(size);
tdHYGFInverterYearGeneratePage.setCurrent(current); tdHYGFInverterYearGeneratePage.setCurrent(current);
tdHYGFInverterYearGenerates = tdHYGFInverterYearGenerates.subList((current - 1) * size, current * size > tdHYGFInverterYearGenerates.size() ? tdHYGFInverterYearGenerates.size() : current * size);
tdHYGFInverterYearGeneratePage.setRecords(tdHYGFInverterYearGenerates); tdHYGFInverterYearGeneratePage.setRecords(tdHYGFInverterYearGenerates);
return tdHYGFInverterYearGeneratePage; return tdHYGFInverterYearGeneratePage;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment