| | |
| | | //List<NcNode> historyProgramPackageNodes = nodeService.getTryNodeHistory(pkgNode); |
| | | try { |
| | | moveNodeToCuredTree(pkgNode, flowProps);//, historyProgramPackageNodes |
| | | |
| | | //固化不锁定,后续还可能使用该固化程序 |
| | | //nodeService.lockSameNameOtherMachineGroupProgramPackage(pkgNode); |
| | | /* |
| | | nodeService.lambdaUpdate().eq(NcNode::getDrawingNo,pkgNode.getDrawingNo()) |
| | | .eq(NcNode::getProcessNo,pkgNode.getProcessNo()) |
| | | .eq(NcNode::getName,pkgNode.getName()) |
| | | .ne(NcNode::getMachineGroupCode,pkgNode.getMachineGroupCode()) |
| | | .eq(NcNode::getIsCured,1) |
| | | .set(NcNode::getIsLocked,NcNode.LOCKED) |
| | | .set(NcNode::getRemark,"回传固化同名程序锁定") |
| | | .update(); |
| | | */ |
| | | }catch(Exception e) { |
| | | log.error("固化流程完成异常",e); |
| | | throw new ServiceException("普通固化执行异常"+e.getMessage()); |
| | |
| | | cureNode.upgradeVersionNumber(); |
| | | } |
| | | |
| | | //nodeService.save(cureNode); |
| | | |
| | | return cureNode; |
| | | } |
| | | /** |
| | |
| | | byte[] bytes = IOUtils.toByteArray(ins); |
| | | ByteArrayInputStream byteInputStream = new ByteArrayInputStream(bytes); |
| | | |
| | | //InputStream finishedStream = programAnnotationService.setGHAnnotation(byteInputStream,controlSystem,annoDicts); |
| | | List<DictBiz> annoDictList = programAnnotationService.getAnnotionDictList(); |
| | | AnnotationProperties annoProps = config.getConfigMap().get(controlSystem); |
| | | if(annoProps == null){ |
| | | annoProps = AnnotationProperties.getDefault(); |
| | | } |
| | | InputStream finishedStream =AnnotationUtil.setAnnotationAndGetInputStream(byteInputStream, "GH", annoProps.getStatusLineIndex(), controlSystem, annoDictList); |
| | | InputStream finishedStream =AnnotationUtil.setAnnotationAndGetInputStream(byteInputStream, AnnotationUtil.GH, annoProps.getStatusLineIndex(), controlSystem, annoDictList); |
| | | try(finishedStream) { |
| | | finishedStream.reset(); |
| | | BladeFile bfile = ossTemplate.putFile(flowProgramFile.getName(), finishedStream); |