|
|
@@ -31,7 +31,7 @@ public class FileParseTask {
|
|
|
private FileParseService fileParseService;
|
|
|
@Autowired
|
|
|
private TableCreator tableCreator;
|
|
|
- @Scheduled(fixedRate = 600000)
|
|
|
+ @Scheduled(fixedRate = 600000)
|
|
|
public void dataDeal(){
|
|
|
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 " +
|
|
|
@@ -40,10 +40,15 @@ public class FileParseTask {
|
|
|
List<String> distinctLotIds = dataChipTestLogs.stream().map(DataChipTestLog::getLot_id).distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
SpObserver.putSp("datacenter");
|
|
|
- for (String lotId : distinctLotIds){
|
|
|
- tableCreator.createTable("DATA$"+lotId);
|
|
|
+ try {
|
|
|
+ for (String lotId : distinctLotIds){
|
|
|
+ tableCreator.createTable("DATA$"+lotId.replace("-","_"));
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ logger.info("创建表失败:"+e.getMessage());
|
|
|
+ }finally {
|
|
|
+ SpObserver.clear();
|
|
|
}
|
|
|
- SpObserver.back();
|
|
|
logger.info("Data文件解析执行开始:文件数"+dataChipTestLogs.size());
|
|
|
Date date = new Date();
|
|
|
if(!dataChipTestLogs.isEmpty()){
|