| | |
| | | import com.yssh.service.WarningAnalyseService; |
| | | import com.yssh.service.XlsReportService; |
| | | 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.boot.ApplicationArguments; |
| | |
| | | import com.yssh.service.DictRecordService; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Calendar; |
| | | |
| | | @Component |
| | | public class InitConfig implements ApplicationRunner { |
| | | //protected final Log logger = LogFactory.getLog(this.getClass()); |
| | | // protected final Log logger = LogFactory.getLog(this.getClass()) |
| | | protected final Logger logger = LoggerFactory.getLogger(this.getClass()); |
| | | |
| | | @Resource |
| | |
| | | @Resource |
| | | WarningAnalyseService warningAnalyseService; |
| | | |
| | | @Resource |
| | | ScheduleConfig task; |
| | | //@Resource |
| | | //ScheduleConfig task; |
| | | |
| | | @Resource |
| | | XlsReportService xlsReportService; |
| | |
| | | // 读取dat数据 |
| | | commonService.readDatData(); |
| | | |
| | | // xlsReportService.createDayReport(); |
| | | // xlsReportService.createWeekReport(); |
| | | // xlsReportService.createMonthReport(); |
| | | |
| | | //test(); |
| | | logger.info("***************** 系统启动完毕 *****************" + "\n"); |
| | | test(); |
| | | } |
| | | |
| | | private void test() { |
| | | //task.createMonthReport(); |
| | | //task.corpReserveDataSync(); |
| | | |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.set(Calendar.MONTH, 5); |
| | | calendar.set(Calendar.DAY_OF_MONTH, 8); |
| | | calendar.set(Calendar.HOUR_OF_DAY, 16); |
| | | calendar.set(Calendar.MINUTE, 0); |
| | | calendar.set(Calendar.SECOND, 0); |
| | | calendar.set(Calendar.MILLISECOND, 0); |
| | | //task.corpReserveDataSync(); |
| | | //warningAnalyseService.warningOperationStorage(cal.getTime()); |
| | | |
| | | //warningAnalyseService.warningOperationStorage(calendar.getTime()); |
| | | /*Calendar cal1 = Calendar.getInstance(); |
| | | cal1.set(Calendar.MONTH, 6); |
| | | cal1.set(Calendar.DAY_OF_MONTH, 25); |
| | | cal1.set(Calendar.HOUR_OF_DAY, 14); |
| | | cal1.set(Calendar.MINUTE, 0); |
| | | cal1.set(Calendar.SECOND, 0); |
| | | cal1.set(Calendar.MILLISECOND, 0); |
| | | xlsReportService.createDayReport(cal1.getTime());*/ |
| | | |
| | | /*Calendar cal2 = Calendar.getInstance(); |
| | | cal2.set(Calendar.MONTH, 6); |
| | | cal2.set(Calendar.DAY_OF_MONTH, 31); |
| | | xlsReportService.createWeekReport(cal2.getTime());*/ |
| | | |
| | | /*Calendar cal3 = Calendar.getInstance(); |
| | | cal3.set(Calendar.MONTH, 7); |
| | | cal3.set(Calendar.DAY_OF_MONTH, 1); |
| | | xlsReportService.createMonthReport(cal3.getTime());*/ |
| | | } |
| | | } |