|
|
@ -232,9 +232,12 @@ public class StatsUserServiceImpl implements StatsUserService { |
|
|
|
|
|
|
|
//3.分批处理上传数据
|
|
|
|
List<List<GmUploadDataFormDTO.DataList>> partition = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED); |
|
|
|
partition.forEach(p -> { |
|
|
|
for (int i = 0; i < partition.size(); i++) { |
|
|
|
List<GmUploadDataFormDTO.DataList> p = partition.get(i); |
|
|
|
//4.封装数据并执行
|
|
|
|
p.forEach(m -> { |
|
|
|
Iterator<GmUploadDataFormDTO.DataList> iterator = p.iterator(); |
|
|
|
while (iterator.hasNext()) { |
|
|
|
GmUploadDataFormDTO.DataList m = iterator.next(); |
|
|
|
AtomicReference<Boolean> bl = new AtomicReference<>(false); |
|
|
|
StringBuffer pid = new StringBuffer(""); |
|
|
|
StringBuffer pids = new StringBuffer(""); |
|
|
@ -252,13 +255,10 @@ public class StatsUserServiceImpl implements StatsUserService { |
|
|
|
m.setPids(pids.toString()); |
|
|
|
} else { |
|
|
|
log.warn(String.format("网格员数据分析上报,数据错误,根据agencyId未查询到组织信息,客户Id->%s,组织Id->%s", m.getCustomerId(), m.getAgencyId())); |
|
|
|
iterator.remove(); |
|
|
|
} |
|
|
|
}); |
|
|
|
//批量新增或修改数据
|
|
|
|
if (!CollectionUtils.isEmpty(p)) { |
|
|
|
dataStatsDao.saveOrUpGmUploadData(p); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|