| | |
| | | package com.yssh.scheduled; |
| | | |
| | | |
| | | import java.io.File; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | |
| | | import com.yssh.entity.VocVals; |
| | | import com.yssh.service.VocValsService; |
| | | import com.yssh.utils.VocParser; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import com.yssh.utils.DateUtils; |
| | | import com.yssh.utils.TableStrategy; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Component |
| | | public class ReadCsvTask { |
| | |
| | | |
| | | @Autowired |
| | | private SuYuanServiceImpl suYuanService; |
| | | |
| | | @Resource |
| | | private VocValsService vocValsService; |
| | | |
| | | @Autowired |
| | | private IDictRecordService dictRecordService; |
| | |
| | | continue; |
| | | } |
| | | |
| | | int count = vocValsService.countByTime(time); |
| | | if (count > 0) { |
| | | continue; |
| | | } |
| | | |
| | | EasyCsv.read(filePath, VocVals.class, new VocParser(vocValsService, calendar.getTime())).doRead(); |
| | | } |
| | | } |
| | | |