zhoushihao
2025-02-28 f9ac6553e1e96f07b58ea4e0b51f6af9875219ea
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
56
57
package com.mes.hollow.controller;
 
 
import com.mes.hollow.entity.HollowBigStorageCageDetails;
import com.mes.hollow.entity.dto.HollowBigStorageAndDetailsDTO;
import com.mes.hollow.service.HollowBigStorageCageDetailsService;
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.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * (HollowBigStorageCageDetails)表控制层
 *
 * @author makejava
 * @since 2024-11-21 09:23:12
 */
@Api(tags = "中空理片笼子详情")
@RestController
@RequestMapping("hollowBigStorageCageDetails")
public class HollowBigStorageCageDetailsController {
 
    @Autowired
    private HollowBigStorageCageDetailsService hollowBigStorageCageDetailsService;
 
    @ApiOperation("理片笼详情添加")
    @PostMapping("/insertHollowBigStorageCageDetails")
    public Result<List<HollowBigStorageAndDetailsDTO>> insertHollowBigStorageCageDetails(@RequestBody HollowBigStorageCageDetails details) {
        hollowBigStorageCageDetailsService.insertHollowBigStorageCageDetails(details);
        return Result.build(200, "添加成功", null);
    }
 
    @ApiOperation("理片笼详情删除")
    @PostMapping("/deleteHollowBigStorageCageDetails")
    public Result<List<HollowBigStorageAndDetailsDTO>> deleteHollowBigStorageCageDetails(String glassId, Integer deviceId, Integer slot) {
        hollowBigStorageCageDetailsService.deleteHollowBigStorageCageDetails(glassId, deviceId, slot);
        return Result.build(200, "删除成功", null);
    }
 
    @ApiOperation("理片笼笼内玻璃破损0/拿走1")
    @PostMapping("/damageHollowBigStorageCageDetails")
    public Result<List<HollowBigStorageAndDetailsDTO>> damageHollowBigStorageCageDetails(String glassId, Integer deviceId, Integer slot, int state) {
        hollowBigStorageCageDetailsService.damageHollowBigStorageCageDetails(glassId, deviceId, slot, state);
        return Result.build(200, "破损/拿走成功", null);
    }
 
    @ApiOperation("中空理片笼格子禁用/启用")
    @GetMapping("/updateHollowStorageCageDisabled")
    public Result updateHollowStorageCageDisabled(int slot, int enableState) {
        hollowBigStorageCageDetailsService.updateHollowStorageCageDisabled(slot, enableState);
        return Result.build(200, "启用/禁用成功", 1);
    }
 
}