严智鑫
2024-06-14 6977fb42d5067f6c938ef3de559a6ad19b542a0b
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageController.java
@@ -1,61 +1,39 @@
package com.mes.bigstorage.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mes.bigstorage.entity.BigStorageCage;
import com.mes.bigstorage.entity.BigStorageCageDetails;
import com.mes.bigstorage.service.impl.BigStorageCageDetailsServiceImpl;
import com.mes.bigstorage.service.impl.BigStorageCageServiceImpl;
import com.mes.bigstorage.service.BigStorageCageService;
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.GetMapping;
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("/bigStorageCage")
public class BigStorageCageController {
    private BigStorageCageServiceImpl bigStorageCageServiceImpl;
    private BigStorageCageDetailsServiceImpl bigStorageCageDetailsServiceImpl;
    @Autowired
    private BigStorageCageService bigStorageCageService;
    //todo: 实例代码 待删除
    @ApiOperation("测试")
    @GetMapping("/index")
    public String index() {
        return "hello world";
    @ApiOperation("理片笼启用禁用")
    @GetMapping("/updateStorageCageDisabled")
    public Result updateStorageCageDisabled(int slot,int enableState) {
        bigStorageCageService.updateStorageCageDisabled(slot,enableState);
        return Result.build(200,"启用/禁用成功",1);
    }
    @ApiOperation("理片笼信息")
    @GetMapping("/BigStorageCage")
    public List<BigStorageCage> BigStorageCage() {
        return bigStorageCageServiceImpl.list();
    }
    @ApiOperation("理片笼详情")
    @GetMapping("/BigStorageCageDetails")
    public List<BigStorageCageDetails> BigStorageCageDetails() {
        return bigStorageCageDetailsServiceImpl.list();
    }
    @ApiOperation("小车实时位置")
    @GetMapping("/CarPosition")
    public List<Integer> CarPosition() {
        return bigStorageCageDetailsServiceImpl.GetCarposition();
    }
    @ApiOperation("手动完成任务")
    @GetMapping("/FinishTask")
    public void FinishTask(int type, int id) {
        //    bigStorageCageDetailsService.FinishTask();
    }
}