diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java index a660c983..9cc450ff 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java @@ -26,6 +26,7 @@ import com.op.mes.domain.*; import com.op.mes.domain.dto.LineChartDto; import com.op.mes.domain.dto.SysFactoryDto; import com.op.mes.domain.vo.DynamicColumnVo; +import com.op.mes.domain.vo.MesDailyReportBPVo; import com.op.mes.domain.vo.MesDailyReportVo; import com.op.mes.domain.vo.MesMonthReportVo; import com.op.system.api.domain.DataSourcePropertyDTO; @@ -269,7 +270,23 @@ public class MesReportWorkController extends BaseController { util.exportExcel(response, list, start+"至"+end+"生产日报表"); } + @RequiresPermissions("mes:dailyReportNew:exportBP") + @PostMapping("/getDailyReportNewBPExport") + public void getDailyReportNewBPExport(HttpServletResponse response,MesDailyReportVo mesDailyReportVo) { + List list0 = mesReportWorkService.getDailyReportNew(mesDailyReportVo); + List list = new ArrayList<>(); + MesDailyReportBPVo bpVo = null; + for(MesDailyReportVo vo:list0){ + bpVo = new MesDailyReportBPVo(); + BeanUtils.copyProperties(vo,bpVo); + list.add(bpVo); + } + String start = mesDailyReportVo.getProductDateStart(); + String end = mesDailyReportVo.getProductDateEnd(); + ExcelUtil util = new ExcelUtil<>(MesDailyReportBPVo.class); + util.exportExcel(response, list, start+"至"+end+"生产日报表"); + } @GetMapping("/getWorkcenterList") public List getWorkcenterList(MesDailyReport mesDailyReport) { diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/vo/MesDailyReportBPVo.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/vo/MesDailyReportBPVo.java new file mode 100644 index 00000000..fbbf2f50 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/vo/MesDailyReportBPVo.java @@ -0,0 +1,80 @@ +package com.op.mes.domain.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; + +import java.math.BigDecimal; +import java.util.Date; + +public class MesDailyReportBPVo extends BaseEntity { + private static final long serialVersionUID = 1L; + @Excel(name = "组别") + private String equipmentName; + @Excel(name = "产品编码") + private String productCode;//产品编码 + @Excel(name = "产品名称") + private String productName;//产品名称 + @Excel(name = "规格") + private Long spec;//规格 + @Excel(name = "实际产量(件)") + private String quantityFeedback;//实际产量(箱) + private String productDateStart;//工单日期开始 + private String productDateEnd;//工单日期结束 + + public String getEquipmentName() { + return equipmentName; + } + + public void setEquipmentName(String equipmentName) { + this.equipmentName = equipmentName; + } + + public String getProductCode() { + return productCode; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public Long getSpec() { + return spec; + } + + public void setSpec(Long spec) { + this.spec = spec; + } + + public String getQuantityFeedback() { + return quantityFeedback; + } + + public void setQuantityFeedback(String quantityFeedback) { + this.quantityFeedback = quantityFeedback; + } + + public String getProductDateStart() { + return productDateStart; + } + + public void setProductDateStart(String productDateStart) { + this.productDateStart = productDateStart; + } + + public String getProductDateEnd() { + return productDateEnd; + } + + public void setProductDateEnd(String productDateEnd) { + this.productDateEnd = productDateEnd; + } +}