自动化立体仓库 - WMS系统
王佳豪
2021-04-06 7bf327fe86f6c3fcfb8b539e8d616811282f922c
src/main/java/com/zy/asrs/controller/WorkController.java
@@ -10,10 +10,12 @@
import com.zy.asrs.service.WorkService;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * 工作流接口控制器
@@ -39,10 +41,47 @@
        return R.ok().add(basDevpService.getAvailableEmptyInSite());
    }
    @RequestMapping("/available/take/site")
    @RequestMapping("/available/take/site/{type}")
    @ManagerAuth(memo = "获取出库站点")
    public R availableTakeSite(){
        return R.ok().add(basDevpService.getAvailableOutSite());
    public R availableTakeSite(@PathVariable("type") Integer type){
        List<Map<String, Object>> result = new ArrayList<>();
        List<Integer> outSite = basDevpService.getAvailableOutSite(101);
        for (Integer siteId : outSite) {
            if (type == 2 && siteId > 10) {
                Map<String, Object> map = new HashMap<>();
                map.put("siteId", siteId);
                map.put("desc", siteId + "(全板出库口)");
                result.add(map);
            }
            if (type == 1 && siteId < 10) {
                Map<String, Object> map = new HashMap<>();
                map.put("siteId", siteId);
                map.put("desc", siteId + "(全板出库口)");
                result.add(map);
            }
        }
        List<Integer> pickOutSite = basDevpService.getAvailableOutSite(103);
        for (Integer siteId : pickOutSite) {
            if (type == 2 && siteId > 10) {
                Map<String, Object> map = new HashMap<>();
                map.put("siteId", siteId);
                map.put("desc", siteId + "(拣料出库口)");
                result.add(map);
            }
            if (type == 1 && siteId < 10) {
                Map<String, Object> map = new HashMap<>();
                map.put("siteId", siteId);
                map.put("desc", siteId + "(拣料出库口)");
                result.add(map);
            }
        }
        return R.ok().add(result);
    }
    @RequestMapping("/available/take/check/site")
    @ManagerAuth(memo = "获取盘点出库站点")
    public R availableTakeCheckSite(){
        return R.ok().add(basDevpService.getAvailableOutSite(107));
    }
    @RequestMapping("/available/empty/take/site")