(20260219) API ready for production test.
This commit is contained in:
@@ -300,8 +300,9 @@ async def in_out_report_generate(
|
|||||||
cosec_notes = json.from_string(r.get("json_notes", "{}")).get("cosec", {})
|
cosec_notes = json.from_string(r.get("json_notes", "{}")).get("cosec", {})
|
||||||
ar_dt = r.get("ar_date")
|
ar_dt = r.get("ar_date")
|
||||||
if ar_dt: ar_dt = datetime.datetime.strptime(ar_dt, "%Y-%m-%d").timestamp()
|
if ar_dt: ar_dt = datetime.datetime.strptime(ar_dt, "%Y-%m-%d").timestamp()
|
||||||
cumulative_register.append({
|
formatted_record = {
|
||||||
"date": ar_dt,
|
"date": ar_dt,
|
||||||
|
"dateStr": r.get("ar_date"),
|
||||||
"empId": r.get("pseudonym"),
|
"empId": r.get("pseudonym"),
|
||||||
"empName": r.get("full_name"),
|
"empName": r.get("full_name"),
|
||||||
"status": r.get("status"),
|
"status": r.get("status"),
|
||||||
@@ -313,7 +314,8 @@ async def in_out_report_generate(
|
|||||||
"lastOutLoc": cosec_notes.get("lastOutLoc"),
|
"lastOutLoc": cosec_notes.get("lastOutLoc"),
|
||||||
"workSeconds": cosec_notes.get("workSeconds"),
|
"workSeconds": cosec_notes.get("workSeconds"),
|
||||||
"workHours": cosec_notes.get("workHours"),
|
"workHours": cosec_notes.get("workHours"),
|
||||||
})
|
}
|
||||||
|
cumulative_register.append(formatted_record)
|
||||||
|
|
||||||
# Remove unwanted records:
|
# Remove unwanted records:
|
||||||
from_ts = inbound_data.fromDate.timestamp()
|
from_ts = inbound_data.fromDate.timestamp()
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
@@ -286,12 +286,12 @@ async def set_scheduler(
|
|||||||
await yesterday_cron(
|
await yesterday_cron(
|
||||||
cosec_creds = copy.deepcopy(cosec_creds),
|
cosec_creds = copy.deepcopy(cosec_creds),
|
||||||
tcaoff_client = tcaoff_client,
|
tcaoff_client = tcaoff_client,
|
||||||
test_mode = test_mode
|
# test_mode = test_mode
|
||||||
)
|
)
|
||||||
await today_cron(
|
await today_cron(
|
||||||
cosec_creds = copy.deepcopy(cosec_creds),
|
cosec_creds = copy.deepcopy(cosec_creds),
|
||||||
tcaoff_client = tcaoff_client,
|
tcaoff_client = tcaoff_client,
|
||||||
test_mode = test_mode
|
# test_mode = test_mode
|
||||||
)
|
)
|
||||||
printer("Test Done")
|
printer("Test Done")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user