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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.mes.edgstoragecage.controller;
 
import com.mes.damage.entity.request.DamageRequest;
import com.mes.edgstoragecage.entity.EdgStorageCage;
import com.mes.edgstoragecage.entity.EdgStorageCageDetails;
import com.mes.edgstoragecage.service.EdgStorageCageDetailsService;
import com.mes.edgstoragecage.service.EdgStorageCageService;
import com.mes.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
 
/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhoush
 * @since 2024-04-07
 */
@Api(tags = "理片笼缓存")
@RestController
@RequestMapping("/edgStorageCage")
public class EdgStorageCageController {
 
    @Autowired
    private EdgStorageCageService edgStorageCageService;
 
    @Autowired
    private EdgStorageCageDetailsService edgStorageCageDetailsService;
 
    @ApiOperation("修改磨边缓存理片笼信息   功能:对笼内栅格进行【启用/禁用】")
    @PostMapping("/updateEdgStorageCage")
    public Result updateEdgStorageCage(@RequestBody EdgStorageCage edgStorageCage) {
        String isSucess = edgStorageCageService.updateEdgStorageCage(edgStorageCage) ? "成功" : "失败";
        return Result.build(200, "【启用/禁用】" + isSucess, 1);
    }
 
    @ApiOperation("磨边缓存理片笼信息   功能:对笼内栅格玻璃进行【清除/更换/绑定】 EdgStorageCage格子信息,EdgStorageCageDetails 玻璃信息 ")
    @PostMapping("/edgStorageCageGlass")
    public Result edgStorageCageGlass(@RequestBody EdgStorageCageDetails edgStorageCageDetails, int edgStorageCageId) {
 
        String isSucess = edgStorageCageService.updateEdgStorageCageDetails(edgStorageCageId, edgStorageCageDetails) ? "成功" : "失败";
        return Result.build(200, "【清除/更换/绑定】" + isSucess, 1);
    }
 
    @ApiOperation("磨边模块汇报玻璃状态   功能:对磨边队列玻璃进行【破损/拿走】  ")
    @PostMapping("/edgReportStatus")
    public Result edgReportStatus(@RequestBody @Validated DamageRequest request) {
        return Result.build(200, "【破损/拿走】" + edgStorageCageDetailsService.edgReportStatus(request), 1);
    }
 
}