增添優化功能

This commit is contained in:
2026-03-16 00:38:18 +08:00
parent 38039e8dc0
commit 9068d85c92
12 changed files with 223 additions and 144 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ class ClockInApiService {
return await _apiService.fetchList<ClockInRecord>(
tableName: "hrs_ClockInRecord",
pk: "ClockInId",
queryFilter: "1^100^ClockInDateTime^*^ClockInDateTime >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)^^ClockInUserId^$userId",
queryFilter: "1^100^ClockInDateTime^*^ClockInDateTime >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)^hrs_ClockInRecord^ClockInUserId^$userId",
fromJson: (json) => ClockInRecord.fromJson(json),
);
}
+1 -1
View File
@@ -241,7 +241,7 @@ class _ClockInManagerState extends State<ClockInManager> {
return ListTile(
leading: Icon(Icons.access_time, color: record.typeColor),
title: Text("${record.type} - ${record.formattedDateTime}"),
subtitle: Text(record.storeId ?? ""),
subtitle: Text(record.StoreName ?? ""),
);
}
}
+3
View File
@@ -9,6 +9,7 @@ class ClockInRecord {
final double? longitude;
final String? type;
final String? storeId;
final String? StoreName;
ClockInRecord({
this.clockInId,
@@ -18,6 +19,7 @@ class ClockInRecord {
this.longitude,
this.type,
this.storeId,
this.StoreName,
});
factory ClockInRecord.fromJson(Map<String, dynamic> json) {
@@ -29,6 +31,7 @@ class ClockInRecord {
longitude: double.tryParse(json['ClockInLongitude']?.toString() ?? '0'),
type: json['ClockInType'] as String?,
storeId: json['ClockInStoreId'] as String?,
StoreName: json['StoreName'] as String?,
);
}