| | |
| | | pkgNode.setIsLocked(1); |
| | | nodeService.updateById(pkgNode); |
| | | }else { |
| | | //试切的 |
| | | pkgNode.setIsCured(1); |
| | | //设置过期日期 |
| | | pkgNode.setExpireDate(calculateExpireDate()); |
| | |
| | | |
| | | /** |
| | | * 将节点和历史节点挪动到固化的同级节点下 |
| | | * @param pkgNode 要挪动的节点 |
| | | * @param historyProgramPackageNodes 程序包名 历史节点 |
| | | */ |
| | | void moveNodeToCuredTree(NcNode pkgNode,List<NcNode> historyProgramPackageNodes, FlowProgramProperties programProperties) { |
| | | //创建节点到机床级别.(固化树) |
| | | NcNode machineNode = ncNodeAutoCreateService.createNodeTreeToMachine(programProperties); |
| | | |
| | | //移动到固化树下的机床节点下层 |
| | | //String newParentIds = machineNode.getParentIds()+","+machineNode.getId(); |
| | | |
| | | //更新机床 下属节点的数据 为旧版本,锁定(最新版本=0,lock=1). |
| | | /* |
| | | this.nodeService.lambdaUpdate().likeRight(NcNode::getParentIds, newParentIds) |
| | | .in(NcNode::getNodeType, Arrays.asList(NcNode.TYPE_PROGRAM_PACKAGE,NcNode.TYPE_PROGRAM_FILE)) |
| | | .set(NcNode::getIsLastEdition,0).set(NcNode::getIsLocked,1).update(); |
| | | */ |
| | | //机床下现在没有文件了,程序包名升级与机床同级了,改为找到机床同级程序包名更新了 |
| | | this.nodeService.lambdaUpdate().likeRight(NcNode::getParentIds, machineNode.getParentIds()) |
| | | .in(NcNode::getNodeType, Arrays.asList(NcNode.TYPE_PROGRAM_PACKAGE,NcNode.TYPE_PROGRAM_FILE)) |