From e8bbbf61b2e9f53520949333994cb1537efdb430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Thu, 7 Nov 2024 14:10:02 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ktg-admin/src/test/WmsBusinessTypeUnitTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ktg-admin/src/test/WmsBusinessTypeUnitTest.java b/ktg-admin/src/test/WmsBusinessTypeUnitTest.java index 24690a3..c15128f 100644 --- a/ktg-admin/src/test/WmsBusinessTypeUnitTest.java +++ b/ktg-admin/src/test/WmsBusinessTypeUnitTest.java @@ -11,7 +11,7 @@ import org.springframework.test.context.junit4.SpringRunner; import java.util.List; /** - * 出入库类型 + * 出入库类型单元测试 */ @RunWith(SpringRunner.class) @SpringBootTest(classes = RuoYiApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) From c8ee84e1b1652d4be0c6dd6751595fb3704851d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Thu, 7 Nov 2024 14:18:01 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ktg-admin/src/test/SysDeptUnitTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ktg-admin/src/test/SysDeptUnitTest.java b/ktg-admin/src/test/SysDeptUnitTest.java index 07fe224..723d6aa 100644 --- a/ktg-admin/src/test/SysDeptUnitTest.java +++ b/ktg-admin/src/test/SysDeptUnitTest.java @@ -15,7 +15,7 @@ import java.util.Iterator; import java.util.List; /** - * 组织机构 + * 组织机构单元测试 */ @RunWith(SpringRunner.class) @SpringBootTest(classes = RuoYiApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) From 83c5a803fb4acb399876cc45a030c3c5e82fd70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Thu, 7 Nov 2024 14:51:11 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ktg-admin/src/test/MdItemUnitTest.java | 2 +- ktg-admin/src/test/SysRoleUnitTest.java | 2 +- ktg-admin/src/test/SysUserUnitTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ktg-admin/src/test/MdItemUnitTest.java b/ktg-admin/src/test/MdItemUnitTest.java index 1645903..a960a53 100644 --- a/ktg-admin/src/test/MdItemUnitTest.java +++ b/ktg-admin/src/test/MdItemUnitTest.java @@ -19,7 +19,7 @@ import java.util.List; import java.util.Map; /** - * 角色管理单元测试 + * 物料管理单元测试 */ @RunWith(SpringRunner.class) @SpringBootTest(classes = RuoYiApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) diff --git a/ktg-admin/src/test/SysRoleUnitTest.java b/ktg-admin/src/test/SysRoleUnitTest.java index c1958dd..b891af6 100644 --- a/ktg-admin/src/test/SysRoleUnitTest.java +++ b/ktg-admin/src/test/SysRoleUnitTest.java @@ -14,7 +14,7 @@ import org.springframework.test.context.junit4.SpringRunner; import java.util.List; /** - * 角色管理 + * 角色管理单元测试 */ @RunWith(SpringRunner.class) @SpringBootTest(classes = RuoYiApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) diff --git a/ktg-admin/src/test/SysUserUnitTest.java b/ktg-admin/src/test/SysUserUnitTest.java index bc32b7d..b64ce32 100644 --- a/ktg-admin/src/test/SysUserUnitTest.java +++ b/ktg-admin/src/test/SysUserUnitTest.java @@ -15,7 +15,7 @@ import java.util.List; import java.util.stream.Collectors; /** - * 用户管理 + * 用户管理单元测试 */ @RunWith(SpringRunner.class) @SpringBootTest(classes = RuoYiApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) From 3060ff4c5ebc198736ce6bdc855c6bdc46deb3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Thu, 7 Nov 2024 15:47:11 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E6=97=B6=E6=95=B0=E9=87=8F=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java index 0f44851..06f31d0 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsOutPlanServiceImpl.java @@ -137,6 +137,11 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService { 0 ); + // 校验库中数量是否足够 + if (baseKnifeList.size() < wmsOutPlanDetail.getPlannedQuantity()) { + throw new RuntimeException("库存数量不足以支持本次出库"); + } + // 更新出库计划明细 this.wmsOutPlanMapper.updateWmsOutPlanDetailRealQuantityAndDetailStateByWmsOutPlanDetailId( baseKnifeList.size(),