From fc32d1eddd02d7dd072855b0325c949bdf08a6e9 Mon Sep 17 00:00:00 2001 From: yinq Date: Sat, 16 Mar 2024 16:10:47 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E4=BF=AE=E6=94=B9=E7=9C=8B?= =?UTF-8?q?=E6=9D=BF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/mapper/BoardReportMapper.java | 7 ++ .../service/impl/BoardReportServiceImpl.java | 9 ++- .../mapper/report/BoardReportMapper.xml | 55 ++++++++++----- .../mapper/report/GeneralReportMapper.xml | 68 ++++++++++++++----- 4 files changed, 102 insertions(+), 37 deletions(-) diff --git a/aucma-report/src/main/java/com/aucma/report/mapper/BoardReportMapper.java b/aucma-report/src/main/java/com/aucma/report/mapper/BoardReportMapper.java index 6141bd1..3839d7a 100644 --- a/aucma-report/src/main/java/com/aucma/report/mapper/BoardReportMapper.java +++ b/aucma-report/src/main/java/com/aucma/report/mapper/BoardReportMapper.java @@ -62,4 +62,11 @@ public interface BoardReportMapper { * @return */ List> getCurrentTeamTimeList(HashMap paramMap); + + /** + * 今日下线产量 + * @param paramMap + * @return + */ + HashMap todayOfflineProduction(HashMap paramMap); } diff --git a/aucma-report/src/main/java/com/aucma/report/service/impl/BoardReportServiceImpl.java b/aucma-report/src/main/java/com/aucma/report/service/impl/BoardReportServiceImpl.java index 411d22b..f9a7d18 100644 --- a/aucma-report/src/main/java/com/aucma/report/service/impl/BoardReportServiceImpl.java +++ b/aucma-report/src/main/java/com/aucma/report/service/impl/BoardReportServiceImpl.java @@ -1,8 +1,10 @@ package com.aucma.report.service.impl; +import com.aucma.common.utils.StringUtils; import com.aucma.report.mapper.BoardReportMapper; import com.aucma.report.service.IBoardReportService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.parameters.P; import org.springframework.stereotype.Service; import java.util.HashMap; @@ -49,7 +51,6 @@ public class BoardReportServiceImpl implements IBoardReportService { Long planOrderSum = 0L; Long prodOrderSum = 0L; Long planProductSum = 0L; - Long compProductSum = 0L; for (HashMap map : todayOrderList) { if (Integer.parseInt(String.valueOf(map.get("STATUS"))) != 0){ continue; @@ -60,15 +61,13 @@ public class BoardReportServiceImpl implements IBoardReportService { } Long orderAmount = Long.parseLong(String.valueOf(map.get("ORDER_AMOUNT"))); planProductSum += orderAmount; - Long completeAmount = Long.parseLong(String.valueOf(map.get("COMPLETE_AMOUNT"))); - compProductSum += completeAmount; } - result.put("planOrderSum", planOrderSum); result.put("prodOrderSum", prodOrderSum); result.put("planProductSum", planProductSum); - result.put("compProductSum", compProductSum); } + HashMap map = boardReportMapper.todayOfflineProduction(paramMap); + result.put("compProductSum", map.get("OFFLINE_SUM")); List> columnarList = boardReportMapper.homeColumnarInterface(paramMap); result.put("columnarList", columnarList); diff --git a/aucma-report/src/main/resources/mapper/report/BoardReportMapper.xml b/aucma-report/src/main/resources/mapper/report/BoardReportMapper.xml index 2b302d9..78e70df 100644 --- a/aucma-report/src/main/resources/mapper/report/BoardReportMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/BoardReportMapper.xml @@ -40,34 +40,51 @@ + + diff --git a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml index 6640639..7fab9f1 100644 --- a/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/GeneralReportMapper.xml @@ -176,8 +176,35 @@ ORDER BY INSPECTOR_TIME DESC SELECT PL.PRODUCT_LINE_CODE, - PL.PRODUCT_LINE_NAME, - BO.ORDER_CODE, - BO.SALEORDER_CODE, - BO.SALEORDER_LINENUMBER, - BO.MATERIAL_CODE, - BO.MATERIAL_NAME, - PO.PRODUCT_SNCODE, - PO.BOX_CODE, - PO.PRODUCT_SCANTIME + PL.PRODUCT_LINE_NAME, + BO.ORDER_CODE, + BO.SALEORDER_CODE, + BO.SALEORDER_LINENUMBER, + BO.MATERIAL_CODE, + BO.MATERIAL_NAME, + PO.PRODUCT_SNCODE, + PO.BOX_CODE, + PO.PRODUCT_SCANTIME FROM C##AUCMA_SCADA.PRODUCT_OFFLINE PO - LEFT JOIN BASE_ORDERINFO BO ON BO.ORDER_CODE = SUBSTR(PO.PRODUCT_ORDER_NO, -8) - LEFT JOIN BASE_PRODUCTLINE PL ON PL.WORK_CENTER_CODE = BO.WORK_CENTER_CODE + LEFT JOIN BASE_ORDERINFO BO ON BO.ORDER_CODE = SUBSTR(PO.PRODUCT_ORDER_NO, -8) + LEFT JOIN BASE_PRODUCTLINE PL ON PL.WORK_CENTER_CODE = BO.WORK_CENTER_CODE - and PO.PRODUCT_LINE_CODE = #{PRODUCT_LINE_CODE} + and PO.PRODUCT_LINE_CODE = + #{PRODUCT_LINE_CODE} + and BO.ORDER_CODE = #{ORDER_CODE} and BO.MATERIAL_CODE = #{MATERIAL_CODE} - and BO.MATERIAL_NAME LIKE '%' || #{MATERIAL_NAME} || '%' - and PO.PRODUCT_SNCODE LIKE '%' || #{PRODUCT_SNCODE} || '%' + and BO.MATERIAL_NAME LIKE '%' || #{MATERIAL_NAME} + || '%' + + and PO.PRODUCT_SNCODE LIKE '%' || + #{PRODUCT_SNCODE} || '%' + and PO.BOX_CODE = #{BOX_CODE} AND TO_CHAR(PO.PRODUCT_SCANTIME, 'YYYY-MM-DD HH24:MI:SS') BETWEEN #{beginBeginTime} AND #{endBeginTime} @@ -248,6 +281,9 @@ U.NICK_NAME USER_NAME FROM C##AUCMA_SCADA.PRODUCT_OFFLINE PO JOIN REPORT_QUALITY_INSPECTION RQI ON RQI.BAR_CODE = PO.BOX_CODE + LEFT JOIN (SELECT BOX_CODE, LINER_CODE + FROM C##AUCMA_SCADA.CODE_BINDING + WHERE LINER_CODE IS NOT NULL) CB ON RQI.BAR_CODE = CB.LINER_CODE LEFT JOIN BASE_PRODUCTLINE PL on RQI.STATION_CODE = PL.PRODUCT_LINE_CODE LEFT JOIN SYS_USER U on U.USER_NAME = RQI.INSPECTOR_CODE WHERE PO.BOX_CODE = #{BOX_CODE}