| | |
| | | private MesProTaskService taskService; |
| | | @Resource |
| | | private MesProProcessService processService; |
| | | @Resource |
| | | private cn.iocoder.yudao.module.mes.service.pro.workorder.MesProWorkOrderTechnicalFileService technicalFileService; |
| | | |
| | | @GetMapping("/technical-files") |
| | | @Operation(summary = "获得工单创建时的技术文件快照") |
| | | @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')") |
| | | public CommonResult<List<cn.iocoder.yudao.module.mdm.controller.admin.item.vo.MdmItemTechnicalFileRespVO>> getTechnicalFiles(@RequestParam("id") Long id) { |
| | | workOrderService.validateWorkOrderExists(id); |
| | | return success(technicalFileService.list(id)); |
| | | } |
| | | |
| | | @PostMapping("/create") |
| | | @Operation(summary = "创建生产工单") |
| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得生产工单") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')") |
| | | public CommonResult<MesProWorkOrderRespVO> getWorkOrder(@RequestParam("id") Long id) { |
| | | MesProWorkOrderDO workOrder = workOrderService.getWorkOrder(id); |
| | | if (workOrder == null) { |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得生产工单分页") |
| | | @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')") |
| | | public CommonResult<PageResult<MesProWorkOrderRespVO>> getWorkOrderPage(@Valid MesProWorkOrderPageReqVO pageReqVO) { |
| | | PageResult<MesProWorkOrderDO> pageResult = workOrderService.getWorkOrderPage(pageReqVO); |
| | | return success(new PageResult<>(buildWorkOrderRespVOList(pageResult.getList()), pageResult.getTotal())); |
| | |
| | | |
| | | @GetMapping("/approve-process-list") |
| | | @Operation(summary = "获取审批报工的流程定义列表") |
| | | @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')") |
| | | public CommonResult<List<Map<String, Object>>> getWorkOrderApproveProcessDefinitionList() { |
| | | return success(workOrderService.getWorkOrderApproveProcessDefinitionList()); |
| | | } |
| | | |
| | | @GetMapping("/schedule-page") |
| | | @Operation(summary = "获得生产工单调度状态分页") |
| | | @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')") |
| | | public CommonResult<PageResult<MesProWorkOrderRespVO>> getWorkOrderSchedulePage(@Valid MesProWorkOrderPageReqVO pageReqVO) { |
| | | PageResult<MesProWorkOrderDO> pageResult = workOrderService.getWorkOrderSchedulePage(pageReqVO); |
| | | return success(new PageResult<>(buildWorkOrderRespVOList(pageResult.getList()), pageResult.getTotal())); |
| | |
| | | @GetMapping("/progress/{id}") |
| | | @Operation(summary = "获取工单进度详情") |
| | | @Parameter(name = "id", description = "编号", required = true) |
| | | @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')") |
| | | public CommonResult<MesProWorkOrderProgressRespVO> getWorkOrderProgress(@PathVariable("id") Long id) { |
| | | return success(workOrderService.getWorkOrderProgress(id)); |
| | | } |