Commit 3e2256aa authored by chenzhao's avatar chenzhao

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

parents 48cf193e cc7a5d84
...@@ -5,6 +5,7 @@ import com.alibaba.excel.EasyExcel; ...@@ -5,6 +5,7 @@ import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.support.ExcelTypeEnum; import com.alibaba.excel.support.ExcelTypeEnum;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto; import com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto; import com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.*; import com.yeejoin.amos.boot.module.hygf.api.entity.*;
...@@ -240,18 +241,24 @@ public class JpInverterController extends BaseController { ...@@ -240,18 +241,24 @@ public class JpInverterController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/jpInverterDayReport") @GetMapping(value = "/jpInverterDayReport")
@ApiOperation(httpMethod = "GET", value = "逆变器日报表", notes = "逆变器日报表") @ApiOperation(httpMethod = "GET", value = "逆变器日报表", notes = "逆变器日报表")
public ResponseModel<Page<TdHYGFInverterDayGenerate>> jpInverterDayReport(@RequestParam(value = "current") int current, @RequestParam(value = "size") int size, String time, @RequestParam(required = false) List<String> snCodes) { public ResponseModel<Page<TdHYGFInverterDayGenerate>> jpInverterDayReport(@RequestParam(value = "current") int current, @RequestParam(value = "size") int size,@RequestParam(required = false) 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());
if(StringUtils.isEmpty(time)){
time = DateUtil.format(new Date(),"yyyy-MM-dd");
}
return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterDayReport(current,size,time,snCodes,stationIds)); return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterDayReport(current,size,time,snCodes,stationIds));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/jpInverterDayReportExport", method = RequestMethod.GET) @RequestMapping(value = "/jpInverterDayReportExport", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "逆变器日报表导出", notes = "逆变器日报表导出") @ApiOperation(httpMethod = "GET", value = "逆变器日报表导出", notes = "逆变器日报表导出")
public void jpInverterDayReportExport( String time,@RequestParam(required = false) List<String> snCodes, HttpServletResponse response) { public void jpInverterDayReportExport( @RequestParam(required = false)String time,@RequestParam(required = false) List<String> snCodes, HttpServletResponse response) {
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());
if(StringUtils.isEmpty(time)){
time = DateUtil.format(new Date(),"yyyy-MM-dd");
}
List<TdHYGFInverterDayGenerate> tdHYGFInverterDayGenerates =jpInverterServiceImpl.jpInverterDayReportExport(time,snCodes,stationIds); List<TdHYGFInverterDayGenerate> tdHYGFInverterDayGenerates =jpInverterServiceImpl.jpInverterDayReportExport(time,snCodes,stationIds);
try { try {
setResponseHeadForDowload(response,"逆变器日报表.xls"); setResponseHeadForDowload(response,"逆变器日报表.xls");
...@@ -263,18 +270,24 @@ public class JpInverterController extends BaseController { ...@@ -263,18 +270,24 @@ 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<TdHYGFInverterMonthGenerate>> 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,@RequestParam(required = false) 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());
if(StringUtils.isEmpty(time)){
time = DateUtil.format(new Date(),"yyyy-MM");
}
return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterMonthReport(current,size,time,snCodes,stationIds)); return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterMonthReport(current,size,time,snCodes,stationIds));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/jpInverterMonthReportExport", method = RequestMethod.GET) @RequestMapping(value = "/jpInverterMonthReportExport", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "逆变器月报表导出", notes = "逆变器月报表导出") @ApiOperation(httpMethod = "GET", value = "逆变器月报表导出", notes = "逆变器月报表导出")
public void jpInverterMonthReportExport( String time,@RequestParam(required = false) List<String> snCodes, HttpServletResponse response) { public void jpInverterMonthReportExport( @RequestParam(required = false)String time,@RequestParam(required = false) List<String> snCodes, HttpServletResponse response) {
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());
if(StringUtils.isEmpty(time)){
time = DateUtil.format(new Date(),"yyyy-MM");
}
List<TdHYGFInverterMonthGenerate> tdHYGFInverterMonthGenerates =jpInverterServiceImpl.jpInverterMonthReportExport(time,snCodes,stationIds); List<TdHYGFInverterMonthGenerate> tdHYGFInverterMonthGenerates =jpInverterServiceImpl.jpInverterMonthReportExport(time,snCodes,stationIds);
try { try {
setResponseHeadForDowload(response,"逆变器月报表.xls"); setResponseHeadForDowload(response,"逆变器月报表.xls");
...@@ -287,18 +300,24 @@ public class JpInverterController extends BaseController { ...@@ -287,18 +300,24 @@ 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<TdHYGFInverterYearGenerate>> 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, @RequestParam(required = false)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());
if(StringUtils.isEmpty(time)){
time = DateUtil.format(new Date(),"yyyy");
}
return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterYearReport(current,size,time,snCodes,stationIds)); return ResponseHelper.buildResponse(jpInverterServiceImpl.jpInverterYearReport(current,size,time,snCodes,stationIds));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/jpInverterYearReportExport", method = RequestMethod.GET) @RequestMapping(value = "/jpInverterYearReportExport", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "逆变器年报表导出", notes = "逆变器年报表导出") @ApiOperation(httpMethod = "GET", value = "逆变器年报表导出", notes = "逆变器年报表导出")
public void jpInverterYearReportExport( String time,@RequestParam(required = false) List<String> snCodes, HttpServletResponse response) { public void jpInverterYearReportExport(@RequestParam(required = false) String time,@RequestParam(required = false) List<String> snCodes, HttpServletResponse response) {
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());
if(StringUtils.isEmpty(time)){
time = DateUtil.format(new Date(),"yyyy");
}
List<TdHYGFInverterYearGenerate> tdHYGFInverterYearGenerates =jpInverterServiceImpl.jpInverterYearReportExport(time,snCodes,stationIds); List<TdHYGFInverterYearGenerate> tdHYGFInverterYearGenerates =jpInverterServiceImpl.jpInverterYearReportExport(time,snCodes,stationIds);
try { try {
setResponseHeadForDowload(response,"逆变器年报表.xls"); setResponseHeadForDowload(response,"逆变器年报表.xls");
......
...@@ -392,7 +392,7 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -392,7 +392,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
int total = fanHealthIndexDayMapper.selectDataTotal(healthLevel, area, equipmentName, subSystem, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop); int total = fanHealthIndexDayMapper.selectDataTotal(healthLevel, area, equipmentName, subSystem, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop);
page.setRecords(fanHealthIndexDays); page.setRecords(fanHealthIndexDays);
page.setTotal(total); page.setTotal(total);
page.setTotal(Long.valueOf(fanHealthIndexDays.size())); // page.setTotal(Long.valueOf(fanHealthIndexDays.size()));
return ResponseHelper.buildResponse(page); return ResponseHelper.buildResponse(page);
} }
...@@ -549,6 +549,8 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -549,6 +549,8 @@ public class IdxBizFanHealthIndexController extends BaseController {
Page page = new Page<>(); Page page = new Page<>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
int total = fanHealthIndexDayMapper.selectDataTotal(healthLevel, area, equipmentName, subSystem, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop);
page.setTotal(total);
page.setRecords(fanHealthIndexDays); page.setRecords(fanHealthIndexDays);
return ResponseHelper.buildResponse(page); return ResponseHelper.buildResponse(page);
}else if (requiredType.equals("按小时")){ }else if (requiredType.equals("按小时")){
...@@ -578,6 +580,8 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -578,6 +580,8 @@ public class IdxBizFanHealthIndexController extends BaseController {
Page page = new Page<>(); Page page = new Page<>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
int total = fanHealthIndexDayMapper.selectDataTotal(healthLevel, area, equipmentName, subSystem, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop);
page.setTotal(total);
page.setRecords(fanHealthIndexHours); page.setRecords(fanHealthIndexHours);
return ResponseHelper.buildResponse(page); return ResponseHelper.buildResponse(page);
}else { }else {
...@@ -600,6 +604,8 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -600,6 +604,8 @@ public class IdxBizFanHealthIndexController extends BaseController {
Page page = new Page<>(); Page page = new Page<>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
int total = fanHealthIndexDayMapper.selectDataTotal(healthLevel, area, equipmentName, subSystem, analysisType, analysisObjType, station, pointName, indexAddress, startTimeTop, endTimeTop);
page.setTotal(total);
page.setRecords(fanHealthIndexMoments); page.setRecords(fanHealthIndexMoments);
return ResponseHelper.buildResponse(page); return ResponseHelper.buildResponse(page);
} }
......
...@@ -111,6 +111,7 @@ ...@@ -111,6 +111,7 @@
</select> </select>
<select id="selectWarningPoint" resultType="com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord"> <select id="selectWarningPoint" resultType="com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord">
select * from (
SELECT SELECT
a.station, a.station,
a.warning_name, a.warning_name,
...@@ -134,7 +135,7 @@ ...@@ -134,7 +135,7 @@
point_name, point_name,
rec_date , rec_date ,
content, content,
warning_name warning_name) b
limit #{current},#{size} limit #{current},#{size}
</select> </select>
......
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