From 29523f27fdae6c1b1428876d51182da81fb0465c Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Wed, 28 Aug 2024 12:53:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E6=96=99=E6=8E=A5=E6=94=B6=E6=97=B6,?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E7=BB=93=E7=AE=97=E8=A1=A8=E6=8B=BF=E5=88=B0?= =?UTF-8?q?=E5=BE=85=E9=80=80=E6=96=99=E6=95=B0=E9=87=8F,=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E5=A4=9A=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bonus/sgzb/app/mapper/BackReceiveMapper.java | 4 ++-- .../sgzb/app/service/impl/BackReceiveServiceImpl.java | 4 ++-- .../src/main/resources/mapper/app/BackReceiveMapper.xml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/BackReceiveMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/BackReceiveMapper.java index f5113b0..6f35191 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/BackReceiveMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/BackReceiveMapper.java @@ -30,9 +30,9 @@ public interface BackReceiveMapper { * @param record 查询条件 * @return List */ - List receiveView(BackApplyInfo record); + List receiveView4FrontEnd(BackApplyInfo record); - List receiveView2(BackApplyInfo record); + List receiveView4Backend(BackApplyInfo record); /** * 添加接收数据back_check_details diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java index 2e706d0..2c8bf27 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java @@ -44,7 +44,7 @@ public class BackReceiveServiceImpl implements BackReceiveService { @Override public List receiveView(BackApplyInfo record) { - List backApplyInfoList = backReceiveMapper.receiveView(record); + List backApplyInfoList = backReceiveMapper.receiveView4FrontEnd(record); int count1 = 0; int count2 = 0; for (BackApplyInfo backApplyInfo : backApplyInfoList) { @@ -169,7 +169,7 @@ public class BackReceiveServiceImpl implements BackReceiveService { throw new RuntimeException("该退料单已完成退料"); } //修改任务状态 - List list = backReceiveMapper.receiveView2(record); + List list = backReceiveMapper.receiveView4Backend(record); if (!CollectionUtils.isEmpty(list)) { for (BackApplyInfo backApplyInfo : list) { maxBackNum += (int) backApplyInfo.getMaxBackNum(); diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml index 5930e32..d688661 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml @@ -659,7 +659,7 @@ bai.create_time DESC - SELECT bai.id, bai.task_id as taskId, @@ -672,7 +672,7 @@ bad.pre_num as preNum, bad.audit_num as auditNum, bad.status as status, - IFNULL(sai.num, 0)-IFNULL(aa.back_num,0) as max_back_num, + CASE WHEN (IFNULL(sai.num, 0)-IFNULL(aa.back_num,0)) < 0 THEN 0 ELSE (IFNULL(sai.num, 0)-IFNULL(aa.back_num,0)) END as max_back_num, IFNULL(aa.back_num,0) as in_completed_back_num, IFNULL(bb.finished_back_num, 0) as finished_back_num, mt.manage_type as manageType, @@ -717,7 +717,7 @@ - SELECT bai.id, bai.task_id as taskId, @@ -730,7 +730,7 @@ bad.pre_num as preNum, bad.audit_num as auditNum, bad.status as status, - IFNULL(sai.num, 0)-IFNULL(aa.back_num,0) as max_back_num, + IFNULL(sai.num, 0) as max_back_num, IFNULL(aa.back_num,0) as in_completed_back_num, IFNULL(bb.finished_back_num, 0) as finished_back_num, mt.manage_type as manageType,