| @@ -2,13 +2,16 @@ package com.ffii.fpsms.m18.service | |||||
| import com.ffii.core.utils.JwtTokenUtil | import com.ffii.core.utils.JwtTokenUtil | ||||
| import com.ffii.fpsms.m18.web.models.M18CommonRequest | import com.ffii.fpsms.m18.web.models.M18CommonRequest | ||||
| //import jakarta.annotation.PostConstruct | |||||
| import org.slf4j.Logger | import org.slf4j.Logger | ||||
| import org.slf4j.LoggerFactory | import org.slf4j.LoggerFactory | ||||
| import org.springframework.scheduling.annotation.Async | |||||
| //import org.springframework.scheduling.annotation.Async | |||||
| import org.springframework.scheduling.annotation.Scheduled | import org.springframework.scheduling.annotation.Scheduled | ||||
| import org.springframework.stereotype.Service | import org.springframework.stereotype.Service | ||||
| import java.time.LocalDateTime | import java.time.LocalDateTime | ||||
| import java.time.format.DateTimeFormatter | import java.time.format.DateTimeFormatter | ||||
| //import java.util.concurrent.ScheduledFuture | |||||
| //import kotlin.concurrent.Volatile | |||||
| @Service | @Service | ||||
| open class M18SchedulerService( | open class M18SchedulerService( | ||||
| @@ -19,9 +22,21 @@ open class M18SchedulerService( | |||||
| var logger: Logger = LoggerFactory.getLogger(JwtTokenUtil::class.java) | var logger: Logger = LoggerFactory.getLogger(JwtTokenUtil::class.java) | ||||
| val dataStringFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd") | val dataStringFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd") | ||||
| // @Volatile | |||||
| // var scheduledM18Po: ScheduledFuture<*>? = null | |||||
| // | |||||
| // @PostConstruct | |||||
| // fun init() { | |||||
| // | |||||
| // } | |||||
| // | |||||
| // fun scheduleM18PoTask() { | |||||
| // scheduledM18Po?.cancel(false) | |||||
| // } | |||||
| // @Async | // @Async | ||||
| // @Scheduled(cron = "0 0 2 * * *") // (SS/MM/HH/DD/MM/YY) | // @Scheduled(cron = "0 0 2 * * *") // (SS/MM/HH/DD/MM/YY) | ||||
| @Scheduled(cron = "0 35 14 * * *") // (SS/MM/HH/DD/MM/YY) | |||||
| @Scheduled(cron = "0 0 2 * * *") // (SS/MM/HH/DD/MM/YY) | |||||
| open fun getM18Pos() { | open fun getM18Pos() { | ||||
| val currentTime = LocalDateTime.now() | val currentTime = LocalDateTime.now() | ||||
| val today = currentTime.toLocalDate().atStartOfDay() | val today = currentTime.toLocalDate().atStartOfDay() | ||||