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 {
@TableField("income")
// 日收益
private Double dayIncome;
private Double income;
}
......@@ -52,5 +52,5 @@ public class MonthGenerate {
// 月收益
@TableField("income")
private Double monthIncome;
private Double income;
}
......@@ -50,5 +50,5 @@ public class YearGenerate {
// 年收益
@TableField("income")
private Double yearIncome;
private Double income;
}
......@@ -181,7 +181,7 @@
<if test="dto.thirdStationIds!=null">
and hygf_jp_station.third_station_id in
<foreach collection="dto.thirdStationIds" item="item" index="index" open="(" separator="," close=")">
#{item.stationId}
#{item}
</foreach>
</if>
<if test="dto.thirdStationId!=null">
......
......@@ -75,7 +75,7 @@ public class JpStationController extends BaseController {
private static String ZX="在线";
private static String LX="离线";
private static String BJ="报警";
private static int FDXSS=1000;
/**
* 新增第三方场站
*
......@@ -492,13 +492,13 @@ public class JpStationController extends BaseController {
Map<String,Object> map=new HashMap<>();
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);
result.setCurrent(1);
result.setTotal(1);
......@@ -674,10 +674,10 @@ public class JpStationController extends BaseController {
return ResponseHelper.buildResponse(page);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/queryReport")
@ApiOperation(httpMethod = "GET",value = "场站报表", notes = "场站报表")
@PostMapping (value = "/queryReport")
@ApiOperation(httpMethod = "POST",value = "场站报表", notes = "场站报表")
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);
......@@ -705,11 +705,11 @@ public class JpStationController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/jpstationReportExport", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "电站报表导出", notes = "电站报表导出")
public void jpstationReportExport( HttpServletResponse response,JpStationDto reviewDto,String type) {
List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto());
List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList());
@RequestMapping(value = "/jpstationReportExport", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "电站报表导出", notes = "电站报表导出")
public void jpstationReportExport( HttpServletResponse response,@RequestBody JpStationDto reviewDto,@RequestParam(value = "type")String type) {
// List<JpStation> jpStation=jpStationServiceImpl.getJpStation(new JpStationDto());
// List<String> stationIds = jpStation.stream().map(jpStation1 -> jpStation1.getThirdStationId()).collect(Collectors.toList());
List<JpStationDto> jpStationDtos = jpStationServiceImpl.selectReportDate(reviewDto, type,response);
// try {
......
......@@ -60,6 +60,8 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
@Autowired
YearGenerateMapper yearGenerateMapper;
private static double FDL=0.0001;
/**
* 分页查询
*/
......@@ -229,7 +231,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
for (int i = 0; i < listx.size(); i++) {
if(datum.getDate().equals(listx.get(i).toString())){
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);
break;
}
......@@ -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.setDayGenerate(dayGenerate.getGenerate());
hd.setTimeDate(dayGenerate.getDayTime());
hd.setDayIncome(dayGenerate.getDayIncome());
hd.setDayIncome(dayGenerate.getIncome());
break;
}
}
......@@ -515,7 +517,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setThirdStationId(jpStation.getThirdStationId());
hd.setAccumulatedPower(jpStation.getAccumulatedPower());
hd.setMonthGenerate(dayGenerate.getGenerate());
hd.setMonthIncome(dayGenerate.getMonthIncome());
hd.setMonthIncome(dayGenerate.getIncome());
hd.setTimeDate(dayGenerate.getMonthTime());
hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null);
break;
......@@ -541,7 +543,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setThirdStationId(jpStation.getThirdStationId());
hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null);
hd.setYearGenerate(dayGenerate.getGenerate());
hd.setYearIncome(dayGenerate.getYearIncome());
hd.setYearIncome(dayGenerate.getIncome());
hd.setTimeDate(dayGenerate.getYearTime());
break;
}
......@@ -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.setDayGenerate(dayGenerate.getGenerate());
hd.setTimeDate(dayGenerate.getDayTime());
hd.setDayIncome(dayGenerate.getDayIncome());
hd.setDayIncome(dayGenerate.getIncome());
break;
}
}
......@@ -654,7 +656,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
hd.setStationContact(jpStation.getStationContact());
hd.setAccumulatedPower(jpStation.getAccumulatedPower());
hd.setMonthGenerate(dayGenerate.getGenerate());
hd.setMonthIncome(dayGenerate.getMonthIncome());
hd.setMonthIncome(dayGenerate.getIncome());
hd.setTimeDate(dayGenerate.getMonthTime());
hd.setFullhour(dayGenerate.getFullhour()!=null?Double.valueOf(String.format("%.2f",dayGenerate.getFullhour())):null);
break;
......@@ -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.setYearGenerate(dayGenerate.getGenerate());
hd.setYearIncome(dayGenerate.getYearIncome());
hd.setYearIncome(dayGenerate.getIncome());
hd.setTimeDate(dayGenerate.getYearTime());
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