ZengTao
2024-09-24 7c7c8b1fb4dd63bbc25130b32d507aee5c130d90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.mes.rawglassstation.controller;
 
import com.mes.rawglassstation.service.RawGlassStorageStationService;
import com.mes.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
/**
 * 前端控制器
 *
 * @author wf
 * @since 2024-09-10
 */
@RestController
@RequestMapping("/rawGlassStorageStation")
public class RawGlassStorageStationController {
 
  @Resource RawGlassStorageStationService rawGlassStorageStationService;
 
  @ApiOperation("工位状态")
  @PostMapping("/updateSlotState")
  @ResponseBody
  public Result<Boolean> updateSlotState(@RequestBody Integer enableState, Integer slot) {
    boolean result = rawGlassStorageStationService.updateSlotState(slot, enableState);
    if (enableState == 1) {
      return Result.build(1, "启用", result);
    } else {
      return Result.build(0, "禁用", result);
    }
  }
}