wuyouming666
2024-04-22 c576dd18c9781ef1b101aa63128b1c1d57ba010a
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/controller/DownStorageCageDetailsController.java
@@ -1,21 +1,72 @@
package com.mes.downstorage.controller;
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.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhoush
 * @since 2024-03-27
 */
import java.util.List;
import java.util.Map;
@Api(tags = "缓存")
@RestController
@RequestMapping("/downStorageCageDetails")
@RequestMapping("/api/unLoadGlass/downstorage")
public class DownStorageCageDetailsController {
}
    @Autowired
    private DownStorageCageDetailsService downStorageCageDetailsService;
    @Autowired
    private DownStorageCageService downStorageCageService;
    @PostMapping("/add")
    public String addDownStorageCageDetails(@RequestBody DownStorageCageDetails details) {
        downStorageCageDetailsService.addDownStorageCageDetails(details);
        return "Details added successfully";
    }
    //查询磨边缓存理片笼内详情
    @ApiOperation("查询缓存理片笼内详情")
    @GetMapping("/selectStorageCage")
    @ResponseBody
    public Result selectEdgStorageCage () {
        List<Map> list=downStorageCageService.getCacheInfo();
        return Result.build(200,"成功",list);
    }
    @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
}