燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-08-09 2c786593c62d1a97cfc531b35106798047279042
src/main/java/com/yssh/config/InitConfig.java
@@ -1,12 +1,12 @@
package com.yssh.config;
import com.yssh.service.WarningAnalyseService;
import com.yssh.service.XlsExportService;
import com.yssh.utils.CacheUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
@@ -22,10 +22,10 @@
    //protected final Log logger = LogFactory.getLog(this.getClass());
    protected final Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    @Resource
    private CommonService commonService;
    @Autowired
    @Resource
    private DictRecordService dictRecordService;
    @Resource
@@ -34,17 +34,21 @@
    @Resource
    ScheduleConfig task;
    @Resource
    XlsExportService xlsService;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        CacheUtils.init();
        boolean tableExists = commonService.checkTableExists("dict_record");
        if (!tableExists) {
            dictRecordService.createDictRecoTable();
        }
        if (!tableExists) dictRecordService.createDictRecoTable();
        // 读取dat数据
        commonService.readDatData();
        xlsService.createDayReport();
        //test();
        logger.info("***************** 系统启动完毕 *****************" + "\n");
    }