| | |
| | | import com.zy.asrs.mapper.*; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.LocTypeDto; |
| | | import com.zy.common.model.MatDto; |
| | | import com.zy.common.model.SearchLocParam; |
| | | import com.zy.common.model.StartupDto; |
| | | import com.zy.common.model.*; |
| | | 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.CollectionUtils; |
| | | import com.zy.common.utils.HttpHandler; |
| | | 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.SlaveConnection; |
| | | import com.zy.core.enums.*; |
| | | import com.zy.core.model.*; |
| | | import com.zy.core.model.command.CrnCommand; |
| | | import com.zy.core.model.command.LedCommand; |
| | | import com.zy.core.model.command.SteCommand; |
| | | import com.zy.core.model.command.*; |
| | | import com.zy.core.model.protocol.CrnProtocol; |
| | | import com.zy.core.model.protocol.ShuttleProtocol; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | |
| | | private OrderMapper orderMapper; |
| | | @Autowired |
| | | private OrderDetlMapper orderDetlMapper; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | /** |
| | | * 组托 |
| | |
| | | // 只有当四向穿梭车空闲 并且无任务时才继续执行 |
| | | if (shuttleProtocol.getBusyStatusType() == ShuttleStatusType.IDLE && shuttleProtocol.getTaskNo() == 0) { |
| | | //入出库逻辑 |
| | | //..... |
| | | for (WrkMast wrkSts : wrkMastMapper.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", 2))) { |
| | | //分配任务号 |
| | | shuttleProtocol.setTaskNo(wrkSts.getWrkNo().shortValue()); |
| | | //分配源库位 |
| | | shuttleProtocol.setSourceLocNo(wrkSts.getSourceLocNo()); |
| | | //分配目标库位 |
| | | shuttleProtocol.setLocNo(wrkSts.getLocNo()); |
| | | |
| | | |
| | | ShuttleAssignCommand assignCommand = new ShuttleAssignCommand(); |
| | | //四向穿梭车号 |
| | | assignCommand.setShuttleNo(shuttleProtocol.getShuttleNo()); |
| | | //任务号 |
| | | assignCommand.setTaskNo(wrkSts.getWrkNo().shortValue()); |
| | | //入出库模式 |
| | | assignCommand.setTaskMode((short) 0); |
| | | //源库位 |
| | | assignCommand.setSourceLocNo(wrkSts.getSourceLocNo()); |
| | | //目标库位 |
| | | assignCommand.setDistLocNo(wrkSts.getLocNo()); |
| | | |
| | | //下发任务 |
| | | MessageQueue.offer(SlaveType.Shuttle, assignCommand.getShuttleNo().intValue(), new Task(3, assignCommand)); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |