🆗 添加2025年调休与节假日配置

🆗 调整样式兼容手机端访问
This commit is contained in:
2024-11-29 16:04:56 +08:00
parent 1d94c923bd
commit 25d326e4a7
9 changed files with 163 additions and 20 deletions

View File

@@ -15,29 +15,28 @@ import java.util.*
* 启动入口
**/
@SpringBootApplication
open class DakaApplication {
}
open class DakaApplication
val <T : Any> T.logger: Logger
get() = LoggerFactory.getLogger(this::class.java)
val holidays: List<String> = listOf(
// 元旦
"2024-01-01",
"2025-01-01",
// 春节
"2024-02-10", "2024-02-11", "2024-02-12", "2024-02-13", "2024-02-14", "2024-02-15", "2024-02-16", "2024-02-17",
"2025-01-28", "2025-01-29", "2025-01-30", "2025-01-31", "2025-02-01", "2025-02-02", "2025-02-03", "2025-02-04",
// 清明
"2024-04-04", "2024-04-05", "2024-04-06",
"2025-04-04", "2025-04-05", "2025-04-06",
// 劳动节
"2024-05-01", "2024-05-02", "2024-05-03", "2024-05-04", "2024-05-05",
"2025-05-01", "2025-05-02", "2025-05-05", "2025-05-04", "2025-05-05",
// 端午节
"2024-06-08", "2024-06-09", "2024-06-10",
"2025-05-31", "2025-06-01", "2025-06-02",
// 中秋
"2024-09-15", "2024-09-16", "2024-09-17",
// 国庆
"2024-10-01", "2024-10-02", "2024-10-03", "2024-10-04", "2024-10-05", "2024-10-06", "2024-10-07")
"2025-10-01", "2025-10-02", "2025-10-03", "2025-10-04", "2025-10-05", "2025-10-06", "2025-10-07", "2025-10-08")
val workdays: List<String> = listOf("2024-04-07", "2024-04-28", "2024-05-11", "2024-09-14", "2024-09-29", "2024-10-12")
// 周末要上班的日期
val workdays: List<String> = listOf("2025-01-26", "2025-02-08", "2025-04-27", "2025-10-11", "2025-09-28", "2025-10-12")
private val logger = LoggerFactory.getLogger("APPLICATION-STARTER")
fun main(args: Array<String>) {

View File

@@ -32,7 +32,7 @@ import java.util.*
const val DAKA_URL = "http://pom.hoperun.com:8187/attm/attence/recordAttendance"
const val MONTH_ATT_URL = "http://pom.hoperun.com:8187/attm/calendar/monthAtt"
val DEFAULT_ZONE = ZoneOffset.of("+8")
val DEFAULT_ZONE: ZoneOffset = ZoneOffset.of("+8")
val client = OkHttpClient()
.newBuilder()

View File

@@ -0,0 +1,22 @@
package com.pomelotea.hoperun.sign.config
import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.CorsRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
/**
*
* @author jimlee
* @create 2024/11/1 13:15
*/
@Configuration
open class CorsConfig : WebMvcConfigurer {
override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**")
.allowedMethods("*")
.allowedHeaders("*")
.allowedOriginPatterns("*")
.allowCredentials(true)
.maxAge(3600)
}
}