From edf5f9236e7e19961871239bde2050073ff5908a Mon Sep 17 00:00:00 2001 From: yinq Date: Sun, 17 Mar 2024 17:21:50 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E4=BA=A7=E5=93=81=E8=BF=BD?= =?UTF-8?q?=E6=BA=AF=E8=A1=A8=E5=8A=A0=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/QualityReportController.java | 19 +++++++++++++++---- .../domain/ProductTraceabilityReport.java | 14 ++++++++++++-- .../mapper/ReportQualityInspectionMapper.java | 7 ++++++- .../mapper/report/GeneralReportMapper.xml | 2 +- 4 files changed, 34 insertions(+), 8 deletions(-) diff --git a/aucma-report/src/main/java/com/aucma/report/controller/QualityReportController.java b/aucma-report/src/main/java/com/aucma/report/controller/QualityReportController.java index 4604a4c..41c1904 100644 --- a/aucma-report/src/main/java/com/aucma/report/controller/QualityReportController.java +++ b/aucma-report/src/main/java/com/aucma/report/controller/QualityReportController.java @@ -3,14 +3,13 @@ package com.aucma.report.controller; import com.aucma.common.core.controller.BaseController; import com.aucma.common.core.domain.AjaxResult; import com.aucma.common.core.page.TableDataInfo; +import com.aucma.common.utils.poi.ExcelUtil; import com.aucma.report.domain.ProductTraceabilityReport; import com.aucma.report.service.IQualityReportService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -85,6 +84,18 @@ public class QualityReportController extends BaseController { return getDataTable(list); } + /** + * 产品追溯报表导出 + * @param hashMap + * @return + */ + @PostMapping("/productTraceabilityReportList/export" ) + public void productTraceabilityReportListExport(HttpServletResponse response, @RequestParam(required = false) Map hashMap) { + List list = qualityReportService.productTraceabilityReportList(hashMap); + ExcelUtil util = new ExcelUtil<>(ProductTraceabilityReport. class); + util.exportExcel(response, list, "产品追溯报表" ); + } + /** * 产品追溯明细 * @param hashMap diff --git a/aucma-report/src/main/java/com/aucma/report/domain/ProductTraceabilityReport.java b/aucma-report/src/main/java/com/aucma/report/domain/ProductTraceabilityReport.java index 7127b9f..9ceae39 100644 --- a/aucma-report/src/main/java/com/aucma/report/domain/ProductTraceabilityReport.java +++ b/aucma-report/src/main/java/com/aucma/report/domain/ProductTraceabilityReport.java @@ -2,6 +2,7 @@ package com.aucma.report.domain; import com.aucma.common.annotation.Excel; import com.aucma.common.core.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonProperty; /** * 产品追溯报表 @@ -16,63 +17,72 @@ public class ProductTraceabilityReport extends BaseEntity { * 产线编号 */ @Excel(name = "产线编号") + @JsonProperty("PRODUCT_LINE_CODE") private String PRODUCT_LINE_CODE; /** * 产线名称 */ @Excel(name = "产线名称") + @JsonProperty("PRODUCT_LINE_NAME") private String PRODUCT_LINE_NAME; /** * SAP订单编号 */ @Excel(name = "SAP订单编号") + @JsonProperty("ORDER_CODE") private String ORDER_CODE; /** * 销售订单编号 */ @Excel(name = "销售订单编号") + @JsonProperty("SALEORDER_CODE") private String SALEORDER_CODE; /** * 销售订单行号 */ @Excel(name = "销售订单行号") + @JsonProperty("SALEORDER_LINENUMBER") private String SALEORDER_LINENUMBER; /** * 物料编号 */ @Excel(name = "物料编号") + @JsonProperty("MATERIAL_CODE") private String MATERIAL_CODE; /** * 物料名称 */ @Excel(name = "物料名称") + @JsonProperty("MATERIAL_NAME") private String MATERIAL_NAME; /** * 成品条码 */ @Excel(name = "成品条码") + @JsonProperty("PRODUCT_SNCODE") private String PRODUCT_SNCODE; /** * MES条码 */ @Excel(name = "MES条码") + @JsonProperty("BOX_CODE") private String BOX_CODE; /** * 下线时间 */ - @Excel(name = "下线时间") + @Excel(name = "下线时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @JsonProperty("PRODUCT_SCANTIME") private String PRODUCT_SCANTIME; - public String getPRODUCT_LINE_CODE() { return PRODUCT_LINE_CODE; } diff --git a/aucma-report/src/main/java/com/aucma/report/mapper/ReportQualityInspectionMapper.java b/aucma-report/src/main/java/com/aucma/report/mapper/ReportQualityInspectionMapper.java index 6267a24..bf8bd43 100644 --- a/aucma-report/src/main/java/com/aucma/report/mapper/ReportQualityInspectionMapper.java +++ b/aucma-report/src/main/java/com/aucma/report/mapper/ReportQualityInspectionMapper.java @@ -60,7 +60,12 @@ public interface ReportQualityInspectionMapper */ public int deleteReportQualityInspectionByObjIds(Long[] objIds); - + /** + * PDA查询当班质检数量 + * + * @param stationCode + * @return + */ public HashMap pdaQueryQuantityNumber(String stationCode); } diff --git a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml index 9e35d87..0028fc3 100644 --- a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml @@ -237,7 +237,7 @@ GROUP BY RQI.QUALITY_DEFECT_NAME) SD - SELECT PL.PRODUCT_LINE_CODE, PL.PRODUCT_LINE_NAME, BO.ORDER_CODE,