zhoushihao
2024-10-11 d5d0d1c7a84b996b9bbcebfaf2c2c95f1a5a3678
hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/rawglassstation/controller/RawGlassStorageStationController.java
@@ -1,21 +1,37 @@
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 org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
 * <p>
 *  前端控制器
 * </p>
 * 前端控制器
 *
 * @author wf
 * @since 2024-09-10
 */
@RestController
@RequestMapping("/raw-glass-storage-station")
@RequestMapping("/rawGlassStorageStation")
public class RawGlassStorageStationController {
  @Resource RawGlassStorageStationService rawGlassStorageStationService;
  @ApiOperation("工位状态")
  @PostMapping("/updateSlotState")
  @ResponseBody
  public Result<Boolean> updateSlotState(@RequestParam(value = "state")int enableState, @RequestParam(value = "slot")int slot) {
    boolean result = rawGlassStorageStationService.updateSlotState(slot, enableState);
    if (enableState == 1) {
      return Result.build(200, "启用", result);
    } else {
      return Result.build(200, "禁用", result);
    }
  }
}