wuyouming666
2023-09-12 27a3b60fdd102fac12999684ead75a3a412ed66d
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -8,6 +8,7 @@
import com.example.springboot.mapper.HomeMapper;
import com.example.springboot.service.HomeService;
import com.example.springboot.service.SpianService;
import com.example.springboot.common.Result;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.alarmmg;
@@ -22,6 +23,9 @@
    @Autowired
    HomeService storageRackService;
    @Autowired
    SpianService spianService;
    @GetMapping("/load")    
    public Result selectAll(){
@@ -44,7 +48,6 @@
        map.put("list4",storageCagelist4);
        return Result.success(map);
    }
    
    @GetMapping("/loadinout")    
    public Result selectinout(Integer types){
@@ -69,7 +72,7 @@
    }
    @GetMapping("/Addglassid")
    public Result Addglassid(Integer glassid){
    public Result Addglassid(short glassid) {
        Map<String, Object> map = new HashMap<>();
        short taskno=homeMapper.SelectOutTask();
        if(taskno>0){
@@ -77,7 +80,7 @@
        }else{
            map.put("message2","200");
            //调用伍上片函数
            spianService.selectAll(glassid);
        }
        return Result.success(map);
    }
@@ -103,4 +106,29 @@
        return Result.success(map);
    }
    
    @GetMapping("/SelectCageInfo")
    public Result SelectCageInfo(short cage) {
        List<StorageCage> cageinfo = homeMapper.SelectCageInfo(cage);
        Map<String, Object> map = new HashMap<>();
        map.put("cageinfo", cageinfo);
        return Result.success(map);
    }
    @GetMapping("/DeleteByGlassID")
    public Result DeleteByGlassID(short glassid) {
        homeMapper.DeleteByGlassID(glassid);
        Map<String, Object> map = new HashMap<>();
        map.put("message3", "200");
        return Result.success(map);
    }
    @GetMapping("/OutByGlassID")
    public Result OutByGlassID(String glassid) {
        spianService.selectout2(glassid);
        Map<String, Object> map = new HashMap<>();
        map.put("message3", "200");
        return Result.success(map);
    }
}