ZengTao
2024-09-20 34a5775085f5db40dfc80250e5185f5485eecfc2
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
34
35
36
37
38
package com.mes.rawglassdetails.controller;
 
 
import com.mes.rawglassdetails.service.RawGlassStorageDetailsService;
import com.mes.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author wf
 * @since 2024-09-10
 */
@RestController
@RequestMapping("/rawGlassStorageDetails")
public class RawGlassStorageDetailsController {
 
    @Autowired
//    RawGlassStorageDetailsService rawGlassStorageDetailsService;
    private RawGlassStorageDetailsService rawGlassStorageDetailsService;
    @ApiOperation("工位状态")
    @PostMapping("/updateEnableState")
    @ResponseBody
    public Result<Boolean> updateStatus(@RequestBody Integer enableState) {
        boolean result = rawGlassStorageDetailsService.updateRawGlassStorageDetails(String.valueOf(enableState));
        if (enableState == 1) {
            return Result.build(1, "启用", result);
        } else {
            return Result.build(0, "禁用", result);
        }
    }
 
 
}