严智鑫
2024-05-07 b365a0879edc787655b908b0dbb65b5e966bb23b
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageDetailsController.java
@@ -3,7 +3,9 @@
import com.mes.downstorage.entity.DownStorageCageDetails;
import com.mes.downstorage.service.DownStorageCageDetailsService;
import com.mes.downstorage.service.DownStorageCageService;
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.*;
@@ -11,7 +13,7 @@
import java.util.Map;
@Api(tags = "缓存")
@RestController
@RequestMapping("/api/unLoadGlass/downstorage")
@RequestMapping("/downStorage")
public class DownStorageCageDetailsController {
    @Autowired
@@ -25,21 +27,46 @@
        return "Details added successfully";
    }
    @GetMapping("/leisure")
    public List<Map> getLeisureData() {
        return downStorageCageService.getCacheInfo();
    //查询磨边缓存理片笼内详情
    @ApiOperation("查询缓存理片笼内详情")
    @GetMapping("/selectStorageCage")
    @ResponseBody
    public Result selectEdgStorageCage () {
        List<Map> list=downStorageCageDetailsService.getCacheInfo();
        return Result.build(200,"成功",list);
    }
    private static final int START_VALUE = 0;
    private static final int END_VALUE = 5;
    @GetMapping("/leisure2")
    public List<DownStorageCageDetails> getLeisureData2() {
        // 调用Service层获取数据
        return downStorageCageService.getCacheOut(START_VALUE, END_VALUE);
    @ApiOperation("添加缓存理片笼信息   功能:笼内绑定玻璃  参数(DownStorageCageDetails downStorageCageDetails)")
    @PostMapping("/insertEdgStorageCage")
    @ResponseBody
    public Result insertEdgStorageCage(@RequestBody DownStorageCageDetails downStorageCageDetails) {
        boolean isSucess=downStorageCageDetailsService.updatedownStorageCageDetails(downStorageCageDetails);
        return Result.build(200,"添加成功",1);
    }
    @ApiOperation("修改缓存理片笼信息   功能:对笼内栅格进行【启用/禁用】/ 【更换】笼内栅格玻璃信息")
    @PostMapping("/updateEdgStorageCage")
    @ResponseBody
    public Result updateEdgStorageCage(@RequestBody DownStorageCageDetails downStorageCageDetails) {
        boolean isSucess=downStorageCageDetailsService.updatedownStorageCageDetails(downStorageCageDetails);
        return Result.build(200,"更换成功",1);
    }
    @ApiOperation("删除缓存理片笼信息   功能:对笼内栅格玻璃进行【清除】")
    @PostMapping("/deleteEdgStorageCage")
    @ResponseBody
    public Result deleteEdgStorageCage(@RequestBody DownStorageCageDetails downStorageCageDetails) {
        boolean isSucess=downStorageCageDetailsService.updatedownStorageCageDetails(downStorageCageDetails);
        return Result.build(200,"删除成功",1);
    }
//
    // Other CRUD operations can be defined here
}