| | |
| | | import com.github.biyanwen.impl.AbstractCsvFileParser; |
| | | import com.yssh.entity.VocVals; |
| | | import com.yssh.service.VocValsService; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.math.BigInteger; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * VOC转换类 |
| | | * @author WWW |
| | | * @date 2023-06-05 |
| | | */ |
| | | public class VocParser extends AbstractCsvFileParser<VocVals> { |
| | | protected final Log logger = LogFactory.getLog(this.getClass()); |
| | | protected final Logger logger = LoggerFactory.getLogger(this.getClass()); |
| | | |
| | | private final SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHH0000"); |
| | | |
| | | /** |
| | | * 每隔5000条入库一次 |
| | | */ |
| | | public static final int BATCH_COUNT = 100000; |
| | | |
| | | private BigInteger startId; |
| | |
| | | private void inserts() { |
| | | try { |
| | | if (list.size() > 0) { |
| | | this.vocValsService.insertVocVals(list); |
| | | //this.vocValsService.insertVocVals(list); |
| | | this.vocValsService.insertVocSync(list); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error(e.getMessage()); |
| | | logger.error(e.getMessage(), e); |
| | | e.printStackTrace(); |
| | | } |
| | | } |