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/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) 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) 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) 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(),