自动化立体仓库 - WMS系统
qw
zc
9 天以前 035ecbe3a3540011f29a8f2287aead232749aaad
src/main/java/com/zy/asrs/task/WorkMastScheduler.java
@@ -65,23 +65,25 @@
    @Scheduled(cron = "0/3 * * * * ? ") //入库任务下发
    private void ShuttleInTaskSend() {
        List<WrkMast> wrkMasts1 = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                .in("io_type", 101, 110, 103, 104, 107)
                .eq("wrk_sts", 105).eq("crn_no", 7));
        if (!Cools.isEmpty(wrkMasts1)) {
        List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                .eq("wrk_sts", 2).in("io_type", 1, 10, 53, 54, 57).eq("crn_no", 7));
        if (Cools.isEmpty(wrkMasts)) {
            return;
        }
        List<WrkMast> wrkMasts = wrkMastService.selectToShuttleTask();
        if (wrkMasts.isEmpty()) {
            return;
        }
        try {
            for (WrkMast wrkMast : wrkMasts) {
                LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", wrkMast.getLocNo()));
                if (locMast == null) {
                    throw new CoolException("下发四向车wcs任务失败");
                }
                String loc = (locMast.getRow1() - 4) + "-" + locMast.getBay1() + "-" + locMast.getLev1();
                String loc;
                if ((locMast.getRow1() - 4) >= 10) {
                    loc = (locMast.getRow1() - 4) + locMast.getLocNo().substring(2);
                } else {
                    loc = "0" + (locMast.getRow1() - 4) + locMast.getLocNo().substring(2);
                }
                //String loc = (locMast.getRow1() - 4) + "-" + locMast.getBay1() + "-" + locMast.getLev1();
                ShuttleTask param = new ShuttleTask();
                param.setTaskNo(wrkMast.getWrkNo().toString());
                param.setLocNo(loc);
@@ -112,22 +114,29 @@
    @Scheduled(cron = "0/3 * * * * ? ") //出库库任务下发
    private void ShuttleOutTaskSend() {
        List<WrkMast> wrkMasts1 = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                .in("io_type", 1, 10, 53, 54, 57).eq("crn_no", 7));
        if (!Cools.isEmpty(wrkMasts1)) {
        List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                .in("io_type", 101, 110, 103, 104, 107)
                .eq("wrk_sts", 11).eq("crn_no", 7));
        if (Cools.isEmpty(wrkMasts)) {
            return;
        }
        List<WrkMast> wrkMasts = wrkMastService.selectToShuttleOutTask();
        if (wrkMasts.isEmpty()) {
            return;
        }
//        List<WrkMast> wrkMasts = wrkMastService.selectToShuttleOutTask();
//        if (wrkMasts.isEmpty()) {
//            return;
//        }
        try {
            for (WrkMast wrkMast : wrkMasts) {
                LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", wrkMast.getSourceLocNo()));
                if (locMast == null) {
                    throw new CoolException("下发四向车wcs任务失败");
                }
                String loc = (locMast.getRow1() - 4) + "-" + locMast.getBay1() + "-" + locMast.getLev1();
                String loc;
                if ((locMast.getRow1() - 4) >= 10) {
                    loc = (locMast.getRow1() - 4) + locMast.getLocNo().substring(2);
                } else {
                    loc = "0" + (locMast.getRow1() - 4) + locMast.getLocNo().substring(2);
                }
                //String loc = (locMast.getRow1() - 4) + "-" + locMast.getBay1() + "-" + locMast.getLev1();
                ShuttleOutTask param = new ShuttleOutTask();
                param.setTaskNo(wrkMast.getWrkNo().toString());
                param.setSourceLocNo(loc);