From c4d7d1cb2b4fcff972fbe54947e68e0725a85d81 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 25 Jun 2024 18:18:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=97=A5=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E8=B0=83=E5=8A=A8--=E5=8F=96=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E4=BA=BA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/op/mes/mapper/MesReportWorkMapper.java | 2 +- .../java/com/op/mes/service/impl/MesReportWorkServiceImpl.java | 3 +-- .../src/main/resources/mapper/mes/MesReportWorkMapper.xml | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java index d11ffc30..2dc221e2 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java @@ -180,7 +180,7 @@ public interface MesReportWorkMapper { QuantityDto getRealQuantity(QuantityDto quantityDto); - List getSumQuantity(QuantityDto quantityDto); + QuantityDto getSumQuantity(QuantityDto quantityDto); List getmonthProductionSut(MesMonthReportVo mesMonthReportVo); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java index 60b10a77..56f97b5d 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java @@ -425,8 +425,7 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { quantityDto.setWorkorderCode(workorderCode); quantityDto.setMachineCode(machineCode); QuantityDto parentMesReport = mesReportWorkMapper.getRealQuantity(quantityDto); - List sonMesReportList = mesReportWorkMapper.getSumQuantity(quantityDto); - QuantityDto sonMesReport = sonMesReportList.stream().max(Comparator.comparingLong(QuantityDto::getUseMan)).orElse(null); + QuantityDto sonMesReport = mesReportWorkMapper.getSumQuantity(quantityDto); // 产量 Long sumQua = 0L; diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml index 1f46a3f5..48aaeabf 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml @@ -715,10 +715,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select sum(quantity_feedback) quantityFeedbackSum, sum(work_time) workTime, - use_man useMan + max(use_man) useMan from mes_report_work where parent_order = #{workorderCode} and del_flag = '0' and machine_code = #{machineCode} - group by use_man