Commit 27bd00be authored by tangwei's avatar tangwei

修改电站报表

parent 310e12e9
...@@ -49,6 +49,6 @@ public class DayGenerate { ...@@ -49,6 +49,6 @@ public class DayGenerate {
@TableField("income") @TableField("income")
// 日收益 // 日收益
private Double dayIncome; private Double income;
} }
...@@ -52,5 +52,5 @@ public class MonthGenerate { ...@@ -52,5 +52,5 @@ public class MonthGenerate {
// 月收益 // 月收益
@TableField("income") @TableField("income")
private Double monthIncome; private Double income;
} }
...@@ -50,5 +50,5 @@ public class YearGenerate { ...@@ -50,5 +50,5 @@ public class YearGenerate {
// 年收益 // 年收益
@TableField("income") @TableField("income")
private Double yearIncome; private Double income;
} }
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
<if test="dto.thirdStationIds!=null"> <if test="dto.thirdStationIds!=null">
and hygf_jp_station.third_station_id in and hygf_jp_station.third_station_id in
<foreach collection="dto.thirdStationIds" item="item" index="index" open="(" separator="," close=")"> <foreach collection="dto.thirdStationIds" item="item" index="index" open="(" separator="," close=")">
#{item.stationId} #{item}
</foreach> </foreach>
</if> </if>
<if test="dto.thirdStationId!=null"> <if test="dto.thirdStationId!=null">
......
...@@ -674,10 +674,10 @@ public class JpStationController extends BaseController { ...@@ -674,10 +674,10 @@ public class JpStationController extends BaseController {
return ResponseHelper.buildResponse(page); return ResponseHelper.buildResponse(page);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/queryReport") @PostMapping (value = "/queryReport")
@ApiOperation(httpMethod = "GET",value = "场站报表", notes = "场站报表") @ApiOperation(httpMethod = "POST",value = "场站报表", notes = "场站报表")
public ResponseModel<Page<JpStationDto>> queryReport(@RequestParam(value = "current") int current, @RequestParam public ResponseModel<Page<JpStationDto>> queryReport(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size, JpStationDto reviewDto,String type) { (value = "size") int size,@RequestBody JpStationDto reviewDto,@RequestParam(value = "type") String type) {
Page<JpStationDto> page=jpStationServiceImpl.queryReport(current,size,reviewDto,type); Page<JpStationDto> page=jpStationServiceImpl.queryReport(current,size,reviewDto,type);
...@@ -705,11 +705,11 @@ public class JpStationController extends BaseController { ...@@ -705,11 +705,11 @@ public class JpStationController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/jpstationReportExport", method = RequestMethod.GET) @RequestMapping(value = "/jpstationReportExport", method = RequestMethod.POST)
@ApiOperation(httpMethod = "GET", value = "电站报表导出", notes = "电站报表导出") @ApiOperation(httpMethod = "POST", value = "电站报表导出", notes = "电站报表导出")
public void jpstationReportExport( HttpServletResponse response,JpStationDto reviewDto,String type) { public void jpstationReportExport( HttpServletResponse response,@RequestBody JpStationDto reviewDto,@RequestParam(value = "type")String type) {
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());
List<JpStationDto> jpStationDtos = jpStationServiceImpl.selectReportDate(reviewDto, type,response); List<JpStationDto> jpStationDtos = jpStationServiceImpl.selectReportDate(reviewDto, type,response);
// try { // try {
......
...@@ -492,7 +492,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -492,7 +492,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null); hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null);
hd.setDayGenerate(dayGenerate.getGenerate()); hd.setDayGenerate(dayGenerate.getGenerate());
hd.setTimeDate(dayGenerate.getDayTime()); hd.setTimeDate(dayGenerate.getDayTime());
hd.setDayIncome(dayGenerate.getDayIncome()); hd.setDayIncome(dayGenerate.getIncome());
break; break;
} }
} }
...@@ -515,7 +515,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -515,7 +515,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setThirdStationId(jpStation.getThirdStationId()); hd.setThirdStationId(jpStation.getThirdStationId());
hd.setAccumulatedPower(jpStation.getAccumulatedPower()); hd.setAccumulatedPower(jpStation.getAccumulatedPower());
hd.setMonthGenerate(dayGenerate.getGenerate()); hd.setMonthGenerate(dayGenerate.getGenerate());
hd.setMonthIncome(dayGenerate.getMonthIncome()); hd.setMonthIncome(dayGenerate.getIncome());
hd.setTimeDate(dayGenerate.getMonthTime()); hd.setTimeDate(dayGenerate.getMonthTime());
hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null); hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null);
break; break;
...@@ -541,7 +541,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -541,7 +541,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setThirdStationId(jpStation.getThirdStationId()); hd.setThirdStationId(jpStation.getThirdStationId());
hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null); hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null);
hd.setYearGenerate(dayGenerate.getGenerate()); hd.setYearGenerate(dayGenerate.getGenerate());
hd.setYearIncome(dayGenerate.getYearIncome()); hd.setYearIncome(dayGenerate.getIncome());
hd.setTimeDate(dayGenerate.getYearTime()); hd.setTimeDate(dayGenerate.getYearTime());
break; break;
} }
...@@ -633,7 +633,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -633,7 +633,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null); hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null);
hd.setDayGenerate(dayGenerate.getGenerate()); hd.setDayGenerate(dayGenerate.getGenerate());
hd.setTimeDate(dayGenerate.getDayTime()); hd.setTimeDate(dayGenerate.getDayTime());
hd.setDayIncome(dayGenerate.getDayIncome()); hd.setDayIncome(dayGenerate.getIncome());
break; break;
} }
} }
...@@ -654,7 +654,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -654,7 +654,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setStationContact(jpStation.getStationContact()); hd.setStationContact(jpStation.getStationContact());
hd.setAccumulatedPower(jpStation.getAccumulatedPower()); hd.setAccumulatedPower(jpStation.getAccumulatedPower());
hd.setMonthGenerate(dayGenerate.getGenerate()); hd.setMonthGenerate(dayGenerate.getGenerate());
hd.setMonthIncome(dayGenerate.getMonthIncome()); hd.setMonthIncome(dayGenerate.getIncome());
hd.setTimeDate(dayGenerate.getMonthTime()); hd.setTimeDate(dayGenerate.getMonthTime());
hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null); hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null);
break; break;
...@@ -679,7 +679,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -679,7 +679,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null); hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null);
hd.setYearGenerate(dayGenerate.getGenerate()); hd.setYearGenerate(dayGenerate.getGenerate());
hd.setYearIncome(dayGenerate.getYearIncome()); hd.setYearIncome(dayGenerate.getIncome());
hd.setTimeDate(dayGenerate.getYearTime()); hd.setTimeDate(dayGenerate.getYearTime());
break; break;
} }
......
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