feat: 取消签退(clock_out)机制,仅保留签到记录

GPS定位偏差导致设备频繁误判为离开围栏触发签退,
移除所有签退逻辑:围栏出栏不再创建clock_out,
设备考勤(0xB0/0xB1)和蓝牙打卡(0xB2)统一只记录签到。

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
This commit is contained in:
2026-03-31 01:54:48 +00:00
parent 3437cd24ea
commit a97dcd07a5
2 changed files with 8 additions and 44 deletions

View File

@@ -1730,16 +1730,12 @@ class TCPManager:
gps_positioned = gps["gps_positioned"]
pos += 12
# Terminal info (1 byte) - contains clock_in/clock_out status bits
# Terminal info (1 byte) - parse status bits (clock_out disabled due to GPS drift)
attendance_type = "clock_in"
terminal_info = 0
if len(content) > pos:
terminal_info = content[pos]
status_code = (terminal_info >> 2) & 0x0F
if status_code == 0b0010:
attendance_type = "clock_out"
elif status_code == 0b0001:
attendance_type = "clock_in"
# status_code = (terminal_info >> 2) & 0x0F — always use clock_in
pos += 1
# voltage_level (1 byte)
@@ -1992,13 +1988,9 @@ class TCPManager:
beacon_battery = raw_batt * 0.01
pos += 2
# Terminal info (1 byte) - clock_in/clock_out
# Terminal info (1 byte) - parse but always use clock_in (clock_out disabled)
attendance_type = "clock_in"
if len(content) > pos:
terminal_info = content[pos]
status_code = (terminal_info >> 2) & 0x0F
if status_code == 0b0010:
attendance_type = "clock_out"
pos += 1
# Terminal reserved (2 bytes) - echo back