| | |
| | | * @since 2024-08-28 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/jiumumes/tasking") |
| | | @RequestMapping("/tasking") |
| | | public class TaskingController { |
| | | @Autowired |
| | | private TaskingService taskingService; |
| | | |
| | | @ApiOperation("切换模式") |
| | | @PostMapping("/updateLoadState") //切换模式" |
| | | @ResponseBody |
| | |
| | | List<Tasking> tasking =taskingService.selectTasking(); |
| | | return Result.build(1,"定制模式",tasking); |
| | | } |
| | | |
| | | @ApiOperation("查询当前工艺,某工作状态的线上任务") |
| | | @PostMapping("/findCraftTasking") |
| | | @ResponseBody |
| | | public Result findCraftTasking(@RequestBody Tasking tasking) { |
| | | List<Tasking> list =taskingService.findCraftTasking(tasking); |
| | | return Result.build(200,"成功",list); |
| | | } |
| | | |
| | | @ApiOperation("修改任务状态 【破损/失败/完工】") |
| | | @PostMapping("/updateCraftTasking") |
| | | @ResponseBody |
| | | public Result updateCraftTasking(@RequestBody Tasking tasking) { |
| | | int count =taskingService.updateCraftTasking(tasking); |
| | | return Result.build(200,"修改成功:"+count,count); |
| | | } |
| | | @ApiOperation("修改当前设备 【开工/暂停】") |
| | | @PostMapping("/updateMachineState") |
| | | @ResponseBody |
| | | public Result updateMachineState(@RequestBody Tasking tasking) { |
| | | int count =taskingService.updateCraftTasking(tasking); |
| | | return Result.build(200,"修改成功:"+count,count); |
| | | } |
| | | @ApiOperation("修改当前设备 【上线】") |
| | | @PostMapping("/updateTopLine") |
| | | @ResponseBody |
| | | public Result updateTopLine(@RequestBody Tasking tasking) { |
| | | int count =taskingService.updateCraftTasking(tasking); |
| | | return Result.build(200,"修改成功:"+count,count); |
| | | } |
| | | |
| | | @ApiOperation("修改当前设备 【下线】") |
| | | @PostMapping("/updateDownLine") |
| | | @ResponseBody |
| | | public Result updateDownLine(@RequestBody Tasking tasking) { |
| | | int count =taskingService.updateCraftTasking(tasking); |
| | | return Result.build(200,"修改成功:"+count,count); |
| | | } |
| | | |
| | | |
| | | } |
| | | |