瀏覽代碼

入库仓库报错

hfxc226 1 年之前
父節點
當前提交
4a9acdced0

+ 2 - 1
platform-service/src/main/java/com/platform/service/store/impl/InStoreFormServiceImpl.java

@@ -419,7 +419,7 @@ public class InStoreFormServiceImpl extends BaseServiceImpl<InStoreFormMapper, I
         BigDecimal maxStock = sparePartInfo.getMaxStock()==null?new BigDecimal(0):sparePartInfo.getMaxStock();
 
         if (num.intValue()+model.getInNum()>maxStock.intValue()){
-            throw new BusinessException("该备件的最大库存量为"+maxStock+"目前已超出,请修改入库数量!");
+            throw new BusinessException("该备件的最大库存量为"+maxStock+"目前已超出,请修改入库数量或者先增加备件最大库存!");
         }
         UserInfo userInfo = SecurityUtils.getUserInfo();
         Weekend<InStoreForm> weekend = new Weekend<>(InStoreForm.class);
@@ -433,6 +433,7 @@ public class InStoreFormServiceImpl extends BaseServiceImpl<InStoreFormMapper, I
         //修改库存
         spareStore.setNum(new BigDecimal(num.intValue()+model.getInNum()));
         spareStoreMapper.updateByPrimaryKeySelective(spareStore);
+
     }
 
     @Override