feat: 考勤功能补全
1. 首页加载时检查工作状态(fetchWorkState) 2. MQTT type=4 工作状态推送处理(上班→亮屏,下班→关NFC+熄屏) 3. PunchStatus 增加打卡时间字段(onPunchTime/offPunchTime) 4. 考勤页显示打卡时间("已上班 07:02"/"已下班 17:05") 5. 首页注入 PunchApi/ScreenController/NfcController Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,11 @@ data class PunchStatus(
|
||||
/** 上班打卡状态:0=未上班, 1=已上班 */
|
||||
@SerializedName("onPunchState") val onPunchState: Int = 0,
|
||||
/** 下班打卡状态:1=已下班, 其他=未下班 */
|
||||
@SerializedName("offPunchState") val offPunchState: Int = 0
|
||||
@SerializedName("offPunchState") val offPunchState: Int = 0,
|
||||
/** 上班打卡时间(API 可能返回,待验证字段名) */
|
||||
@SerializedName("onPunchTime") val onPunchTime: String? = null,
|
||||
/** 下班打卡时间 */
|
||||
@SerializedName("offPunchTime") val offPunchTime: String? = null
|
||||
) {
|
||||
/** 是否已上班 */
|
||||
val isOnDuty: Boolean get() = onPunchState == 1
|
||||
|
||||
Reference in New Issue
Block a user