From 21ae569ccd132476262abd8702df23363368bf50 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Mon, 25 Nov 2024 18:08:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E6=96=99=E6=97=B6=E4=BF=9D=E8=AF=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E4=B8=80=E8=87=B4=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stockOperate/service/impl/DlRepairSoServiceImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java index 7e98bc3c..c4bdcc86 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java @@ -392,10 +392,15 @@ public class DlRepairSoServiceImpl extends ServiceImpl() + int update = baseMapper.update(new LambdaUpdateWrapper() .set(DlRepairSo::getSoStatus, SoStatusEnum.RETURNED.getCode()) - .eq(DlRepairSo::getId, id) + .and(i -> i.eq(DlRepairSo::getId, id) + .ne(DlRepairSo::getSoStatus, SoStatusEnum.RETURNED.getCode()) + .ne(DlRepairSo::getSoStatus, SoStatusEnum.DEPRECATED.getCode())) ); + if (update == 0){ + throw exception0(500, "该退料单已有其他人操作"); + } // 查主表 DlRepairSo newSo = baseMapper.selectById(id); // 通知仓库