| | |
| | | import com.zy.core.thread.RgvThread; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | private BasCircularShuttleService basCircularShuttleService; |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | |
| | | @Value("${constant-parameters.perimeter}") |
| | | private Long perimeter; |
| | | /** |
| | | * 站点任务检测 更新小车位置信息 |
| | | */ |
| | |
| | | if (wrkMasts.isEmpty()){ |
| | | return; |
| | | } |
| | | List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<BasDevpPosition>().orderBy("plc_position",false)); |
| | | List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<BasDevpPosition>().orderBy("plc_position",true)); |
| | | if (basDevpPositions.isEmpty()){ |
| | | log.error("获取所有站点信息异常"); |
| | | return; |
| | |
| | | rgvPosition.add(rgvProtocol.getRgvPos()); |
| | | rgvPositionList.add(rgvPosition); |
| | | } |
| | | Integer rgvNo = SortTheExecutionOfTheCarUtil.LatelyAndGreaterThan(rgvPositionList, sitePosition); |
| | | |
| | | Integer rgvNo = SortTheExecutionOfTheCarUtil.LatelyAndGreaterThan(rgvPositionList, sitePosition,perimeter); |
| | | if (rgvNo == -1){ |
| | | log.info("更新小车排序信息异常={}",rgvNo); |
| | | return; |
| | | } |
| | | List<BasCircularShuttle> basCircularShuttleList = basCircularShuttleService.selectList(new EntityWrapper<BasCircularShuttle>().orderBy("rgv_id", true)); |
| | | if (basCircularShuttleList.get(0).getRgvNo().equals(rgvNo)){ |
| | | return; |
| | |
| | | if (rgvProtocol == null) { |
| | | return; |
| | | } |
| | | List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<BasDevpPosition>().orderBy("plc_position",false)); |
| | | Integer devNo = SortTheExecutionOfTheCarUtil.LatelyAndLessThan(basDevpPositions, rgvProtocol.getRgvPos()); |
| | | List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<BasDevpPosition>().orderBy("plc_position",true)); |
| | | Integer devNo = SortTheExecutionOfTheCarUtil.LatelyAndLessThan(basDevpPositions, rgvProtocol.getRgvPos(),perimeter); |
| | | BasDevpPosition[] basDevpPositionsList = SortTheExecutionOfTheCarUtil.devpNoSort(basDevpPositions, devNo); |
| | | BasDevpPosition[] basDevpPositionsListUN = SortTheExecutionOfTheCarUtil.devpNoSortUN(basDevpPositionsList); |
| | | List<List<WrkMast>> wrkMastLists = getWrkMastLists(basDevpPositionsListUN); |