自动化立体仓库 - WMS系统
1
2 天以前 8d75c94e04af3d56c0de713e3120d14dfef73083
src/main/java/com/zy/asrs/task/WrkMastStaInItScheduler.java
@@ -13,7 +13,9 @@
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * Created by Monkey D. Luffy on 2023.07.25
@@ -51,6 +53,21 @@
        add(2009);add(2007);add(2015);add(2013);add(2021);add(2019);
        add(2027);add(2025);
    }};
    public static final Map<Integer, Integer> siteOutMap = new HashMap<Integer, Integer>() {{
        put(1007, 1007);put(1010, 1010);put(1021, 1021);put(1024, 1024);put(1031, 1031);
        put(1005, 1007);put(1008, 1010);put(1019, 1021);put(1022, 1024);put(1029, 1031);
        put(2001, 2003);put(2007, 2009);put(2013, 2015);put(2019, 2021);put(2025, 2027);
        put(2003, 2003);put(2009, 2009);put(2015, 2015);put(2021, 2021);put(2027, 2027);
    }};
    public static final Map<Integer, Integer> siteInMap = new HashMap<Integer, Integer>() {{
        put(1043, 1042);put(1042, 1042);put(1105, 1105);put(1104, 1105);put(1036, 1036);put(1038, 1038);
    }};
    // 异常出库口
    public static final List<Integer> STA_WORK_Exception = new ArrayList<Integer>() {{
        add(1042);add(1105);
    }};
//    public static final List<Integer> STA_WORK_CU_CAR_TWO = new ArrayList<Integer>() {{
//        add(120);add(121);
@@ -71,6 +88,7 @@
    private void execute(){
        for(Integer staNo : STA_WORK_IN){
            BasDevp basDevp = basDevpService.selectById(staNo);
            basDevp.setDevNo(siteInMap.get(basDevp.getDevNo()));
            if (basDevp.getWrkNo()!=0 && basDevp.getLoading().equals("Y") && basDevp.getAutoing().equals("Y")){
                WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", basDevp.getWrkNo()));
                if(Cools.isEmpty(wrkMast)){
@@ -90,6 +108,7 @@
        for(Integer staNo : STA_WORK_OUT){
            BasDevp basDevp = basDevpService.selectById(staNo);
            basDevp.setDevNo(siteOutMap.get(basDevp.getDevNo()));
            if (basDevp.getWrkNo()!=0 && basDevp.getLoading().equals("Y") && basDevp.getAutoing().equals("Y")){
                WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", basDevp.getWrkNo()));
                if (Cools.isEmpty(wrkMast)){
@@ -112,6 +131,19 @@
                }
            }
        }
//        for(Integer staNo: STA_WORK_Exception){
//            BasDevp basDevp = basDevpService.selectById(staNo);
//            basDevp.setDevNo(siteOutMap.get(basDevp.getDevNo()));
//            if (basDevp.getWrkNo()!=0 && basDevp.getLoading().equals("Y") && basDevp.getAutoing().equals("Y")){
//                ReturnT<String> result = wrkMastStaInItHandler.start(wrkMast,basDevp,22);//出库
//                if (result.getCode()==200) {
//                    continue;
//                } else {
//                    System.out.println(staNo+"失败3!");
//                }
//
//            }
//        }
    }
//    @Scheduled(cron = "0/3 * * * * ? ")