| | |
| | | |
| | | @Override |
| | | public void autoPlatformCallCar(WmsService wmsService){ |
| | | log.error("定时自动分配月台 - 月台开始自动分配分配任务:{}"+DateUtil.getCurrDateTime()); |
| | | //查询当前开启的月台数据 |
| | | List<PlatformGroup> allPlatformGroup = platformGroupMapper.selectList(new QueryWrapper<PlatformGroup>().lambda().eq(PlatformGroup::getStatus,Constants.ZERO) |
| | | .eq(PlatformGroup::getIsdeleted,Constants.ZERO).eq(PlatformGroup::getAutoCall,Constants.ONE) |
| | |
| | | } |
| | | } |
| | | for (Platform platform:platforms) { |
| | | |
| | | log.error("定时自动分配月台 - 月台开始自动分配分配任务:{}"+JSONObject.toJSONString(platform)); |
| | | //月台 叫号入园数量 |
| | | Integer workingNum = platform.getWorkingNum(); |
| | | //查询当前月台是否存在月台叫号数据 如果大于等于可叫号数量 则跳过 |
| | |
| | | } |
| | | for (int i = 0; i < workingNum - workNum ; i++) { |
| | | PlatformJob platformJob = this.getAutoCallJob(platformJobList,platform,isDefaul,platformGroup); |
| | | log.error("定时自动分配月台 - 月台自动分配分配任务:{}"+JSONObject.toJSONString(platformJob)); |
| | | if(Objects.isNull(platformJob)){ |
| | | continue; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public PlatformJob getAutoCallJob(List<PlatformJob> platformJobList, Platform platform,Boolean isDefaul,PlatformGroup platformGroup){ |
| | | log.error("定时自动分配月台 - 月台自动分配任务:{}"+DateUtil.getCurrDateTime()); |
| | | if(isDefaul){ |
| | | //月台下只有一类月台 直接返回第一个任务 |
| | | return platformJobList.get(Constants.ZERO); |
| | |
| | | } |
| | | }else{ |
| | | //物流车预约的任务 直接分配 散托盘月台 |
| | | if(Constants.equalsInteger(platform.getType(),Constants.TWO)){ |
| | | if(Constants.equalsInteger(platform.getType(),Constants.ONE)){ |
| | | return platformJob; |
| | | } |
| | | } |