dev-2025 #1

Merged
luobei merged 14 commits from dev-2025 into main 2025-03-21 15:26:29 +08:00
Showing only changes of commit dc9ab0d4ee - Show all commits

View File

@@ -58,7 +58,8 @@ class AutoDakaScheduler {
} }
} }
dakaQueue.forEach { dakaQueue.filter { !it.added }.forEach {
it.added = true
val beginDate = LocalDateTime.parse(it.dakaDate + "T" + it.beginTime + ":" + randowSecond(), DateTimeFormatter.ISO_LOCAL_DATE_TIME) val beginDate = LocalDateTime.parse(it.dakaDate + "T" + it.beginTime + ":" + randowSecond(), DateTimeFormatter.ISO_LOCAL_DATE_TIME)
val endDate = LocalDateTime.parse(it.dakaDate + "T" + it.endTime + ":" + randowSecond(), DateTimeFormatter.ISO_LOCAL_DATE_TIME) val endDate = LocalDateTime.parse(it.dakaDate + "T" + it.endTime + ":" + randowSecond(), DateTimeFormatter.ISO_LOCAL_DATE_TIME)
val beginSeconds = beginDate.toEpochSecond(DEFAULT_ZONE) - (System.currentTimeMillis() / 1000) val beginSeconds = beginDate.toEpochSecond(DEFAULT_ZONE) - (System.currentTimeMillis() / 1000)
@@ -129,9 +130,10 @@ data class Daka(
val beginTime: String, val beginTime: String,
val endTime: String, val endTime: String,
val employeeNo: String, val employeeNo: String,
val dakaDate: String val dakaDate: String,
var added: Boolean = false
) { ) {
fun toCsv(): String { fun toCsv(): String {
return "$employeeNo,$dakaDate,$beginTime,$endTime" return "$employeeNo,$dakaDate,$beginTime,$endTime,$added"
} }
} }