mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
/component/direct-children补充加工状态
This commit is contained in:
+3
@@ -41,6 +41,9 @@ public class AssemblyComponentChildPrintRespVO {
|
|||||||
@Schema(description = "柜名")
|
@Schema(description = "柜名")
|
||||||
private String bodyName;
|
private String bodyName;
|
||||||
|
|
||||||
|
@Schema(description = "加工状态")
|
||||||
|
private Integer processStatus;
|
||||||
|
|
||||||
@Schema(description = "子元素")
|
@Schema(description = "子元素")
|
||||||
private List<AssemblyComponentChildPrintRespVO> children;
|
private List<AssemblyComponentChildPrintRespVO> children;
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-1
@@ -238,11 +238,14 @@ public class AssemblyListServiceImpl implements AssemblyListService {
|
|||||||
.eq(OrderComponentDO::getDeleted, DeletedCodeEnum.NOT_DELETED.getStatus())
|
.eq(OrderComponentDO::getDeleted, DeletedCodeEnum.NOT_DELETED.getStatus())
|
||||||
.select(
|
.select(
|
||||||
OrderComponentDO::getId,
|
OrderComponentDO::getId,
|
||||||
|
OrderComponentDO::getPid,
|
||||||
OrderComponentDO::getOrderId,
|
OrderComponentDO::getOrderId,
|
||||||
OrderComponentDO::getName,
|
OrderComponentDO::getName,
|
||||||
OrderComponentDO::getWidth,
|
OrderComponentDO::getWidth,
|
||||||
OrderComponentDO::getHeight,
|
OrderComponentDO::getHeight,
|
||||||
OrderComponentDO::getDepth
|
OrderComponentDO::getDepth,
|
||||||
|
OrderComponentDO::getProcessStatus,
|
||||||
|
OrderComponentDO::getExtraProcessStatus
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -256,6 +259,14 @@ public class AssemblyListServiceImpl implements AssemblyListService {
|
|||||||
throw new ServiceException(ORDER_COMPONENT_NOT_EXIST);
|
throw new ServiceException(ORDER_COMPONENT_NOT_EXIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 只有顶级节点才允许使用 extraProcessStatus;非顶级节点始终返回自身 processStatus。
|
||||||
|
for (OrderComponentDO parentComponent : parentComponents) {
|
||||||
|
if (Objects.equals(parentComponent.getPid(), OrderComponentDO.PARENT_ID_ROOT)
|
||||||
|
&& ObjectUtil.isNotEmpty(parentComponent.getExtraProcessStatus())) {
|
||||||
|
parentComponent.setProcessStatus(parentComponent.getExtraProcessStatus());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Map<Long, OrderComponentDO> componentDOMap = parentComponents.stream()
|
Map<Long, OrderComponentDO> componentDOMap = parentComponents.stream()
|
||||||
.collect(Collectors.toMap(OrderComponentDO::getId, Function.identity()));
|
.collect(Collectors.toMap(OrderComponentDO::getId, Function.identity()));
|
||||||
List<Long> orderIds = parentComponents.stream()
|
List<Long> orderIds = parentComponents.stream()
|
||||||
@@ -381,6 +392,7 @@ public class AssemblyListServiceImpl implements AssemblyListService {
|
|||||||
target.setThickness(toBigDecimal(source.getDepth()));
|
target.setThickness(toBigDecimal(source.getDepth()));
|
||||||
target.setRoomName(source.getRoomName());
|
target.setRoomName(source.getRoomName());
|
||||||
target.setBodyName(source.getBodyName());
|
target.setBodyName(source.getBodyName());
|
||||||
|
target.setProcessStatus(source.getProcessStatus());
|
||||||
|
|
||||||
// 仅父节点存在 children;叶子子部件明确设置为 null。
|
// 仅父节点存在 children;叶子子部件明确设置为 null。
|
||||||
target.setChildren(hasChildren ? new ArrayList<>() : null);
|
target.setChildren(hasChildren ? new ArrayList<>() : null);
|
||||||
|
|||||||
Reference in New Issue
Block a user