| | |
| | | @Autowired |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | |
| | | |
| | | // @Scheduled(fixedRate = 500) // 固定频率执行,不同步 |
| | | @Scheduled(fixedDelay = 1000) // 固定频率执行,同步 |
| | | // @Scheduled(cron = "0/1 * * * * ? ") |
| | | private void execute() { |
| | | if (!configService.getVal("TaskAssignMode", Boolean.class)) { return; } |
| | | |
| | | // this.autoRun(LocGroupConstant.FAR_LEFT_LOC_ROW_LIST, StaGroupConstant.FAR_LEFT_STA_ROW_LIST, AgvGroupConstant.FIRST_AGV_GROUP); |
| | | // this.autoRun(LocGroupConstant.LEFT_LOC_ROW_LIST, StaGroupConstant.LEFT_STA_ROW_LIST, AgvGroupConstant.SECOND_AGV_GROUP); |
| | | // this.autoRun(LocGroupConstant.MIDDLE_LOC_ROW_LIST, StaGroupConstant.MIDDLE_STA_ROW_LIST, AgvGroupConstant.THIRD_AGV_GROUP); |
| | | // this.autoRun(LocGroupConstant.RIGHT_LOC_ROW_LIST, StaGroupConstant.RIGHT_STA_ROW_LIST, AgvGroupConstant.FOURTH_AGV_GROUP); |
| | | String autoRunAreas = configService.getVal("autoRunAreas", String.class); |
| | | if (Cools.isEmpty(autoRunAreas)) { return; } |
| | | for (char c : autoRunAreas.toCharArray()) { |
| | | switch (c) { |
| | | case '1': |
| | | this.autoRun(LocGroupConstant.FAR_RIGHT_LOC_ROW_LIST, StaGroupConstant.FAR_RIGHT_STA_ROW_LIST, AgvGroupConstant.FIFTH_AGV_GROUP); |
| | | break; |
| | | case '2': |
| | | this.autoRun(LocGroupConstant.RIGHT_LOC_ROW_LIST, StaGroupConstant.RIGHT_STA_ROW_LIST, AgvGroupConstant.FOURTH_AGV_GROUP); |
| | | break; |
| | | case '3': |
| | | this.autoRun(LocGroupConstant.MIDDLE_LOC_ROW_LIST, StaGroupConstant.MIDDLE_STA_ROW_LIST, AgvGroupConstant.THIRD_AGV_GROUP); |
| | | break; |
| | | case '4': |
| | | this.autoRun(LocGroupConstant.LEFT_LOC_ROW_LIST, StaGroupConstant.LEFT_STA_ROW_LIST, AgvGroupConstant.SECOND_AGV_GROUP); |
| | | break; |
| | | case '5': |
| | | this.autoRun(LocGroupConstant.FAR_LEFT_LOC_ROW_LIST, StaGroupConstant.FAR_LEFT_STA_ROW_LIST, AgvGroupConstant.FIRST_AGV_GROUP); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void autoRun(List<Integer> locGroupList, List<String> staGroupList, List<String> agvGroupList) { |