|
|
@ -40,50 +40,26 @@ public class WorkstationOperstepsController { |
|
|
|
|
|
|
|
@Resource |
|
|
|
private WorkstationOperstepsService workstationOperstepsService; |
|
|
|
@GetMapping("/get") |
|
|
|
@Operation(summary = "获得工位操作步骤关联") |
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|
|
|
@PreAuthorize("@ss.hasPermission('strategy:workstation-opersteps:query')") |
|
|
|
public CommonResult<WorkstationOperstepsRespVO> getMesWorkstationOpersteps(@RequestParam("id") Long id) { |
|
|
|
WorkstationOperstepsDO mesWorkstationOpersteps = workstationOperstepsService.getMesWorkstationOpersteps(id); |
|
|
|
return success(WorkstationOperstepsConvert.INSTANCE.convert(mesWorkstationOpersteps)); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/page") |
|
|
|
@Operation(summary = "获得工位操作步骤关联分页") |
|
|
|
@PreAuthorize("@ss.hasPermission('strategy:workstation-opersteps:query')") |
|
|
|
public CommonResult<PageResult<WorkstationOperstepsRespVO>> getMesWorkstationOperstepsPage(@Valid WorkstationOperstepsPageReqVO pageVO) { |
|
|
|
PageResult<WorkstationOperstepsDO> pageResult = workstationOperstepsService.getMesWorkstationOperstepsPage(pageVO); |
|
|
|
return success(WorkstationOperstepsConvert.INSTANCE.convertPage(pageResult)); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/pageListByWorkstationCode") |
|
|
|
@GetMapping("/getWorkstationOperstepsPage") |
|
|
|
@Operation(summary = "根据工位code获得操作步骤") |
|
|
|
@Parameter(name = "code", description = "工位编号", required = true) |
|
|
|
@PreAuthorize("@ss.hasPermission('mes:workstation-process:query')") |
|
|
|
public CommonResult<PageResult<WorkstationOperstepsRespVO>> pageListByWorkstationCode(@Valid WorkstationOperstepsPageReqVO pageVO) { |
|
|
|
PageResult<WorkstationOperstepsRespVO> pageResult = workstationOperstepsService.pageListByWorkstationCode(pageVO); |
|
|
|
return success(pageResult); |
|
|
|
} |
|
|
|
@GetMapping("/pageCheckListByWorkstationCode") |
|
|
|
@Operation(summary = "根据工位code获得可关联操作步骤列表") |
|
|
|
@Parameter(name = "code", description = "工位编号", required = true) |
|
|
|
@PreAuthorize("@ss.hasPermission('mes:workstation-process:query')") |
|
|
|
public CommonResult<PageResult<WorkstationOperstepsRespVO>> pageCheckListByWorkstationCode(@Valid WorkstationOperstepsPageReqVO pageVO) { |
|
|
|
PageResult<WorkstationOperstepsRespVO> pageResult = workstationOperstepsService.pageCheckListByWorkstationCode(pageVO); |
|
|
|
public CommonResult<PageResult<WorkstationOperstepsRespVO>> getWorkstationOperstepsPage(@Valid WorkstationOperstepsPageReqVO pageVO) { |
|
|
|
PageResult<WorkstationOperstepsRespVO> pageResult = workstationOperstepsService.getWorkstationOperstepsPage(pageVO); |
|
|
|
return success(pageResult); |
|
|
|
} |
|
|
|
@PostMapping("/createRelation") |
|
|
|
@PostMapping("/create") |
|
|
|
@Operation(summary = "关联工位操作步骤") |
|
|
|
@PreAuthorize("@ss.hasPermission('strategy:workstation-opersteps:create')") |
|
|
|
public CommonResult<Object> createRelation(@Valid @RequestBody WorkstationOperstepsRelationReqVO workstationProcessRelationReqVO) { |
|
|
|
workstationOperstepsService.createRelation(workstationProcessRelationReqVO); |
|
|
|
workstationOperstepsService.create(workstationProcessRelationReqVO); |
|
|
|
return success(null); |
|
|
|
} |
|
|
|
@PostMapping("/deleteRelation") |
|
|
|
@PostMapping("/delete") |
|
|
|
@Operation(summary = "删除工位操作步骤关联") |
|
|
|
@PreAuthorize("@ss.hasPermission('strategy:workstation-opersteps:delete')") |
|
|
|
public CommonResult<Object> deleteRelation(@Valid @RequestBody WorkstationOperstepsRelationReqVO workstationProcessRelationReqVO) { |
|
|
|
return success(workstationOperstepsService.deleteRelation(workstationProcessRelationReqVO)); |
|
|
|
return success(workstationOperstepsService.delete(workstationProcessRelationReqVO)); |
|
|
|
} |
|
|
|
} |
|
|
|