Commit a5335c61 authored by chenzhao's avatar chenzhao

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

parents aa11b8f4 872b26ac
...@@ -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">
......
...@@ -75,7 +75,7 @@ public class JpStationController extends BaseController { ...@@ -75,7 +75,7 @@ public class JpStationController extends BaseController {
private static String ZX="在线"; private static String ZX="在线";
private static String LX="离线"; private static String LX="离线";
private static String BJ="报警"; private static String BJ="报警";
private static int FDXSS=1000;
/** /**
* 新增第三方场站 * 新增第三方场站
* *
...@@ -492,13 +492,13 @@ public class JpStationController extends BaseController { ...@@ -492,13 +492,13 @@ public class JpStationController extends BaseController {
Map<String,Object> map=new HashMap<>(); Map<String,Object> map=new HashMap<>();
DecimalFormat format2 = new DecimalFormat("0.00"); DecimalFormat format2 = new DecimalFormat("0.00");
//炭 //炭
map.put("carbon",format2.format(jpStation.getAccumulatedPower()*CARBON)); map.put("carbon",format2.format(jpStation.getAccumulatedPower()*FDXSS*CARBON));
//硫 //硫
map.put("sulfur",format2.format(jpStation.getAccumulatedPower()*SULFUR)); map.put("sulfur",format2.format(jpStation.getAccumulatedPower()*FDXSS*SULFUR));
//粉尘 //粉尘
map.put("dust",format2.format(jpStation.getAccumulatedPower()*DUST)); map.put("dust",format2.format(jpStation.getAccumulatedPower()*FDXSS*DUST));
//煤 //煤
map.put("coal",format2.format(jpStation.getAccumulatedPower()*COAL)); map.put("coal",format2.format(jpStation.getAccumulatedPower()*FDXSS*COAL));
itemList.add(map); itemList.add(map);
result.setCurrent(1); result.setCurrent(1);
result.setTotal(1); result.setTotal(1);
...@@ -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 {
......
...@@ -60,6 +60,8 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -60,6 +60,8 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
@Autowired @Autowired
YearGenerateMapper yearGenerateMapper; YearGenerateMapper yearGenerateMapper;
private static double FDL=0.0001;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -229,7 +231,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -229,7 +231,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
for (int i = 0; i < listx.size(); i++) { for (int i = 0; i < listx.size(); i++) {
if(datum.getDate().equals(listx.get(i).toString())){ if(datum.getDate().equals(listx.get(i).toString())){
listy.remove(i); listy.remove(i);
String format = datum.getNum()!=null?new DecimalFormat("0.000").format(datum.getNum()):null; String format = datum.getNum()!=null?new DecimalFormat("0.000").format(datum.getNum()*FDL):null;
listy.add(i,format); listy.add(i,format);
break; break;
} }
...@@ -492,7 +494,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -492,7 +494,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 +517,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -515,7 +517,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 +543,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -541,7 +543,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 +635,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -633,7 +635,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 +656,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -654,7 +656,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 +681,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -679,7 +681,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