基础数据物料管理批次为空可以新增
This commit is contained in:
+6
-2
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user