| | |
| | | continue; |
| | | } |
| | | |
| | | } else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("D")) { |
| | | } else if (shallowLoc.getLocSts().equals("F") || shallowLoc.getLocSts().equals("M")|| shallowLoc.getLocSts().equals("Z")) { |
| | | News.warnNoLog(""+mark+" - 1"+" - 12"+" - // F、D 库位状态={}",shallowLoc.getLocSts()); |
| | | // 此标记避免多次执行移库任务 |
| | | if (Cools.isEmpty(wrkMast.getUpdMk()) || "N".equals(wrkMast.getUpdMk())) { |
| | |
| | | Date now = new Date(); |
| | | Date modiTime = basCrnp.getModiTime(); |
| | | long diffInMillis = now.getTime()-modiTime.getTime(); |
| | | if(diffInMillis < 3 * 60 * 1000) { |
| | | if(diffInMillis < 10 * 1000) { // 空闲小于10秒则跳过 |
| | | continue; |
| | | } else { // 有入库任务或大于2分钟,回原点 |
| | | int count = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 1).eq("crn_no", crn.getId()).in("wrk_sts", 2, 9, 10)); |
| | | if(count == 0 && diffInMillis < 2 * 60 * 1000) { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | // 有吊车入库或吊车出库任务 |
| | |
| | | if (null != loc) {//对应深库位非在库状态,不能移库 |
| | | String deepLoc = Utils.getDeepLoc(slaveProperties, loc.getLocNo()); |
| | | LocMast deepLoc1 = locMastService.selectById(deepLoc); |
| | | if (!deepLoc1.getLocSts().equals("F") && !deepLoc1.getLocSts().equals("D")) { |
| | | if (!deepLoc1.getLocSts().equals("F") && !deepLoc1.getLocSts().equals("M")&& !deepLoc1.getLocSts().equals("Z")) { |
| | | loc = null; |
| | | } |
| | | } |
| | |
| | | wrkMast.setFullPlt(shallowLoc.getLocSts().equals("F") ? "Y" : "N"); // 满板 |
| | | wrkMast.setPicking("N"); // 拣料 |
| | | wrkMast.setExitMk("N"); // 退出 |
| | | wrkMast.setEmptyMk(shallowLoc.getLocSts().equals("D") ? "Y" : "N"); // 空板 |
| | | wrkMast.setEmptyMk(shallowLoc.getLocSts().equals("M") ? "M" : shallowLoc.getLocSts().equals("Z") ? "Z" : "N"); // 空板 |
| | | wrkMast.setBarcode(shallowLoc.getBarcode()); // 托盘码 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setAppeTime(new Date()); |
| | |
| | | } |
| | | } |
| | | // 修改源库位状态 |
| | | if (shallowLoc.getLocSts().equals("D") || shallowLoc.getLocSts().equals("F")) { |
| | | if (shallowLoc.getLocSts().equals("D") || shallowLoc.getLocSts().equals("M") || shallowLoc.getLocSts().equals("Z")) { |
| | | shallowLoc.setLocSts("R"); // R.出库预约 |
| | | shallowLoc.setModiTime(new Date()); |
| | | if (!locMastService.updateById(shallowLoc)) { |
| | |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && (staProtocol.isInEnable() || staProtocol.isOutEnable() && site == 1090) && staProtocol.getWorkNo() != 0 && staProtocol.getWorkNo() < 9000) { |
| | | if (staProtocol.getWorkNo() == 1034 && !staProtocol.isHigh()) { // 1034空母拖回流任务需要高信号 |
| | | return; |
| | | if (staProtocol.getSiteId() == 1034 && !staProtocol.isHigh()) { // 1034空母拖回流任务需要高信号 |
| | | continue; |
| | | } |
| | | // 查询工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectByWrkNo(staProtocol.getWorkNo()); |