Commit 87fd40d5 authored by 赵啸非's avatar 赵啸非

添加材料数量统计

parent 19c0f73f
......@@ -12,6 +12,7 @@ import com.mortals.xhx.common.pdu.site.SitePdu;
import com.mortals.xhx.feign.site.ISiteFeign;
import com.mortals.xhx.feign.site.ISiteMatterFeign;
import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
import com.mortals.xhx.module.sheet.model.SheetMatterQuery;
import com.mortals.xhx.module.sheet.service.SheetMatterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -64,10 +65,9 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
}).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(sheetMatterEntities)) {
sheetMatterService.getDao().delete(new HashMap());
sheetMatterService.getDao().delete(new SheetMatterQuery().siteId(site.getId()));
List<List<SheetMatterEntity>> partition = ListUtil.partition(sheetMatterEntities, 500);
for (List<SheetMatterEntity> matterEntities : partition) {
sheetMatterService.save(matterEntities);
}
......
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