Commit 4457030b authored by 赵啸非's avatar 赵啸非

添加材料数量统计

parent fbad186f
...@@ -46,6 +46,7 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService { ...@@ -46,6 +46,7 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
if (siteRest.getCode() == YesNoEnum.YES.getValue()) { if (siteRest.getCode() == YesNoEnum.YES.getValue()) {
log.info("总数量:{}",siteRest.getData().size()); log.info("总数量:{}",siteRest.getData().size());
siteRest.getData().forEach(site -> { siteRest.getData().forEach(site -> {
sheetMatterService.getDao().delete(new SheetMatterQuery().siteId(site.getId()));
int page=100; int page=100;
int pageNum=100; int pageNum=100;
for(int i=1;i<=page;i++){ for(int i=1;i<=page;i++){
...@@ -76,12 +77,12 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService { ...@@ -76,12 +77,12 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(sheetMatterEntities)) { if (!ObjectUtils.isEmpty(sheetMatterEntities)) {
sheetMatterService.getDao().delete(new SheetMatterQuery().siteId(site.getId())); // sheetMatterService.getDao().delete(new SheetMatterQuery().siteId(site.getId()));
log.info("新增数量:{}",sheetMatterEntities.size()); log.info("新增数量:{}",sheetMatterEntities.size());
List<List<SheetMatterEntity>> partition = ListUtil.partition(sheetMatterEntities, 500); sheetMatterService.save(sheetMatterEntities);
/* List<List<SheetMatterEntity>> partition = ListUtil.partition(sheetMatterEntities, 500);
for (List<SheetMatterEntity> matterEntities : partition) { for (List<SheetMatterEntity> matterEntities : partition) {
sheetMatterService.save(matterEntities); }*/
}
} }
}else{ }else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment