| package com.zy.asrs.controller; | 
|   | 
| 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; | 
|   | 
| /** | 
|  * 对接AGV、输送线放货接口 | 
|  */ | 
| @Slf4j | 
| @RestController | 
| @RequestMapping("/agv") | 
| public class AgvController { | 
|   | 
|     @PostMapping("/container/release") | 
|     public R containerRelease(@RequestBody JSONObject jsonObject){ | 
|   | 
|         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); | 
|   | 
|     } | 
|   | 
|     @PostMapping("/container/completed") | 
|     public R containerCompleted(@RequestBody JSONObject jsonObject){ | 
|   | 
|         return R.ok(); | 
|     } | 
|   | 
| } |