|
@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.ruoyi.common.exception.ServiceException; |
|
|
import com.ruoyi.common.exception.ServiceException; |
|
|
|
|
|
import com.zc.business.domain.DcGantryMetricsStatisticsData; |
|
|
import com.zc.business.domain.DcGantryStatisticsData; |
|
|
import com.zc.business.domain.DcGantryStatisticsData; |
|
|
import com.zc.business.domain.OdsTollEtctuData; |
|
|
import com.zc.business.domain.OdsTollEtctuData; |
|
|
import com.zc.business.enums.TrafficDataPeriodTypeEnum; |
|
|
import com.zc.business.enums.TrafficDataPeriodTypeEnum; |
|
@ -144,7 +145,13 @@ public class DcGantryStatisticsDataImpl extends ServiceImpl<DcGantryStatisticsDa |
|
|
if (dcGantryStatisticsDataList == null || dcGantryStatisticsDataList.isEmpty()) { |
|
|
if (dcGantryStatisticsDataList == null || dcGantryStatisticsDataList.isEmpty()) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
dcGantryStatisticsDataMapper.insertOrUpdateBatch(dcGantryStatisticsDataList); |
|
|
//防止数据量太大,每次一万条分批执行
|
|
|
|
|
|
for (int i = 0; i < dcGantryStatisticsDataList.size(); i+=10000) { |
|
|
|
|
|
int end = Math.min(i + 10000, dcGantryStatisticsDataList.size()); |
|
|
|
|
|
|
|
|
|
|
|
List<DcGantryStatisticsData> batchList = dcGantryStatisticsDataList.subList(i, end); |
|
|
|
|
|
dcGantryStatisticsDataMapper.insertOrUpdateBatch(batchList); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|