| | |
| | | import constant.ApiConstants; |
| | | import constant.CheckConstants; |
| | | import constant.CheckSnapCountConstants; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | * 更新或新增 |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | | public class CarSnapshotDelayCalculation extends IndexCalculationServe implements CalculationStrategy<SnapshotDelayMonitorResult> { |
| | | @Autowired |
| | | private CheckIndexCarMapper checkIndexCarMapper; |
| | |
| | | @Override |
| | | public void calculate(List<SnapshotDelayMonitorResult> list) { |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | log.info("数据为空"); |
| | | return; |
| | | } |
| | | |
| | |
| | | param.put("delayCount2", stats.delayCount2); |
| | | param.put("delayCount3", stats.delayCount3); |
| | | BigDecimal index = snapshopDelay(param); |
| | | checkIndexCar.setSiteOnline(index); |
| | | checkIndexCar.setVehicleUploadTimeliness(index); |
| | | return checkIndexCar; |
| | | } |
| | | } |