燕山石化溯源三维电子沙盘-【后端】-服务
13693261870
2023-10-31 a9f99d3f074472e1e16ec6109e5d819ca8dcf4d0
src/main/java/com/yssh/utils/CsvParser.java
@@ -3,12 +3,12 @@
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.yssh.entity.SuYuan;
import com.yssh.service.SuYuanService;
import com.github.biyanwen.impl.AbstractCsvFileParser;
import com.yssh.entity.SuYuan;
import com.yssh.service.ISuYuanService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class CsvParser extends AbstractCsvFileParser<SuYuan> {
   protected final Logger logger = LoggerFactory.getLogger(this.getClass());
@@ -23,10 +23,11 @@
    */
   private List<SuYuan> cachedData = new ArrayList<>(BATCH_COUNT);
   private ISuYuanService suYuanService;
   private SuYuanService suYuanService;
   private String time;
   public CsvParser(ISuYuanService suYuanService, String time) {
   public CsvParser(SuYuanService suYuanService, String time) {
      this.suYuanService = suYuanService;
      this.time = time;
   }
@@ -34,7 +35,6 @@
   /**
    * 所有数据解析完成了 会来调用,防止有数据没有被保存
    */
   @Override
   protected void doAfterAllAnalysed() {
      try {
         saveSuYuanData();
@@ -44,7 +44,6 @@
      }
   }
   @Override
   protected void invoke(SuYuan t) {
      t.setId(t.getX() + "_" + t.getY() + "_" + t.getZ());
      if ("0_0_0".equals(t.getId())) {