🆗 由于默认密码变更,已无法后台登录,改为使用jsessionID登录

🆗 兼容新的打卡
🆗 增加自动打卡开关
This commit is contained in:
jimlee
2023-03-22 19:34:53 +08:00
parent becdffe1d4
commit 8e9842b4f9
3 changed files with 36 additions and 19 deletions

View File

@@ -12,6 +12,7 @@ import com.pomelotea.hoperun.sign.config.HoperunUserConfig.getUserConfig
import com.pomelotea.hoperun.sign.config.HoperunUserConfig.userConfigMap
import com.pomelotea.hoperun.sign.config.UserConfig
import com.pomelotea.hoperun.sign.scheduler.AutoDakaScheduler
import com.pomelotea.hoperun.sign.scheduler.AutoDakaScheduler.Companion.dakaQueue
import okhttp3.FormBody
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.Request
@@ -143,6 +144,12 @@ class HoperunSignController {
queryMonthAttData(employeeNo, jsessionId, getLastDateyyyy_MM() + "-01")
val lastMonthAttLogs = lastMonthAttList.sortedByDescending { it.yearmonth }.filter { it.dateType == "1" }
monthAttResult.addAll(lastMonthAttLogs)
val monthAttLog = monthAttResult.find { it.yearmonth == getNowDateyyyy_MM_dd() }
val autoDaka = dakaQueue.filter { it.dakaDate == getNowDateyyyy_MM_dd() }.findLast { it.employeeNo == employeeNo }
if (autoDaka != null && monthAttLog != null) {
monthAttLog.autoDakaBeginTime = autoDaka.beginTime
monthAttLog.autoDakaEndTime = autoDaka.endTime
}
return monthAttResult
}
@@ -278,7 +285,9 @@ data class MonthAttLog(
var project_id: String? = null,
var projectcode: String? = null,
var staff_code: String? = null,
var yearmonth: String? = null
var yearmonth: String? = null,
var autoDakaBeginTime: String? = null,
var autoDakaEndTime: String? = null,
)
data class HoperunDakaRequest(