feat(ebom): 编辑接口优化
This commit is contained in:
parent
e99aa8e17f
commit
a7c53b06b5
|
|
@ -38,7 +38,6 @@ import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.CompletableFuture;
|
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -297,7 +296,9 @@ public class EbomApi extends BaseApi {
|
||||||
@GetMapping("editDetail")
|
@GetMapping("editDetail")
|
||||||
@ApiOperation("编辑物料列表")
|
@ApiOperation("编辑物料列表")
|
||||||
public ResultVO<BomNewEbomEditDetailVO> editDetail(@RequestParam("rowId") Long rowId, @RequestParam("bomRowId") Long bomRowId
|
public ResultVO<BomNewEbomEditDetailVO> editDetail(@RequestParam("rowId") Long rowId, @RequestParam("bomRowId") Long bomRowId
|
||||||
, @RequestParam("projectType") String projectType, @RequestParam(value = "hideVirtualPackage", defaultValue = "0") Integer hideVirtualPackage) {
|
, @RequestParam("projectType") String projectType
|
||||||
|
, @RequestParam(value = "hideVirtualPackage", defaultValue = "0") Integer hideVirtualPackage
|
||||||
|
, @RequestParam("parentBomRowId") Long parentBomRowId) {
|
||||||
if (Objects.isNull(rowId)) {
|
if (Objects.isNull(rowId)) {
|
||||||
VUtils.isTure(true).throwMessage("rowId 不能为空");
|
VUtils.isTure(true).throwMessage("rowId 不能为空");
|
||||||
}
|
}
|
||||||
|
|
@ -305,7 +306,7 @@ public class EbomApi extends BaseApi {
|
||||||
VUtils.isTure(true).throwMessage("bomRowId不能为空");
|
VUtils.isTure(true).throwMessage("bomRowId不能为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResultVO.success(bomNewEbomParentService.editDetail(rowId, bomRowId, projectType, hideVirtualPackage));
|
return ResultVO.success(bomNewEbomParentService.editDetail(rowId, bomRowId, projectType, hideVirtualPackage, parentBomRowId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("updateProjectType")
|
@PostMapping("updateProjectType")
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,6 @@ import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -17,8 +14,21 @@ import java.util.List;
|
||||||
@ApiModel(value = "com-nflg-product-bomnew-pojo-new-vo-BomNewEbomEditDetailVO")
|
@ApiModel(value = "com-nflg-product-bomnew-pojo-new-vo-BomNewEbomEditDetailVO")
|
||||||
public class BomNewEbomEditDetailVO implements Serializable {
|
public class BomNewEbomEditDetailVO implements Serializable {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 当前节点
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("当前节点")
|
||||||
private BomNewEbomParentVO parent;
|
private BomNewEbomParentVO parent;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 当前节点的子级
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("当前节点的子级")
|
||||||
private List<BomNewEbomParentVO> datas;
|
private List<BomNewEbomParentVO> datas;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 当前节点的上级节点
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("当前节点的上级节点")
|
||||||
|
private BomNewEbomParentVO parentParent;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1586,7 +1586,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BomNewEbomEditDetailVO editDetail(Long rowId, Long bomRowId, String projectType, Integer hideVirtualPackage) {
|
public BomNewEbomEditDetailVO editDetail(Long rowId, Long bomRowId, String projectType, Integer hideVirtualPackage, Long parentBomRowId) {
|
||||||
|
|
||||||
BomNewEbomEditDetailVO vo = new BomNewEbomEditDetailVO();
|
BomNewEbomEditDetailVO vo = new BomNewEbomEditDetailVO();
|
||||||
BomNewEbomParentVO parentVO;
|
BomNewEbomParentVO parentVO;
|
||||||
|
|
@ -1638,6 +1638,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
|
|
||||||
|
|
||||||
vo.setParent(parentVO);
|
vo.setParent(parentVO);
|
||||||
|
vo.setParentParent(Convert.convert(BomNewEbomParentVO.class, this.getBaseMapper().selectById(parentBomRowId)));
|
||||||
return vo;
|
return vo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue