自动化立体仓库 - WMS系统
13
zhang
1 天以前 1c0dbad152362ac704a27ecfc5b5d08247385d87
src/main/java/com/zy/asrs/controller/WorkController.java
@@ -13,7 +13,6 @@
import com.zy.asrs.service.BasDevpService;
import com.zy.asrs.service.StaDescService;
import com.zy.asrs.service.WorkService;
import com.zy.asrs.utils.Utils;
import com.zy.common.model.StartupDto;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
@@ -69,7 +68,7 @@
    public R availableTakeSite() {
        Set<Map<String, Object>> result = new HashSet<>();
        EntityWrapper<StaDesc> wrapper = new EntityWrapper<>();
        wrapper.eq("type_no", 101).orderBy("stn_no", true);
        wrapper.eq("type_no", 101).eq("crn_no", 1).orderBy("stn_no", true);
        List<StaDesc> staDescs = staDescService.selectList(wrapper);
        for (StaDesc site : staDescs) {
            Map<String, Object> map = new HashMap<>();
@@ -79,7 +78,7 @@
        }
        EntityWrapper<StaDesc> wrapper2 = new EntityWrapper<>();
        wrapper2.eq("type_no", 103).orderBy("stn_no", true);
        wrapper2.eq("type_no", 103).eq("crn_no", 1).orderBy("stn_no", true);
        List<StaDesc> staDescs2 = staDescService.selectList(wrapper2);
        for (StaDesc site : staDescs2) {
            Map<String, Object> map = new HashMap<>();
@@ -96,6 +95,9 @@
        List<Map<String, Object>> result = new ArrayList<>();
        List<Integer> outSite = basDevpService.getCrnAvailableOutSite(101);
        for (Integer siteId : outSite) {
            if (siteId < 1100) {
                continue;
            }
            Map<String, Object> map = new HashMap<>();
            map.put("siteId", siteId);
            map.put("desc", siteId + "(全板出库口)");
@@ -103,6 +105,9 @@
        }
        List<Integer> pickOutSite = basDevpService.getCrnAvailableOutSite(103);
        for (Integer siteId : pickOutSite) {
            if (siteId < 1100) {
                continue;
            }
            Map<String, Object> map = new HashMap<>();
            map.put("siteId", siteId);
            map.put("desc", siteId + "(拣料出库口)");
@@ -114,7 +119,14 @@
    @RequestMapping("/available/take/check/site")
    @ManagerAuth()
    public R availableTakeCheckSite() {
        return R.ok().add(basDevpService.getAvailableOutSite(107));
        List<Integer> availableOutSite = basDevpService.getAvailableOutSite(107);
        List<Integer> data = new ArrayList<>();
        for (Integer x : availableOutSite) {
            if (x < 1100) {
                data.add(x);
            }
        }
        return R.ok().add(data);
    }
    @RequestMapping("/available/take/merge/site")
@@ -129,7 +141,7 @@
        EntityWrapper<StaDesc> staDescEntityWrapper = new EntityWrapper<>();
        staDescEntityWrapper.eq("type_no", 107);
        staDescEntityWrapper.setSqlSelect("DISTINCT stn_no as stnNo");
        staDescEntityWrapper.in("crn_no", 1, 2, 3, 4, 5, 6, 7);
        staDescEntityWrapper.in("crn_no", 1);
        return R.ok().add(staDescService.selectList(staDescEntityWrapper));
    }
@@ -173,9 +185,12 @@
//        RoleUtils.addRoleWrapperByCrn(getUserId(),wrapper);
        List<StaDesc> staDescs = staDescService.selectList(wrapper);
        for (StaDesc staDesc : staDescs) {
            if (staDesc.getCrnNo() == 7) {
                continue;
            }
            Map<String, Object> map = new HashMap<>();
            map.put("siteId", staDesc.getStnNo());
            map.put("desc", "[" + Utils.getStaName(staDesc.getStnNo()) + "]");
            map.put("desc", "[" + staDesc.getStnNo() + "]");
            result.add(map);
        }
        return R.ok().add(result);