Browse Source

1、运行报表增加分页参数。

dev_mz
25604 1 week ago
parent
commit
981ddd6126
  1. 8
      mh-admin/src/main/java/com/mh/web/controller/report/ReportHeatingController.java
  2. 7
      mh-admin/src/main/java/com/mh/web/controller/report/ReportHotWaterController.java
  3. 4
      mh-admin/src/main/java/com/mh/web/controller/report/ReportMeterReadingsController.java
  4. 7
      mh-admin/src/main/java/com/mh/web/controller/report/ReportSteamController.java
  5. 9
      mh-admin/src/main/java/com/mh/web/controller/report/ReportSysController.java
  6. 8
      mh-common/src/main/java/com/mh/common/core/domain/entity/ReportHeatingRunParamHis.java
  7. 8
      mh-common/src/main/java/com/mh/common/core/domain/entity/ReportHotWaterParamHis.java
  8. 8
      mh-common/src/main/java/com/mh/common/core/domain/entity/ReportSteamRunParamHis.java
  9. 8
      mh-common/src/main/java/com/mh/common/core/domain/entity/ReportSysRunParamHis.java

8
mh-admin/src/main/java/com/mh/web/controller/report/ReportHeatingController.java

@ -1,16 +1,20 @@
package com.mh.web.controller.report; package com.mh.web.controller.report;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.github.pagehelper.PageHelper;
import com.mh.common.core.controller.BaseController; import com.mh.common.core.controller.BaseController;
import com.mh.common.core.domain.AjaxResult; import com.mh.common.core.domain.AjaxResult;
import com.mh.common.core.domain.dto.ReportHeatingRunParamDTO; import com.mh.common.core.domain.dto.ReportHeatingRunParamDTO;
import com.mh.common.core.domain.dto.ReportSteamRunParamDTO; import com.mh.common.core.domain.dto.ReportSteamRunParamDTO;
import com.mh.common.core.domain.entity.ReportHeatingRunParamHis; import com.mh.common.core.domain.entity.ReportHeatingRunParamHis;
import com.mh.common.core.domain.entity.ReportSteamRunParamHis; import com.mh.common.core.domain.entity.ReportSteamRunParamHis;
import com.mh.common.core.page.PageDomain;
import com.mh.common.core.page.TableDataInfo; import com.mh.common.core.page.TableDataInfo;
import com.mh.common.core.page.TableSupport;
import com.mh.common.utils.file.handle.ExcelFillCellMergeHandler; import com.mh.common.utils.file.handle.ExcelFillCellMergeHandler;
import com.mh.common.utils.file.handle.ReportSysParamHandler; import com.mh.common.utils.file.handle.ReportSysParamHandler;
import com.mh.common.utils.file.handle.RowHeightStyleHandler; import com.mh.common.utils.file.handle.RowHeightStyleHandler;
import com.mh.common.utils.sql.SqlUtil;
import com.mh.system.service.report.IReportHeatingService; import com.mh.system.service.report.IReportHeatingService;
import com.mh.system.service.report.IReportSteamService; import com.mh.system.service.report.IReportSteamService;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
@ -44,7 +48,9 @@ public class ReportHeatingController extends BaseController {
@PostMapping("/list") @PostMapping("/list")
public TableDataInfo list(@RequestBody ReportHeatingRunParamHis reportHeatingRunParamHis) { public TableDataInfo list(@RequestBody ReportHeatingRunParamHis reportHeatingRunParamHis) {
startPage(); if (reportHeatingRunParamHis.getPageNum() != 0) {
PageHelper.startPage(reportHeatingRunParamHis.getPageNum(), reportHeatingRunParamHis.getPageSize());
}
List<ReportHeatingRunParamHis> list = reportHeatingService.selectHeatingList(reportHeatingRunParamHis); List<ReportHeatingRunParamHis> list = reportHeatingService.selectHeatingList(reportHeatingRunParamHis);
return getDataTable(list); return getDataTable(list);
} }

7
mh-admin/src/main/java/com/mh/web/controller/report/ReportHotWaterController.java

@ -1,6 +1,7 @@
package com.mh.web.controller.report; package com.mh.web.controller.report;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.github.pagehelper.PageHelper;
import com.mh.common.core.controller.BaseController; import com.mh.common.core.controller.BaseController;
import com.mh.common.core.domain.AjaxResult; import com.mh.common.core.domain.AjaxResult;
import com.mh.common.core.domain.dto.BFloorReportHotWaterDTO; import com.mh.common.core.domain.dto.BFloorReportHotWaterDTO;
@ -44,7 +45,9 @@ public class ReportHotWaterController extends BaseController {
@PostMapping("/list") @PostMapping("/list")
public TableDataInfo list(@RequestBody ReportHotWaterParamHis reportHotWaterParamHis) public TableDataInfo list(@RequestBody ReportHotWaterParamHis reportHotWaterParamHis)
{ {
startPage(); if (reportHotWaterParamHis.getPageNum() != 0) {
PageHelper.startPage(reportHotWaterParamHis.getPageNum(), reportHotWaterParamHis.getPageSize());
}
List<ReportHotWaterParamHis> list = reportHotWaterService.selectList(reportHotWaterParamHis); List<ReportHotWaterParamHis> list = reportHotWaterService.selectList(reportHotWaterParamHis);
return getDataTable(list); return getDataTable(list);
} }
@ -56,7 +59,7 @@ public class ReportHotWaterController extends BaseController {
} }
@PostMapping("/export") @PostMapping("/export")
public void exportExcel(@RequestBody ReportHotWaterParamHis reportHotWaterParamHis, HttpServletResponse response) { public void exportExcel(ReportHotWaterParamHis reportHotWaterParamHis, HttpServletResponse response) {
// 文件名 // 文件名
try { try {
String fileName = "热水热泵运行记录表.xlsx"; String fileName = "热水热泵运行记录表.xlsx";

4
mh-admin/src/main/java/com/mh/web/controller/report/ReportMeterReadingsController.java

@ -46,14 +46,14 @@ public class ReportMeterReadingsController extends BaseController {
} }
@PostMapping("/list") @PostMapping("/list")
public TableDataInfo list(@RequestBody ReportMeterReadingsHis todayTimestamp) public TableDataInfo list(ReportMeterReadingsHis todayTimestamp)
{ {
List<ReportMeterReadingsHis> list = meterReadingsHisService.selectList(todayTimestamp); List<ReportMeterReadingsHis> list = meterReadingsHisService.selectList(todayTimestamp);
return getDataTable(list); return getDataTable(list);
} }
@PostMapping("/export") @PostMapping("/export")
public void exportExcel(@RequestBody ReportMeterReadingsHis reportMeterReadingsHis, HttpServletResponse response) { public void exportExcel(ReportMeterReadingsHis reportMeterReadingsHis, HttpServletResponse response) {
// 文件名 // 文件名
try { try {
String fileName = "节能岛改造每日能耗统计表"+ DateUtils.dateToString(reportMeterReadingsHis.getTodayTimestamp(), "yyyyMMdd")+".xlsx"; String fileName = "节能岛改造每日能耗统计表"+ DateUtils.dateToString(reportMeterReadingsHis.getTodayTimestamp(), "yyyyMMdd")+".xlsx";

7
mh-admin/src/main/java/com/mh/web/controller/report/ReportSteamController.java

@ -1,6 +1,7 @@
package com.mh.web.controller.report; package com.mh.web.controller.report;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.github.pagehelper.PageHelper;
import com.mh.common.core.controller.BaseController; import com.mh.common.core.controller.BaseController;
import com.mh.common.core.domain.AjaxResult; import com.mh.common.core.domain.AjaxResult;
import com.mh.common.core.domain.dto.ReportSteamRunParamDTO; import com.mh.common.core.domain.dto.ReportSteamRunParamDTO;
@ -41,7 +42,9 @@ public class ReportSteamController extends BaseController {
@PostMapping("/list") @PostMapping("/list")
public TableDataInfo list(@RequestBody ReportSteamRunParamHis reportSteamRunParamHis) { public TableDataInfo list(@RequestBody ReportSteamRunParamHis reportSteamRunParamHis) {
startPage(); if (reportSteamRunParamHis.getPageNum() != 0) {
PageHelper.startPage(reportSteamRunParamHis.getPageNum(), reportSteamRunParamHis.getPageSize());
}
List<ReportSteamRunParamHis> list = reportSteamService.selectList(reportSteamRunParamHis); List<ReportSteamRunParamHis> list = reportSteamService.selectList(reportSteamRunParamHis);
return getDataTable(list); return getDataTable(list);
} }
@ -52,7 +55,7 @@ public class ReportSteamController extends BaseController {
} }
@PostMapping("/export") @PostMapping("/export")
public void exportExcel(@RequestBody ReportSteamRunParamHis reportSteamRunParamHis, HttpServletResponse response) { public void exportExcel(ReportSteamRunParamHis reportSteamRunParamHis, HttpServletResponse response) {
// 文件名 // 文件名
try { try {
String fileName = "蒸汽机运行记录表.xlsx"; String fileName = "蒸汽机运行记录表.xlsx";

9
mh-admin/src/main/java/com/mh/web/controller/report/ReportSysController.java

@ -1,6 +1,7 @@
package com.mh.web.controller.report; package com.mh.web.controller.report;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.github.pagehelper.PageHelper;
import com.mh.common.core.controller.BaseController; import com.mh.common.core.controller.BaseController;
import com.mh.common.core.domain.AjaxResult; import com.mh.common.core.domain.AjaxResult;
import com.mh.common.core.domain.dto.MaglevReportSysParamDTO; import com.mh.common.core.domain.dto.MaglevReportSysParamDTO;
@ -40,9 +41,11 @@ public class ReportSysController extends BaseController {
} }
@PostMapping("/list") @PostMapping("/list")
public TableDataInfo list(@RequestBody ReportSysRunParamHis reportSysRunParamHis) public TableDataInfo list(ReportSysRunParamHis reportSysRunParamHis)
{ {
startPage(); if (reportSysRunParamHis.getPageNum() != 0) {
PageHelper.startPage(reportSysRunParamHis.getPageNum(), reportSysRunParamHis.getPageSize());
}
List<ReportSysRunParamHis> list = reportSysService.selectList(reportSysRunParamHis); List<ReportSysRunParamHis> list = reportSysService.selectList(reportSysRunParamHis);
return getDataTable(list); return getDataTable(list);
} }
@ -54,7 +57,7 @@ public class ReportSysController extends BaseController {
} }
@PostMapping("/export") @PostMapping("/export")
public void exportExcel(@RequestBody ReportSysRunParamHis reportSysRunParamHis, HttpServletResponse response) { public void exportExcel(ReportSysRunParamHis reportSysRunParamHis, HttpServletResponse response) {
// 文件名 // 文件名
try { try {
String fileName = "系统参数运行日志报表.xlsx"; String fileName = "系统参数运行日志报表.xlsx";

8
mh-common/src/main/java/com/mh/common/core/domain/entity/ReportHeatingRunParamHis.java

@ -170,6 +170,14 @@ public class ReportHeatingRunParamHis extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
/** 更新者 */
@TableField(exist = false)
private int pageNum;
/** 更新者 */
@TableField(exist = false)
private int pageSize;
@Override @Override
public String toString() { public String toString() {
return new StringJoiner(", ", ReportHeatingRunParamHis.class.getSimpleName() + "[", "]") return new StringJoiner(", ", ReportHeatingRunParamHis.class.getSimpleName() + "[", "]")

8
mh-common/src/main/java/com/mh/common/core/domain/entity/ReportHotWaterParamHis.java

@ -167,6 +167,14 @@ public class ReportHotWaterParamHis extends BaseEntity implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
/** 更新者 */
@TableField(exist = false)
private int pageNum;
/** 更新者 */
@TableField(exist = false)
private int pageSize;
// 无参构造 // 无参构造
public ReportHotWaterParamHis() { public ReportHotWaterParamHis() {
} }

8
mh-common/src/main/java/com/mh/common/core/domain/entity/ReportSteamRunParamHis.java

@ -129,6 +129,14 @@ public class ReportSteamRunParamHis extends BaseEntity implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
/** 更新者 */
@TableField(exist = false)
private int pageNum;
/** 更新者 */
@TableField(exist = false)
private int pageSize;
@Override @Override
public String toString() { public String toString() {
return new StringJoiner(", ", ReportSteamRunParamHis.class.getSimpleName() + "[", "]") return new StringJoiner(", ", ReportSteamRunParamHis.class.getSimpleName() + "[", "]")

8
mh-common/src/main/java/com/mh/common/core/domain/entity/ReportSysRunParamHis.java

@ -251,6 +251,14 @@ public class ReportSysRunParamHis extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
/** 更新者 */
@TableField(exist = false)
private int pageNum;
/** 更新者 */
@TableField(exist = false)
private int pageSize;
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this) return new ToStringBuilder(this)

Loading…
Cancel
Save