| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.flowable.engine.RuntimeService; |
| | | import org.flowable.engine.runtime.ProcessInstance; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @AllArgsConstructor |
| | | @Service |
| | |
| | | return processInstance.getProcessDefinitionKey(); |
| | | } |
| | | |
| | | /** |
| | | * 从流程变量获取发起流程的树形 |
| | | * @param processInstanceId |
| | | * @return |
| | | */ |
| | | public FlowProgramProperties getProgramProperties(String processInstanceId){ |
| | | FlowProgramProperties programProperties = new FlowProgramProperties(); |
| | | programProperties.setProcessInstanceId(processInstanceId); |
| | | |
| | | Map<String, Object> vars = runtimeService.getVariables(processInstanceId); |
| | | |
| | | programProperties.setDrawingNo(String.valueOf(vars.get(FlowContants.DRAWING_NO))); |
| | | programProperties.setDrawingNoEdition(String.valueOf(vars.get(FlowContants.DRAWING_NO_EDITION))); |
| | | programProperties.setProductModel(String.valueOf(vars.get(FlowContants.PRODUCT_MODEL))); |
| | | |
| | | programProperties.setProcessNo(String.valueOf(vars.get(FlowContants.PROCESS_NO))); |
| | | programProperties.setProcessEdition(String.valueOf(vars.get(FlowContants.PROCESS_EDITION)));//工序版次 |
| | | programProperties.setMachineCode(String.valueOf(vars.get(FlowContants.MACHINE_CODE))); |
| | | //数据处理名称为版次以前,零件号加工序号:YZL4-1100-01-50 零组件号:YZL4-1100-01 工序号 50 |
| | | |
| | | programProperties.setCraftEdition(String.valueOf(vars.get(FlowContants.CRAFT_EDITION))); |
| | | programProperties.setHasCuredProgram(String.valueOf(vars.get(FlowContants.HAS_CURED_PROGRAM))); |
| | | return programProperties; |
| | | } |
| | | |
| | | } |