diff --git a/aucma-report/src/main/java/com/aucma/report/controller/ProductionReportController.java b/aucma-report/src/main/java/com/aucma/report/controller/ProductionReportController.java index 8d8ed78..b07c053 100644 --- a/aucma-report/src/main/java/com/aucma/report/controller/ProductionReportController.java +++ b/aucma-report/src/main/java/com/aucma/report/controller/ProductionReportController.java @@ -97,6 +97,30 @@ public class ProductionReportController extends BaseController { util.exportExcel(response, list, "清单率报表" ); } + /** + * 查询在制品查询明细 + */ + @GetMapping("/WIPInquiryDetailReportList") + public TableDataInfo WIPInquiryDetailReportList(@RequestParam(required = false) Map hashMap) { + startPage(); + List list = productionReportService.WIPInquiryDetailReportList(hashMap); + return getDataTable(list); + } + + /** + * 在制品查询明细导出 + * @param hashMap + * @return + */ + @PostMapping("/WIPInquiryDetailReportList/export") + public void WIPInquiryDetailReportListExport(HttpServletResponse response, @RequestParam(required = false) Map hashMap) { + hashMap.put("pageNum",null); + hashMap.put("pageSize",null); + List list = productionReportService.WIPInquiryDetailReportList(hashMap); + ExcelUtil util = new ExcelUtil<>(WIPInquiryDetailReport. class); + util.exportExcel(response, list, "在制品查询明细" ); + } + /** * 扫描下线记录报表 */ diff --git a/aucma-report/src/main/java/com/aucma/report/domain/WIPInquiryDetailReport.java b/aucma-report/src/main/java/com/aucma/report/domain/WIPInquiryDetailReport.java new file mode 100644 index 0000000..0fb70f0 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/domain/WIPInquiryDetailReport.java @@ -0,0 +1,181 @@ +package com.aucma.report.domain; + +import com.aucma.common.annotation.Excel; +import com.aucma.common.core.domain.BaseEntity; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * 在制品查询明细 + * + * @author Yinq + * @date 2024-03-15 + */ +public class WIPInquiryDetailReport extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 产线编号 + */ + @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("MATERIAL_CODE") + private String MATERIAL_CODE; + + /** + * 物料名称 + */ + @Excel(name = "物料名称") + @JsonProperty("MATERIAL_NAME") + private String MATERIAL_NAME; + + /** + * 产品编码 + */ + @Excel(name = "产品编码") + @JsonProperty("PRODUCT_CODE") + private String PRODUCT_CODE; + + /** + * 产品名称 + */ + @Excel(name = "产品名称") + @JsonProperty("PRODUCT_NAME") + private String PRODUCT_NAME; + + /** + * 箱体码 + */ + @Excel(name = "箱体码") + @JsonProperty("MATERIAL_BARCODE") + private String MATERIAL_BARCODE; + + /** + * 最后扫描工位 + */ + @Excel(name = "最后扫描工位") + @JsonProperty("STATION_NAME") + private String STATION_NAME; + + /** + * 最后扫描时间 + */ + @Excel(name = "最后扫描时间") + @JsonProperty("COMPLETE_DATE") + private String COMPLETE_DATE; + + public String getPRODUCT_LINE_CODE() { + return PRODUCT_LINE_CODE; + } + + public void setPRODUCT_LINE_CODE(String PRODUCT_LINE_CODE) { + this.PRODUCT_LINE_CODE = PRODUCT_LINE_CODE; + } + + public String getPRODUCT_LINE_NAME() { + return PRODUCT_LINE_NAME; + } + + public void setPRODUCT_LINE_NAME(String PRODUCT_LINE_NAME) { + this.PRODUCT_LINE_NAME = PRODUCT_LINE_NAME; + } + + public String getORDER_CODE() { + return ORDER_CODE; + } + + public void setORDER_CODE(String ORDER_CODE) { + this.ORDER_CODE = ORDER_CODE; + } + + public String getMATERIAL_CODE() { + return MATERIAL_CODE; + } + + public void setMATERIAL_CODE(String MATERIAL_CODE) { + this.MATERIAL_CODE = MATERIAL_CODE; + } + + public String getMATERIAL_NAME() { + return MATERIAL_NAME; + } + + public void setMATERIAL_NAME(String MATERIAL_NAME) { + this.MATERIAL_NAME = MATERIAL_NAME; + } + + public String getPRODUCT_CODE() { + return PRODUCT_CODE; + } + + public void setPRODUCT_CODE(String PRODUCT_CODE) { + this.PRODUCT_CODE = PRODUCT_CODE; + } + + public String getPRODUCT_NAME() { + return PRODUCT_NAME; + } + + public void setPRODUCT_NAME(String PRODUCT_NAME) { + this.PRODUCT_NAME = PRODUCT_NAME; + } + + public String getMATERIAL_BARCODE() { + return MATERIAL_BARCODE; + } + + public void setMATERIAL_BARCODE(String MATERIAL_BARCODE) { + this.MATERIAL_BARCODE = MATERIAL_BARCODE; + } + + public String getSTATION_NAME() { + return STATION_NAME; + } + + public void setSTATION_NAME(String STATION_NAME) { + this.STATION_NAME = STATION_NAME; + } + + public String getCOMPLETE_DATE() { + return COMPLETE_DATE; + } + + public void setCOMPLETE_DATE(String COMPLETE_DATE) { + this.COMPLETE_DATE = COMPLETE_DATE; + } + + @Override + public String toString() { + return "WIPInquiryDetailReport{" + + "PRODUCT_LINE_CODE='" + PRODUCT_LINE_CODE + '\'' + + ", PRODUCT_LINE_NAME='" + PRODUCT_LINE_NAME + '\'' + + ", ORDER_CODE='" + ORDER_CODE + '\'' + + ", MATERIAL_CODE='" + MATERIAL_CODE + '\'' + + ", MATERIAL_NAME='" + MATERIAL_NAME + '\'' + + ", PRODUCT_CODE='" + PRODUCT_CODE + '\'' + + ", PRODUCT_NAME='" + PRODUCT_NAME + '\'' + + ", MATERIAL_BARCODE='" + MATERIAL_BARCODE + '\'' + + ", STATION_NAME='" + STATION_NAME + '\'' + + ", COMPLETE_DATE='" + COMPLETE_DATE + '\'' + + '}'; + } +} diff --git a/aucma-report/src/main/java/com/aucma/report/domain/WIPInquiryReport.java b/aucma-report/src/main/java/com/aucma/report/domain/WIPInquiryReport.java index 1b94e73..dd7277d 100644 --- a/aucma-report/src/main/java/com/aucma/report/domain/WIPInquiryReport.java +++ b/aucma-report/src/main/java/com/aucma/report/domain/WIPInquiryReport.java @@ -66,9 +66,9 @@ public class WIPInquiryReport extends BaseEntity { private String PRODUCT_NAME; /** - * 数量 + * 在制数量 */ - @Excel(name = "数量") + @Excel(name = "在制数量") @JsonProperty("COMP_AMOUNT") private Long COMP_AMOUNT; diff --git a/aucma-report/src/main/java/com/aucma/report/mapper/GeneralReportMapper.java b/aucma-report/src/main/java/com/aucma/report/mapper/GeneralReportMapper.java index 56c80ed..216893b 100644 --- a/aucma-report/src/main/java/com/aucma/report/mapper/GeneralReportMapper.java +++ b/aucma-report/src/main/java/com/aucma/report/mapper/GeneralReportMapper.java @@ -136,4 +136,11 @@ public interface GeneralReportMapper { * @return */ List boxTurnoverTraceabilityDetailReportList(Map hashMap); + + /** + * 查询在制品查询明细 + * @param hashMap + * @return + */ + List WIPInquiryDetailReportList(Map hashMap); } diff --git a/aucma-report/src/main/java/com/aucma/report/service/IProductionReportService.java b/aucma-report/src/main/java/com/aucma/report/service/IProductionReportService.java index 4bc7d07..50acf9a 100644 --- a/aucma-report/src/main/java/com/aucma/report/service/IProductionReportService.java +++ b/aucma-report/src/main/java/com/aucma/report/service/IProductionReportService.java @@ -70,4 +70,11 @@ public interface IProductionReportService * @return */ List boxTurnoverTraceabilityDetailReportList(Map hashMap); + + /** + * 查询在制品查询明细 + * @param hashMap + * @return + */ + List WIPInquiryDetailReportList(Map hashMap); } diff --git a/aucma-report/src/main/java/com/aucma/report/service/impl/ProductionReportServiceImpl.java b/aucma-report/src/main/java/com/aucma/report/service/impl/ProductionReportServiceImpl.java index b0bc7eb..26c6339 100644 --- a/aucma-report/src/main/java/com/aucma/report/service/impl/ProductionReportServiceImpl.java +++ b/aucma-report/src/main/java/com/aucma/report/service/impl/ProductionReportServiceImpl.java @@ -99,4 +99,14 @@ public class ProductionReportServiceImpl implements IProductionReportService { return reportMapper.boxTurnoverTraceabilityDetailReportList(hashMap); } + /** + * 查询在制品查询明细 + * @param hashMap + * @return + */ + @Override + public List WIPInquiryDetailReportList(Map hashMap) { + return reportMapper.WIPInquiryDetailReportList(hashMap); + } + } diff --git a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml index 2e5caa8..886d463 100644 --- a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml @@ -87,26 +87,32 @@ BO.MATERIAL_NAME PRODUCT_NAME, COUNT(*) COMP_AMOUNT FROM ( - SELECT PB.ORDER_CODE, VMC.MATERIAL_BARCODE, BM.MATERIAL_CODE, BM.MATERIAL_NAME + SELECT PB.ORDER_CODE, + BM.MATERIAL_CODE, + BM.MATERIAL_NAME, + VMC.MATERIAL_BARCODE, + MAX(BE.EXECUTION_SORT) EXECUTION_SORT, + MAX(COMPLETE_DATE) COMPLETE_DATE FROM C##AUCMA_SCADA.MATERIAL_COMPLETION VMC - LEFT JOIN BASE_PRODUCTLINE BP ON BP.PRODUCT_LINE_CODE = VMC.STATION_NAME - LEFT JOIN C##AUCMA_SCADA.PRINT_BARCODE PB ON VMC.MATERIAL_BARCODE = PB.MATERIAL_BARCODE AND PRINT_BARTYPE = 1 - LEFT JOIN C##AUCMA_SCADA.PRODUCT_OFFLINE PO ON PO.BOX_CODE = PB.MATERIAL_BARCODE + JOIN RECORD_INSTORE IE ON IE.STORE_CODE = 'PQK-001' AND VMC.MATERIAL_BARCODE = IE.BARCODE_CODE + LEFT JOIN BASE_PRODUCTLINE BE ON BE.PRODUCT_LINE_CODE = VMC.STATION_NAME + LEFT JOIN C##AUCMA_SCADA.PRINT_BARCODE PB + ON PRINT_BARTYPE = 1 AND VMC.MATERIAL_BARCODE = PB.MATERIAL_BARCODE LEFT JOIN BASE_MATERIALINFO BM ON BM.MATERIAL_CODE = PB.MATERIAL_CODE + LEFT JOIN C##AUCMA_SCADA.PRODUCT_OFFLINE PO ON PO.BOX_CODE = PB.MATERIAL_BARCODE WHERE PB.MATERIAL_BARCODE IS NOT NULL AND PO.BOX_CODE IS NULL - AND VMC.COMPLETE_DATE > (SYSDATE - 3) + -- AND VMC.COMPLETE_DATE > (SYSDATE - 7) - AND BP.EXECUTION_SORT >= #{beginStationCode} + AND BE.EXECUTION_SORT >= #{beginStationCode} - AND #{endStationCode} > BP.EXECUTION_SORT + AND #{endStationCode} > BE.EXECUTION_SORT - GROUP BY PB.ORDER_CODE, VMC.MATERIAL_BARCODE, BM.MATERIAL_CODE, BM.MATERIAL_NAME + GROUP BY PB.ORDER_CODE, BM.MATERIAL_CODE, BM.MATERIAL_NAME, VMC.MATERIAL_BARCODE ) SD LEFT JOIN BASE_ORDERINFO BO ON BO.ORDER_CODE = SD.ORDER_CODE LEFT JOIN BASE_PRODUCTLINE B2 ON B2.WORK_CENTER_CODE = BO.WORK_CENTER_CODE - LEFT JOIN BASE_MATERIALINFO BM ON BM.MATERIAL_CODE = BO.MATERIAL_CODE AND B2.PRODUCT_LINE_CODE = #{productLineCode} @@ -608,4 +614,61 @@ ORDER BY MC.COMPLETE_DATE + +