自动化立体仓库 - WMS系统
#
18516761980
2021-08-23 27042edaafc246ddd30b2453a2e9d11b7687800f
src/main/java/com/zy/asrs/controller/WorkController.java
@@ -10,10 +10,7 @@
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;
@@ -44,23 +41,39 @@
        return R.ok().add(basDevpService.getAvailableEmptyInSite());
    }
    @RequestMapping("/available/take/site")
    @RequestMapping("/available/take/site/{type}")
    @ManagerAuth(memo = "获取出库站点")
    public R availableTakeSite(){
    public R availableTakeSite(@PathVariable("type") Integer type){
        List<Map<String, Object>> result = new ArrayList<>();
        List<Integer> outSite = basDevpService.getAvailableOutSite(101);
        for (Integer siteId : outSite) {
            Map<String, Object> map = new HashMap<>();
            map.put("siteId", siteId);
            map.put("desc", siteId + "(全板出库口)");
            result.add(map);
            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) {
            Map<String, Object> map = new HashMap<>();
            map.put("siteId", siteId);
            map.put("desc", siteId + "(拣料出库口)");
            result.add(map);
            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);
    }
@@ -68,7 +81,7 @@
    @RequestMapping("/available/take/check/site")
    @ManagerAuth(memo = "获取盘点出库站点")
    public R availableTakeCheckSite(){
        return R.ok().add(basDevpService.getAvailableOutSite(103));
        return R.ok().add(basDevpService.getAvailableOutSite(107));
    }
    @RequestMapping("/available/empty/take/site")