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

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 主按钮背景(深蓝色圆角) -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="#FF1565C0" />
<corners android:radius="12dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="#FF1E88E5" />
<corners android:radius="12dp" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 次按钮背景(深灰色圆角) -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="#FF424242" />
<corners android:radius="12dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="#FF333333" />
<corners android:radius="12dp" />
</shape>
</item>
</selector>