新增物料远程调用问题
This commit is contained in:
+10
@@ -211,5 +211,15 @@ public class MaterialBaseInfoFeign extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty("币制")
|
||||
private String currency;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("复合条件查询 物料名称 物料编码 物料条码")
|
||||
private String compoundOrQuery;
|
||||
|
||||
@ApiModelProperty("批次ID")
|
||||
private Long batchId;
|
||||
}
|
||||
|
||||
|
||||
+8
@@ -1,6 +1,7 @@
|
||||
package com.mhd.wms.interfaces.assember.materialBaseInfo;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.mhd.system.api.domain.MaterialBaseInfoFeign;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.todo.MaterialBaseInfoDO;
|
||||
import com.mhd.wms.interfaces.dto.materialBaseInfo.MaterialBaseInfoDTO;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -21,4 +22,11 @@ public class MaterialBaseInfoAssembler {
|
||||
return JSONUtil.toBean(JSONUtil.toJsonStr(materialBaseInfoDTO), MaterialBaseInfoDO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public MaterialBaseInfoDO toDO2(MaterialBaseInfoFeign materialBaseInfoDTO) {
|
||||
return JSONUtil.toBean(JSONUtil.toJsonStr(materialBaseInfoDTO), MaterialBaseInfoDO.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -4,6 +4,7 @@ import com.mhd.common.core.domain.entity.R;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.system.api.domain.MaterialBaseInfoFeign;
|
||||
import com.mhd.wms.application.service.materialBaseInfo.MaterialBaseInfoApplicationService;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.todo.MaterialBaseInfoDO;
|
||||
@@ -50,10 +51,10 @@ public class MaterialBaseInfoApi extends BaseController {
|
||||
*/
|
||||
@ApiOperation("编辑物料基础信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody MaterialBaseInfoDTO materialBaseInfoDTO)
|
||||
public AjaxResult edit(@RequestBody MaterialBaseInfoFeign materialBaseInfoDTO)
|
||||
{
|
||||
//转换实体
|
||||
MaterialBaseInfoDO materialBaseInfoDO = materialBaseInfoAssembler.toDO(materialBaseInfoDTO);
|
||||
MaterialBaseInfoDO materialBaseInfoDO = materialBaseInfoAssembler.toDO2(materialBaseInfoDTO);
|
||||
if(1 == materialBaseInfoDTO.getUpdateFeign()){
|
||||
return toAjax(materialBaseInfoApplicationService.update(materialBaseInfoDO));
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user