1、利元亨现场问题修改2

This commit is contained in:
2026-03-06 08:06:28 +08:00
parent 098deb77a0
commit dfa4eaa3db
2 changed files with 39 additions and 0 deletions

View File

@@ -624,6 +624,26 @@ public class ProjectServiceImpl extends BaseService implements IProjectService {
}
// 对工位进行排序,-M工位顺序排第一个
workspaceNodeList = workspaceNodeList.stream().sorted(Comparator.comparing(NodeAllBase::getNodeCode)).collect(Collectors.toList());
// 利元亨定制
// workspaceNodeList.sort((o1, o2) -> {
// String[] workspaceNode1 = o1.getNodeCode().split("-");
// String[] workspaceNode2 = o2.getNodeCode().split("-");
//
// if (workspaceNode1.length != 2 || workspaceNode2.length != 2) {
// return o1.getNodeCode().compareTo(o2.getNodeCode());
// }
//
// int prefix1 = Integer.parseInt(workspaceNode1[0]);
// int prefix2 = Integer.parseInt(workspaceNode2[0]);
// if (prefix1 != prefix2) {
// return Integer.compare(prefix1, prefix2);
// }
//
// int suffix1 = Integer.parseInt(workspaceNode1[1]);
// int suffix2 = Integer.parseInt(workspaceNode2[1]);
// return Integer.compare(suffix1, suffix2);
// });
NodeAllBase specialWorkspaceNode = workspaceNodeList.stream().filter(workspaceNode -> workspaceNode.getNodeCode().contains("-M")).findFirst().orElse(null);
log.info("specialWorkspaceNode为{}",specialWorkspaceNode);
if (specialWorkspaceNode != null) {

View File

@@ -614,6 +614,25 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
return;
}
List<NodeAllBase> workspaceNodeList = children.stream().filter(node -> NodeTypeEnum.WORKSPACE.getValue().equals(node.getNodeType())).collect(Collectors.toList());
// 利元亨定制
// workspaceNodeList.sort((o1, o2) -> {
// String[] workspaceNode1 = o1.getNodeCode().split("-");
// String[] workspaceNode2 = o2.getNodeCode().split("-");
//
// if (workspaceNode1.length != 2 || workspaceNode2.length != 2) {
// return o1.getNodeCode().compareTo(o2.getNodeCode());
// }
//
// int prefix1 = Integer.parseInt(workspaceNode1[0]);
// int prefix2 = Integer.parseInt(workspaceNode2[0]);
// if (prefix1 != prefix2) {
// return Integer.compare(prefix1, prefix2);
// }
//
// int suffix1 = Integer.parseInt(workspaceNode1[1]);
// int suffix2 = Integer.parseInt(workspaceNode2[1]);
// return Integer.compare(suffix1, suffix2);
// });
if (CollectionUtils.isEmpty(workspaceNodeList)) {
for (NodeAllBase child : children) {
if (child instanceof ProjectNodePo) {