| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.mapper.*; |
| | |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.*; |
| | | import com.zy.common.model.enums.NavigationMapType; |
| | | import com.zy.common.model.enums.WrkChargeType; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.service.erp.ErpService; |
| | | import com.zy.common.utils.*; |
| | | import com.zy.core.CrnThread; |
| | | import com.zy.core.DevpThread; |
| | | import com.zy.core.News; |
| | | import com.zy.core.cache.MessageQueue; |
| | |
| | | //判断小车是否到达输送站点库位 |
| | | if (!shuttleProtocol.getCurrentLocNo().equals(basDevp.getLocNo())) { |
| | | //小车不在输送站点位置 |
| | | dispatchShuttle(wrkMast.getWrkNo(), basDevp.getLocNo());//调度小车到货物所在输送站点进行取货 |
| | | dispatchShuttle(wrkMast.getWrkNo(), basDevp.getLocNo(), wrkMast.getShuttleNo());//调度小车到货物所在输送站点进行取货 |
| | | return false; |
| | | } |
| | | |
| | |
| | | //判断小车是否到达货物库位 |
| | | if (!shuttleProtocol.getCurrentLocNo().equals(wrkMast.getSourceLocNo())) { |
| | | //小车不在输送站点位置 |
| | | dispatchShuttle(wrkMast.getWrkNo(), wrkMast.getSourceLocNo());//调度小车到货物所在输送站点进行取货 |
| | | dispatchShuttle(wrkMast.getWrkNo(), wrkMast.getSourceLocNo(), wrkMast.getShuttleNo());//调度小车到货物所在输送站点进行取货 |
| | | return false; |
| | | } |
| | | |
| | |
| | | public synchronized void shuttleFinished() { |
| | | for (ShuttleSlave shuttle : slaveProperties.getShuttle()) { |
| | | //获取四向穿梭车信息 |
| | | ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttle.getId()); |
| | | ShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol(); |
| | | NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttle.getId()); |
| | | NyShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol(); |
| | | if (shuttleProtocol == null) { |
| | | continue; |
| | | } |
| | |
| | | //四向穿梭车状态为等待确认、小车处于空闲状态 |
| | | if (shuttleProtocol.getProtocolStatus() == ShuttleProtocolStatusType.WAITING.id //任务完成等待确认 |
| | | && shuttleProtocol.getTaskNo() != 0 |
| | | && shuttleProtocol.getBusyStatus() == 0 |
| | | && shuttleProtocol.getFree() == ShuttleStatusType.IDLE.id |
| | | ) { |
| | | //将任务档标记为完成 |
| | | WrkMast wrkMast = wrkMastMapper.selectByWorkNo(shuttleProtocol.getTaskNo().intValue()); |
| | |
| | | case 5://5.小车搬运中 ==> 9.入库完成 |
| | | wrkMast.setWrkSts(9L); |
| | | //任务号清零 |
| | | shuttleProtocol.setTaskNo((short) 0); |
| | | shuttleProtocol.setTaskNo(0); |
| | | break; |
| | | case 22://22.小车搬运中 ==> 23.小车搬运完成 |
| | | wrkMast.setWrkSts(23L); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 调度车辆-调度指定穿梭车 |
| | | */ |
| | | public void dispatchShuttle(Integer wrkNo, String locNo, Integer shuttleNo) { |
| | | shuttleMoveGenerate(wrkNo, locNo, shuttleNo); |
| | | } |
| | | |
| | | /** |
| | | * 调度车辆 |
| | | */ |
| | | public void dispatchShuttle(Integer wrkNo, String locNo) { |