更新物料行
This commit is contained in:
parent
4f4ecc74c7
commit
55f80f8ed5
|
|
@ -268,6 +268,19 @@ public class EbomApi extends BaseApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("changeMaterial")
|
||||||
|
@ApiOperation("更新物料行")
|
||||||
|
public ResultVO<List<BomNewEbomParentVO>> changeMaterial(@RequestBody BomNewEBomChangeDTO dto) {
|
||||||
|
if ( dto.getParent() ==null || CollectionUtil.isEmpty(dto.getDatas()) ) {
|
||||||
|
return ResultVO.error(STATE.Error, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultVO.success(bomNewEbomParentService.changeMaterial(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("delete")
|
@GetMapping("delete")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.nflg.product.bomnew.pojo.dto;
|
||||||
|
|
||||||
|
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BomNewEBomChangeDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("查询物料列表")
|
||||||
|
private List<BomNewEbomParentVO> datas;
|
||||||
|
|
||||||
|
@ApiModelProperty("上层")
|
||||||
|
private BomNewEbomParentVO parent;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1161,4 +1161,26 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更物料
|
||||||
|
*/
|
||||||
|
public List<BomNewEbomParentVO> changeMaterial(BomNewEBomChangeDTO dto){
|
||||||
|
|
||||||
|
List<BomNewEbomParentVO> parentChild=dto.getDatas();
|
||||||
|
|
||||||
|
materialMainService.intiMaterialInfo(parentChild );
|
||||||
|
|
||||||
|
List<BomNewEbomParentVO> checkBom=new ArrayList<>();
|
||||||
|
checkBom.add(dto.getParent());
|
||||||
|
checkBom.addAll(dto.getDatas());
|
||||||
|
CheckEBomException checkEBomException=new CheckEBomException(checkBom);
|
||||||
|
checkEBomException.checkException();
|
||||||
|
|
||||||
|
return dto.getDatas();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,13 @@ public class CheckEBomException {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void initException( String ... ignorePropertyList) {
|
||||||
|
|
||||||
|
SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail,ignorePropertyList);
|
||||||
|
checkException();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void checkException(){
|
public void checkException(){
|
||||||
for (BomNewEbomParentVO vo : allBomDetail) {
|
for (BomNewEbomParentVO vo : allBomDetail) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue