| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springblade.mdm.flow.constants.FlowConstant; |
| | | import org.springblade.mdm.flow.entity.FlowProgramFile; |
| | | import org.springblade.mdm.flow.service.FlowCommonService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | |
| | | @Transactional |
| | | public NcNode createNodeTreeToMachineGroup(FlowProgramProperties programProperties) { |
| | | NcNode root; |
| | | if(programProperties.getProcessDefinitionKey().equals(FlowContants.TRY_PROCESS_KEY)){ |
| | | if(programProperties.getProcessDefinitionKey().equals(FlowConstant.TRY_PROCESS_KEY)){ |
| | | if(Func.isEmpty(programProperties.getDeviation()) || |
| | | (FlowContants.Y.equals(programProperties.getHasCuredProgram()) && FlowContants.N.equals(programProperties.getCureProgramUseable()))){ |
| | | (FlowConstant.Y.equals(programProperties.getHasCuredProgram()) && FlowConstant.N.equals(programProperties.getCureProgramUseable()))){ |
| | | //普通试切,或者有固化不可用,建立试切节点 |
| | | //试切根节点 |
| | | root = rootNodeByName(TRY_NAME); |
| | |
| | | root = createDeviationNode(); |
| | | } |
| | | } |
| | | }else if(programProperties.getProcessDefinitionKey().equals(FlowContants.CURE_PROCESS_KEY)){ |
| | | }else if(programProperties.getProcessDefinitionKey().equals(FlowConstant.CURE_PROCESS_KEY)){ |
| | | root = rootNodeByName(CURE_NAME); |
| | | if(root == null){ |
| | | root = createCureNode(); |
| | |
| | | ncNode.setDeviation(programProperties.getDeviation()); |
| | | |
| | | if(NcNode.TYPE_PROGRAM_PACKAGE.equals(nodeType)) {//程序包节点,分配程序编号 |
| | | |
| | | ncNode.setProgramNo(programProperties.getProgramNo()); |
| | | } |
| | | } |