维护条码信息
This commit is contained in:
+7
@@ -3,7 +3,9 @@ package com.mhd.basic.interfaces.facadeApi.materialBaseInfo;
|
||||
import com.baomidou.mybatisplus.extension.api.R;
|
||||
import com.mhd.basic.interfaces.vo.MaterialStockInfoVo;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.mhd.system.api.domain.MaterialBarCodeFeign;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -62,6 +64,11 @@ public class MaterialBaseInfoApi extends BaseController{
|
||||
{
|
||||
//转换实体
|
||||
MaterialBaseInfoDO materialBaseInfoDO = materialBaseInfoAssembler.toDOByEdit(materialBaseInfoDTO);
|
||||
List<MaterialBarCodeFeign> ea = materialBaseInfoDTO.getMaterialBarCodeList().stream().filter(i -> i.getUnitCode().equals("EA")).collect(Collectors.toList());
|
||||
if (ea.size() > 0) {
|
||||
String barCode = ea.get(0).getBarCode();
|
||||
materialBaseInfoDO.setBarCode(barCode);
|
||||
}
|
||||
if(materialBaseInfoDTO.getMaterialBaseInfoId() != null){
|
||||
return toAjax(materialBaseInfoApplicationService.update(materialBaseInfoDO));
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user