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

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
@@ -1,6 +1,7 @@
package com.mhd.wms.interfaces.facadeApi.materialBaseInfo;
import com.mhd.common.core.domain.entity.R;
import com.mhd.common.core.exception.ServiceException;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
@@ -54,11 +55,14 @@ public class MaterialBaseInfoApi extends BaseController {
@PostMapping("/edit")
public AjaxResult edit(@RequestBody MaterialBaseInfoFeign materialBaseInfoDTO)
{
if (materialBaseInfoDTO == null) {
throw new ServiceException("请求参数不能为空");
}
//转换实体
MaterialBaseInfoDO materialBaseInfoDO = materialBaseInfoAssembler.toDO2(materialBaseInfoDTO);
if(1 == materialBaseInfoDTO.getUpdateFeign()){
if (Integer.valueOf(1).equals(materialBaseInfoDTO.getUpdateFeign())) {
return toAjax(materialBaseInfoApplicationService.update(materialBaseInfoDO));
}else {
} else {
return toAjax(materialBaseInfoApplicationService.insert(materialBaseInfoDO));
}
}