| | |
| | | } |
| | | |
| | | public void submitStationEnableInTasks(MainProcessLane lane, long minIntervalMs) { |
| | | mainProcessTaskSubmitter.submitSerialTask( |
| | | MainProcessLane.STATION_SCAN, |
| | | "submitStationEnableInTasks", |
| | | minIntervalMs, |
| | | new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | submitStationEnableInTasksInternal(lane, minIntervalMs); |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | |
| | | private void submitStationEnableInTasksInternal(MainProcessLane lane, long minIntervalMs) { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>()); |
| | | for (final BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | |
| | | } |
| | | |
| | | public void submitDualCrnStationOutTasks(MainProcessLane lane, long minIntervalMs) { |
| | | mainProcessTaskSubmitter.submitSerialTask( |
| | | MainProcessLane.STATION_SCAN, |
| | | "submitDualCrnStationOutTasks", |
| | | minIntervalMs, |
| | | new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | submitDualCrnStationOutTasksInternal(lane, minIntervalMs); |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | |
| | | private void submitDualCrnStationOutTasksInternal(MainProcessLane lane, long minIntervalMs) { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | .eq("wrk_sts", WrkStsType.OUTBOUND_RUN_COMPLETE.sts) |
| | | .isNotNull("dual_crn_no") |
| | |
| | | } |
| | | |
| | | public void submitStationOutExecuteFinishTasks(MainProcessLane lane, long minIntervalMs) { |
| | | mainProcessTaskSubmitter.submitSerialTask( |
| | | MainProcessLane.STATION_SCAN, |
| | | "submitStationOutExecuteFinishTasks", |
| | | minIntervalMs, |
| | | new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | submitStationOutExecuteFinishTasksInternal(lane, minIntervalMs); |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | |
| | | private void submitStationOutExecuteFinishTasksInternal(MainProcessLane lane, long minIntervalMs) { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.STATION_RUN.sts)); |
| | | for (final WrkMast wrkMast : wrkMasts) { |
| | | Integer laneKey = wrkMast == null ? null : wrkMast.getStaNo(); |
| | |
| | | } |
| | | |
| | | public void submitCheckTaskToCompleteTasks(MainProcessLane lane, long minIntervalMs) { |
| | | mainProcessTaskSubmitter.submitSerialTask( |
| | | MainProcessLane.STATION_SCAN, |
| | | "submitCheckTaskToCompleteTasks", |
| | | minIntervalMs, |
| | | new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | submitCheckTaskToCompleteTasksInternal(lane, minIntervalMs); |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | |
| | | private void submitCheckTaskToCompleteTasksInternal(MainProcessLane lane, long minIntervalMs) { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.STATION_RUN_COMPLETE.sts)); |
| | | for (final WrkMast wrkMast : wrkMasts) { |
| | | Integer laneKey = wrkMast == null ? null : wrkMast.getStaNo(); |
| | |
| | | } |
| | | |
| | | public void submitCheckStationRunBlockTasks(MainProcessLane lane, long minIntervalMs) { |
| | | mainProcessTaskSubmitter.submitSerialTask( |
| | | MainProcessLane.STATION_SCAN, |
| | | "submitCheckStationRunBlockTasks", |
| | | minIntervalMs, |
| | | new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | submitCheckStationRunBlockTasksInternal(lane, minIntervalMs); |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | |
| | | private void submitCheckStationRunBlockTasksInternal(MainProcessLane lane, long minIntervalMs) { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>()); |
| | | for (final BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getDevpNo()); |
| | |
| | | } |
| | | |
| | | //执行输送站点入库任务 |
| | | public synchronized void stationInExecute() { |
| | | public void stationInExecute() { |
| | | try { |
| | | DispatchLimitConfig limitConfig = getDispatchLimitConfig(); |
| | | int[] currentStationTaskCountRef = new int[]{countCurrentStationTask()}; |
| | |
| | | && stationProtocol.getTaskNo() > 0 |
| | | ) { |
| | | //检测任务是否生成 |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("barcode", stationProtocol.getBarcode())); |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>() |
| | | .eq("barcode", stationProtocol.getBarcode()) |
| | | .eq("io_type", WrkIoType.IN.id) |
| | | ); |
| | | if (wrkMast == null) { |
| | | return false; |
| | | } |
| | |
| | | } |
| | | |
| | | //执行堆垛机输送站点出库任务 |
| | | public synchronized void crnStationOutExecute() { |
| | | public void crnStationOutExecute() { |
| | | try { |
| | | DispatchLimitConfig limitConfig = getDispatchLimitConfig(); |
| | | int[] currentStationTaskCountRef = new int[]{countCurrentStationTask()}; |
| | |
| | | } |
| | | |
| | | //执行双工位堆垛机输送站点出库任务 |
| | | public synchronized void dualCrnStationOutExecute() { |
| | | public void dualCrnStationOutExecute() { |
| | | try { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | .eq("wrk_sts", WrkStsType.OUTBOUND_RUN_COMPLETE.sts) |
| | |
| | | } |
| | | |
| | | //检测输送站点出库任务执行完成 |
| | | public synchronized void stationOutExecuteFinish() { |
| | | public void stationOutExecuteFinish() { |
| | | try { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.STATION_RUN.sts)); |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | |
| | | } |
| | | |
| | | // 检测任务转完成 |
| | | public synchronized void checkTaskToComplete() { |
| | | public void checkTaskToComplete() { |
| | | try { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", WrkStsType.STATION_RUN_COMPLETE.sts)); |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | |
| | | } |
| | | |
| | | //检测输送站点是否运行堵塞 |
| | | public synchronized void checkStationRunBlock() { |
| | | public void checkStationRunBlock() { |
| | | try { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | |
| | | } |
| | | |
| | | //获取输送线任务数量 |
| | | public synchronized int getCurrentStationTaskCount() { |
| | | public int getCurrentStationTaskCount() { |
| | | return countCurrentStationTask(); |
| | | } |
| | | |
| | | // 检测出库排序 |
| | | public synchronized void checkStationOutOrder() { |
| | | public void checkStationOutOrder() { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getId()); |
| | |
| | | } |
| | | |
| | | // 监控绕圈站点 |
| | | public synchronized void watchCircleStation() { |
| | | public void watchCircleStation() { |
| | | List<BasDevp> basDevps = basDevpService.selectList(new EntityWrapper<BasDevp>()); |
| | | for (BasDevp basDevp : basDevps) { |
| | | StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basDevp.getId()); |