ZengTao
2024-05-28 53187450526b66ca4a7736c3ed84652fbb0bce4c
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
58
59
60
61
62
63
package com.mes.bigstorage.controller;
 
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mes.bigstorage.entity.BigStorageCageDetails;
import com.mes.bigstorage.service.BigStorageCageDetailsService;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhoush
 * @since 2024-03-27
 */
@Api(description = "理片笼详情")
@RestController
@RequestMapping("/bigStorageCageDetails")
public class BigStorageCageDetailsController {
 
    @Autowired
    private BigStorageCageDetailsService bigStorageCageDetailsService;
 
    @ApiOperation("理片笼详情")
    @PostMapping("/queryBigStorageCageDetails")
    public Result queryBigStorageCageDetails() {
        return Result.build(200,"查询成功",bigStorageCageDetailsService.list());
    }
 
    @ApiOperation("理片笼详情添加")
    @PostMapping("/insertBigStorageCageDetails")
    public Result insertBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails) {
        bigStorageCageDetailsService.save(bigStorageCageDetails);
        return Result.build(200,"添加成功",1);
 
    }
 
    @ApiOperation("理片笼详情删除")
    @PostMapping("/deleteBigStorageCageDetails")
    public Result deleteBigStorageCageDetails(BigStorageCageDetails bigStorageCageDetails) {
        bigStorageCageDetailsService.removeById(bigStorageCageDetails.getId());
        return Result.build(200,"删除成功",1);
 
    }
 
    @ApiOperation("理片笼任务查询")
    @PostMapping("/selectBigStorageCageDetails")
    public Result selectBigStorageCageDetails(int state) {
        LambdaQueryWrapper<BigStorageCageDetails> selectWrapper = new LambdaQueryWrapper<>();
        selectWrapper.eq(BigStorageCageDetails::getState,state);
        return Result.build(200,"查询成功",bigStorageCageDetailsService.list(selectWrapper));
 
    }
}