TMAttLog Source Code
🇹🇭 ภาษาไทย
แหล่งข้อมูล: Source code จาก ~/Downloads/TMAttLog-main (GitHub private repo: prasit4499/TMAttLog)
ภาษา: C# .NET
วันที่ ingest: 2026-04-28
ไม่มี README — reconstruct architecture จาก code โดยตรง
ไฟล์ที่อ่าน
| ไฟล์ | หมายเหตุ |
|---|---|
TMAttLog/Form1.cs | WinForms GUI หลัก; ZKTeco connect + Access DB + SQL Server backup |
TMAttLogTaskProcessor/TaskProcessor.cs | Headless version; MCIC only; RunAutoProcess(dbName, machineNumber) |
TMAttLog2PayrollTaskProcessor/Program.cs | Stage 2; อ่าน International DB → upsert payroll databases |
TMAttLog2PayrollTaskProcessorVN/Program.cs | Stub (Hello World เท่านั้น) |
TMAttLogTaskProcessorVN/Program.cs | ไม่ได้อ่าน (assumed stub) |
Insights สำคัญที่สกัดได้
- Two-stage pipeline: Stage 1 = ZKTeco → SQL Server staging; Stage 2 = staging → multiple payroll databases
- 7 payroll databases รับข้อมูลจาก stage 2: MCIC50, MCIC50_02, MCIC50_03, LF50, VALLEY50, EX50, MCICVN
- Machine number routing: < 199 → TMSTAMP (all DBs); 199–299 → TMSTAMP_OTH (MC50 only)
- Incremental backup: ใช้ MAX(TMTIME) ป้องกัน duplicate; TMSTAMP upsert (merge timestamps)
- SQL Server 2100 parameter limit: แก้ด้วย batch 1000 ใน
LoadEmployeesInBatches() - ZKTeco platforms: ZMM (GetGeneralLogData) vs ZEM (ReadGeneralLogData + SSR_GetGeneralLogData)
- TMSTAMP_OTH table สำหรับ special machines — ไม่ documented ใน ZKTeco manual แต่พบใน code
- VN versions are stubs — ยังไม่ implement จริง
Related
- TMAttLog — entity page หลัก