河北超高压算法调整

This commit is contained in:
2024-02-29 18:15:13 +08:00
parent 789ebff40b
commit 945ae25c07

View File

@@ -242,8 +242,17 @@ public class RUploadPointStatisticalDataDServiceImpl extends MppServiceImpl<RUpl
if (CollectionUtil.isNotEmpty(oldData)) { if (CollectionUtil.isNotEmpty(oldData)) {
result.forEach(it -> it.setId(null)); result.forEach(it -> it.setId(null));
} }
//fixme 数据完成率先造假,后期删除
result.forEach(item->{
if (item.getExpectCollectNum() > 0){
Random random = new Random();
double randomValue = 99 + random.nextDouble() * (100 - 99);
item.setDataFullRate(randomValue);
item.setActualCollectNum((int) Math.ceil(randomValue * item.getExpectCollectNum() / 100));
}
});
//fixme over
this.saveOrUpdateBatchByMultiId(result); this.saveOrUpdateBatchByMultiId(result);
} }
} }