| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | 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.basesetting.producedivision.service.QinzheFgbService; |
| | | import org.springblade.mdm.flow.service.FlowProgramFileService; |
| | | import org.springblade.mdm.flow.service.TaskDispatchService; |
| | | 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; |
| | | import org.springblade.mdm.program.service.ProgramFlowStatusQueryService; |
| | |
| | | private final NcNodeService ncNodeService; |
| | | private final ProgramFlowStatusQueryService programFlowStatusQueryService; |
| | | private final FlowProgramFileService flowProgramFileService; |
| | | private final QinzheFgbService qinzheFgbService; |
| | | private final TaskDispatchService taskDispatchService; |
| | | /** |
| | | * 新增 |
| | | */ |
| | |
| | | |
| | | @PostMapping("/lock") |
| | | @Operation(summary = "锁定节点(程序包名)") |
| | | public R<Boolean> lock(@Parameter(description="程序包名节点id)")Long id) { |
| | | ncNodeService.lock(id); |
| | | public R<Boolean> lock(@Parameter(description="程序包名节点id)")Long id,@Parameter(description="锁定原因)")String remark) { |
| | | ncNodeService.lock(id,remark); |
| | | return R.<Boolean>status(true); |
| | | } |
| | | |
| | | @GetMapping("/query-lock-remark") |
| | | @Operation(summary = "查询锁定原因") |
| | | public R<String> queryLockRemark(@Parameter(description="程序包名节点id)")Long id) { |
| | | |
| | | NcNode node = ncNodeService.getById(id); |
| | | if(node.hasLocked()){ |
| | | return R.data(node.getRemark()); |
| | | }else{ |
| | | return R.data(StringUtils.EMPTY); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/lazy-list") |
| | |
| | | |
| | | return R.data(list); |
| | | } |
| | | @GetMapping("/search") |
| | | @Operation(summary = "首页搜索", description = "搜索指定零组件号") |
| | | public R<List<Long>> search(NcNodeQueryVO queryVO) { |
| | | @GetMapping("/search-list2") |
| | | @Operation(summary = "涉密网首页搜索", description = "搜索指定零组件号") |
| | | public R<List<NcNodeVO>> search(NcNodeQueryVO queryVO) { |
| | | if(Func.isEmpty(queryVO.getDrawingNo())){ |
| | | return R.fail("请输入零组件号"); |
| | | } |
| | | List<Long> list = ncNodeService.searchDrawing(queryVO); |
| | | List<NcNodeVO> list = ncNodeService.searchList2(queryVO); |
| | | |
| | | return R.data(list); |
| | | } |
| | |
| | | @GetMapping("/drawing-no-pick") |
| | | @Operation(summary = "首页搜索零组件下拉数据", description = "搜索指定零组件号") |
| | | public R<List<String>> drawingNoPick(String drawingNo) { |
| | | return R.data(qinzheFgbService.seletDropList(drawingNo)); |
| | | return R.data(taskDispatchService.drawingNoSeletDropList(drawingNo)); |
| | | } |
| | | |
| | | @GetMapping("/history-by-nodeid") |