fix:
更新地理围栏坐标点 为数据库插入操作添加null检查 添加根证书文件
This commit is contained in:
+6
-6
@@ -200,11 +200,11 @@ async function startServer() {
|
||||
|
||||
const geofence = polygon([
|
||||
[
|
||||
[113.310, 23.120],
|
||||
[113.330, 23.120],
|
||||
[113.310, 23.140],
|
||||
[113.330, 23.140],
|
||||
[113.310, 23.120]
|
||||
[113.35311466293217, 23.161344441258407],
|
||||
[113.28591534444001, 23.161344441258407],
|
||||
[113.28591534444001, 23.091366234233973],
|
||||
[113.35311466293217, 23.091366234233973],
|
||||
[113.35311466293217, 23.161344441258407]
|
||||
]
|
||||
])
|
||||
|
||||
@@ -378,7 +378,7 @@ const geofence = polygon([
|
||||
const timestamp = new Date()
|
||||
await db.execute(
|
||||
'INSERT INTO clock_records (worker_id, event_type, timestamp, qr_code_id, latitude, longitude, notes) VALUES (?, ?, ?, ?, ?, ?, ?)',
|
||||
[userId, eventType, timestamp, qrCodeValue, latitude, longitude, notes],
|
||||
[userId, eventType, timestamp, qrCodeValue || null, latitude || null, longitude || null, notes || null],
|
||||
)
|
||||
res.status(201).json({ message: 'Clock event recorded successfully' })
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user