|
@@ -11,6 +11,7 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
@@ -30,11 +31,13 @@ public class FileParseTask {
|
|
|
private FileParseService fileParseService;
|
|
private FileParseService fileParseService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TableCreator tableCreator;
|
|
private TableCreator tableCreator;
|
|
|
|
|
+ @Scheduled(fixedRate = 600000)
|
|
|
public void dataDeal(){
|
|
public void dataDeal(){
|
|
|
//wafer_id='BF241002603#01' AND
|
|
//wafer_id='BF241002603#01' AND
|
|
|
- List<DataChipTestLog> dataChipTestLogs = baseDao.getJdbcTemplate().query("select wafer_id,lot_id,status,data_path,counter_path from (select wafer_id,lot_id,status,data_path,counter_path from " +
|
|
|
|
|
|
|
+ logger.info("开始解析文件");
|
|
|
|
|
+ List<DataChipTestLog> dataChipTestLogs = baseDao.getJdbcTemplate().query("select wafer_id,lot_id,status,data_path,counter_path,dbid_ from (select wafer_id,lot_id,status,data_path,counter_path,dbid_ from " +
|
|
|
" DATACENTER$MESFILE WHERE DEALSTATE_=0 ORDER BY DBID_ ASC ) where " +
|
|
" DATACENTER$MESFILE WHERE DEALSTATE_=0 ORDER BY DBID_ ASC ) where " +
|
|
|
- " rownum<=10", new BeanPropertyRowMapper<>(DataChipTestLog.class));
|
|
|
|
|
|
|
+ " rownum<=100", new BeanPropertyRowMapper<>(DataChipTestLog.class));
|
|
|
List<String> distinctLotIds = dataChipTestLogs.stream().map(DataChipTestLog::getLot_id).distinct()
|
|
List<String> distinctLotIds = dataChipTestLogs.stream().map(DataChipTestLog::getLot_id).distinct()
|
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
|
SpObserver.putSp("datacenter");
|
|
SpObserver.putSp("datacenter");
|