feat: 考勤打卡模块(NFC)重新开发

基于新方法论(11层源码分析+独立评审)重新开发考勤打卡功能:
- 首页下拉展开打卡面板,点击按钮开启NFC贴卡打卡
- 支持上班打卡、下班打卡、撤销打卡
- NFC超时自动关闭,音效反馈(4种planId)
- MQTT type=5 上下班状态推送处理
- 按钮状态矩阵:onPunchState×offPunchState决定显示

新增: AttendanceStatus / PunchApi / PunchViewModel / PunchPanelView
修改: NetworkModule / HomeFragment / fragment_home.xml
删除: AttendanceInfo(被AttendanceStatus替代)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dongliang
2026-04-28 20:57:17 +09:30
parent 98de3f0b46
commit 97a3054db2
13 changed files with 881 additions and 55 deletions

View File

@@ -6,6 +6,7 @@ import com.xiaoqu.watch.network.EnvConfig
import com.xiaoqu.watch.network.SignatureInterceptor
import com.xiaoqu.watch.network.UnbindInterceptor
import com.xiaoqu.watch.network.api.CommonApi
import com.xiaoqu.watch.network.api.PunchApi
import com.xiaoqu.watch.network.api.TaskApi
import dagger.Module
import dagger.Provides
@@ -69,4 +70,10 @@ object NetworkModule {
fun provideTaskApi(retrofit: Retrofit): TaskApi {
return retrofit.create(TaskApi::class.java)
}
@Provides
@Singleton
fun providePunchApi(retrofit: Retrofit): PunchApi {
return retrofit.create(PunchApi::class.java)
}
}