| | |
| | | @Autowired |
| | | private MainProcessTaskSubmitter mainProcessTaskSubmitter; |
| | | |
| | | public synchronized void crnIoExecute() { |
| | | public void crnIoExecute() { |
| | | Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key); |
| | | if (systemConfigMapObj != null) { |
| | | HashMap<String, String> systemConfigMap = (HashMap<String, String>) systemConfigMapObj; |
| | |
| | | } |
| | | |
| | | //入出库 ===>> 堆垛机入出库作业下发 |
| | | public synchronized void crnIoExecuteNormal() { |
| | | public void crnIoExecuteNormal() { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | crnIoExecuteNormal(basCrnp); |
| | |
| | | } |
| | | } |
| | | |
| | | private synchronized boolean crnExecuteIn(BasCrnp basCrnp, CrnThread crnThread) { |
| | | private boolean crnExecuteIn(BasCrnp basCrnp, CrnThread crnThread) { |
| | | CrnProtocol crnProtocol = crnThread.getStatus(); |
| | | if(crnProtocol == null){ |
| | | return false; |
| | |
| | | return false; |
| | | } |
| | | |
| | | private synchronized boolean crnExecuteOut(BasCrnp basCrnp, CrnThread crnThread) { |
| | | private boolean crnExecuteOut(BasCrnp basCrnp, CrnThread crnThread) { |
| | | CrnProtocol crnProtocol = crnThread.getStatus(); |
| | | if(crnProtocol == null){ |
| | | return false; |
| | |
| | | return false; |
| | | } |
| | | |
| | | private synchronized boolean crnExecuteInPlanner(BasCrnp basCrnp, CrnThread crnThread, WrkMast wrkMast) { |
| | | private boolean crnExecuteInPlanner(BasCrnp basCrnp, CrnThread crnThread, WrkMast wrkMast) { |
| | | CrnProtocol crnProtocol = crnThread.getStatus(); |
| | | if (crnProtocol == null) { |
| | | return false; |
| | |
| | | return false; |
| | | } |
| | | |
| | | private synchronized boolean crnExecuteOutPlanner(BasCrnp basCrnp, CrnThread crnThread, WrkMast wrkMast) { |
| | | private boolean crnExecuteOutPlanner(BasCrnp basCrnp, CrnThread crnThread, WrkMast wrkMast) { |
| | | CrnProtocol crnProtocol = crnThread.getStatus(); |
| | | if (crnProtocol == null) { |
| | | return false; |
| | |
| | | return false; |
| | | } |
| | | |
| | | private synchronized boolean crnExecuteLocTransfer(BasCrnp basCrnp, CrnThread crnThread) { |
| | | private boolean crnExecuteLocTransfer(BasCrnp basCrnp, CrnThread crnThread) { |
| | | CrnProtocol crnProtocol = crnThread.getStatus(); |
| | | if(crnProtocol == null){ |
| | | return false; |
| | |
| | | } |
| | | |
| | | //堆垛机任务执行完成 |
| | | public synchronized void crnIoExecuteFinish() { |
| | | public void crnIoExecuteFinish() { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | crnIoExecuteFinish(basCrnp); |
| | |
| | | } |
| | | } |
| | | |
| | | public synchronized void plannerExecute() { |
| | | public void plannerExecute() { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | plannerExecute(basCrnp); |
| | |
| | | } |
| | | } |
| | | |
| | | private synchronized boolean crnExecuteMovePlanner(BasCrnp basCrnp, CrnThread crnThread, WrkMast wrkMast) { |
| | | private boolean crnExecuteMovePlanner(BasCrnp basCrnp, CrnThread crnThread, WrkMast wrkMast) { |
| | | CrnProtocol crnProtocol = crnThread.getStatus(); |
| | | if (crnProtocol == null) { |
| | | return false; |
| | |
| | | } |
| | | |
| | | public void submitCrnIoTasks(MainProcessLane lane, long minIntervalMs) { |
| | | mainProcessTaskSubmitter.submitSerialTask( |
| | | MainProcessLane.CRN_SCAN, |
| | | "submitCrnIoTasks", |
| | | minIntervalMs, |
| | | () -> submitCrnIoTasksInternal(lane, minIntervalMs) |
| | | ); |
| | | } |
| | | |
| | | private void submitCrnIoTasksInternal(MainProcessLane lane, long minIntervalMs) { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | if (basCrnp == null || basCrnp.getCrnNo() == null) { |
| | |
| | | } |
| | | |
| | | public void submitCrnIoExecuteFinishTasks(MainProcessLane lane, long minIntervalMs) { |
| | | mainProcessTaskSubmitter.submitSerialTask( |
| | | MainProcessLane.CRN_SCAN, |
| | | "submitCrnIoExecuteFinishTasks", |
| | | minIntervalMs, |
| | | () -> submitCrnIoExecuteFinishTasksInternal(lane, minIntervalMs) |
| | | ); |
| | | } |
| | | |
| | | private void submitCrnIoExecuteFinishTasksInternal(MainProcessLane lane, long minIntervalMs) { |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | for (BasCrnp basCrnp : basCrnps) { |
| | | if (basCrnp == null || basCrnp.getCrnNo() == null) { |
| | |
| | | } |
| | | |
| | | //检测浅库位状态 |
| | | public synchronized boolean checkShallowLocStatus(String locNo, Integer taskNo) { |
| | | public boolean checkShallowLocStatus(String locNo, Integer taskNo) { |
| | | String checkDeepLocOutTaskBlockReport = "Y"; |
| | | Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key); |
| | | if (systemConfigMapObj != null) { |