| | |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.mdm.basesetting.machine.vo.MachineQueryVO; |
| | | import org.springblade.mdm.basesetting.machine.vo.MachineVO; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.program.entity.NcNode; |
| | | import org.springblade.mdm.program.entity.NcProgram; |
| | | import org.springblade.mdm.program.service.NcNodeService; |
| | | import org.springblade.mdm.program.service.NcProgramService; |
| | |
| | | private final NcProgramService ncProgramService; |
| | | private final NcNodeService ncNodeService; |
| | | private final ProgramFlowStatusQueryService programFlowStatusQueryService; |
| | | private final FlowProgramFileService flowProgramFileService; |
| | | /** |
| | | * 新增 |
| | | */ |
| | |
| | | break; |
| | | } |
| | | ncNodeVO.setFlowStatus(programFlowStatusQueryService.queryFlowStatus(ncNodeVO.getProcessInstanceId())); |
| | | /* |
| | | NcProgram program = ncProgramService.getByBindNodeId(ncNodeVO.getId()); |
| | | if(program != null) { |
| | | ncNodeVO.setProcessEdition(program.getProcessEdition()); |
| | | ncNodeVO.setDrawingNo(program.getDrawingNo()); |
| | | ncNodeVO.setMachineCode(program.getMachineCode()); |
| | | ncNodeVO.setProcessName(program.getProcessName()); |
| | | ncNodeVO.setVersionNumber(program.getVersionNumber()); |
| | | |
| | | //record中找不到时未启动0;找到了需要查询流程实例id,是否运行中 |
| | | ncNodeVO.setFlowStatus(programFlowStatusQueryService.queryFlowStatus(program.getId())); |
| | | }*/ |
| | | } |
| | | |
| | | } |
| | |
| | | return R.data(this.ncNodeService.historyByNodeId(id)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/compare-content") |
| | | @Operation(summary = "对比内容数据", description = "查询对比内容的2个文本数据") |
| | | public R<CompareDataVO> compareContent(@Parameter(description="节点1的ID(nodeType=70的节点id)")Long id1,@Parameter(description="节点2的ID(nodeType=70的节点id)")Long id2) { |
| | | CompareDataVO vo = new CompareDataVO(); |
| | | NcNode node1 = ncNodeService.getById(id1); |
| | | NcNode node2 = ncNodeService.getById(id2); |
| | | if(node1.getFlowProgramFileId() != null) { |
| | | vo.setContent1(flowProgramFileService.getFileContent(node1.getFlowProgramFileId())); |
| | | |
| | | } |
| | | if(node2.getFlowProgramFileId() != null) { |
| | | vo.setContent2(flowProgramFileService.getFileContent(node2.getFlowProgramFileId())); |
| | | } |
| | | |
| | | return R.data(vo); |
| | | } |
| | | } |