基础数据物料管理批次为空可以新增

This commit is contained in:
秦鸿展
2026-04-02 16:42:35 +08:00
parent ebb3d7c019
commit 4541ce287b
3 changed files with 36 additions and 5 deletions
@@ -111,10 +111,12 @@ public class MaterialGoodsRuleDomainService {
* @param materialGoodsRuleDO
*/
private void batchParam(MaterialGoodsRuleDO materialGoodsRuleDO){
if (ObjectUtil.isNull(materialGoodsRuleDO.getBatchId())){
throw new ServiceException("批次信息不能为空");
// 批次信息允许为空:batchId 为空时不做封装,直接跳过即可
Long batchId = materialGoodsRuleDO.getBatchId();
if (ObjectUtil.isNull(batchId) || batchId <= 0) {
return;
}
AjaxResult ajaxResult = systemServiceFeign.getBatchInfoByBatchId(materialGoodsRuleDO.getBatchId());
AjaxResult ajaxResult = systemServiceFeign.getBatchInfoByBatchId(batchId);
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
throw new ServiceException("获取批次信息失败");
}