| | |
| | | } |
| | | @Override |
| | | public List<XpStation> findList(PageInfo<XpStation> pageInfo, XpStationQuery query) { |
| | | Integer bj = 0; |
| | | if(StringUtils.isNotEmpty(query.getStationPointNum())){ |
| | | if(query.getStationPointNum().contains(",")){ |
| | | throw new ServiceException("点位数量只能单选"); |
| | | } |
| | | if(query.getStationPointNum().contains("gt")){ |
| | | query.setStationPointNum(query.getStationPointNum().replace("gt", " > ")); |
| | | }else{ |
| | | query.setStationPointNum(" = " + query.getStationPointNum()); |
| | | query.setStationPointNum(query.getStationPointNum().replace("gt", "")); |
| | | bj = 1; |
| | | } |
| | | } |
| | | List<XpStation> list = null; |
| | | if(pageInfo ==null){ |
| | | list = this.baseMapper.pageList(query); |
| | | list = this.baseMapper.pageList(query, bj); |
| | | }else{ |
| | | list = this.baseMapper.pageList(pageInfo, query); |
| | | list = this.baseMapper.pageList(pageInfo, query, bj); |
| | | } |
| | | if(CollUtil.isNotEmpty(list)){ |
| | | LocalTime localTime = LocalTime.now(); |
| | |
| | | |
| | | int operatingPointCount = 0; // 运营中点位数 |
| | | for (XpPoint xpPoint : stationPoints) { |
| | | if(null != xpPoint.getStationId()){ |
| | | XpStation xpStation1 = this.getById(xpPoint.getStationId()); |
| | | xpPoint.setStationOperationType(xpStation1.getOperationType()); |
| | | xpPoint.setStationEffectivePeriod(xpStation1.getEffectivePeriod()); |
| | | xpPoint.setStationEffectivePeriod(xpStation1.getEffectivePeriod()); |
| | | xpPoint.setStationEffectiveTimePeriod(xpStation1.getEffectiveTimePeriod()); |
| | | xpPoint.setFenceOperationStrategy(xpStation1.getFenceOperationStrategy()); |
| | | } |
| | | boolean pointOperation = bootCommonService.getPointOperation(localTime, xpPoint); |
| | | if (pointOperation) { |
| | | operatingPointCount++; |