自动化立体仓库 - WCS系统
#
Junjie
2024-03-16 429bc159b230ed31092aed3b8c4893c20e52f5c6
src/main/java/com/zy/asrs/controller/AgvController.java
@@ -2,12 +2,14 @@
import com.alibaba.fastjson.JSONObject;
import com.core.common.R;
import com.zy.core.thread.SiemensDevpThread3;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
@@ -22,9 +24,16 @@
    @PostMapping("/container/release")
    public R containerRelease(@RequestBody JSONObject jsonObject){
        System.out.println(jsonObject.toString());
        HashMap<String, String> map = new HashMap<>();
        map.put("allow","true");
        HashMap<String, Boolean> currentStationInfoMap = SiemensDevpThread3.currentStationInfoMap;
        String slotCode = jsonObject.get("slotCode").toString();
        Map<String,String> map = new HashMap<>();
        if(!currentStationInfoMap.get(slotCode)){
            map.put("allow","true");
        }else {
            map.put("allow","false");
        }
        R r = new R(0, "");
        return r.add(map);