update
This commit is contained in:
parent
26e4c7f55e
commit
25520aa48b
|
|
@ -228,6 +228,7 @@ class SyncEhrToOaApi:
|
||||||
"capacity": capacity,
|
"capacity": capacity,
|
||||||
"withDisabled": with_disabled,
|
"withDisabled": with_disabled,
|
||||||
"isWithDeleted": is_with_deleted,
|
"isWithDeleted": is_with_deleted,
|
||||||
|
"enableTranslate": True,
|
||||||
}
|
}
|
||||||
|
|
||||||
resp = self._client.request(
|
resp = self._client.request(
|
||||||
|
|
|
||||||
|
|
@ -697,6 +697,7 @@ class SyncEhrToOaFormJob(BaseJob):
|
||||||
not_found_in_oa = 0
|
not_found_in_oa = 0
|
||||||
unmatched_samples: list[str] = []
|
unmatched_samples: list[str] = []
|
||||||
debug_rows = 0
|
debug_rows = 0
|
||||||
|
place_debug_count = 0
|
||||||
for job_no, item in ehr_by_job_no.items():
|
for job_no, item in ehr_by_job_no.items():
|
||||||
oa_record_id = merged_id_by_job_no.get(job_no)
|
oa_record_id = merged_id_by_job_no.get(job_no)
|
||||||
matched_by = "raw"
|
matched_by = "raw"
|
||||||
|
|
@ -739,7 +740,9 @@ class SyncEhrToOaFormJob(BaseJob):
|
||||||
name = str(emp.get("name") or "")
|
name = str(emp.get("name") or "")
|
||||||
rd_attr = _rd_attr_to_text(_custom_prop_value(emp.get("customProperties"), _EHR_RD_ATTR_KEY))
|
rd_attr = _rd_attr_to_text(_custom_prop_value(emp.get("customProperties"), _EHR_RD_ATTR_KEY))
|
||||||
rec_translate = rec.get("translateProperties") or {}
|
rec_translate = rec.get("translateProperties") or {}
|
||||||
place = str((rec_translate or {}).get("PlaceText") or rec.get("place") or "")
|
place_text = str((rec_translate or {}).get("PlaceText") or "").strip()
|
||||||
|
place_code = str(rec.get("place") or "").strip()
|
||||||
|
place = str(place_text or place_code)
|
||||||
entry_date = _date_only(rec.get("entryDate"))
|
entry_date = _date_only(rec.get("entryDate"))
|
||||||
leave_date = _date_only(rec.get("lastWorkDate"))
|
leave_date = _date_only(rec.get("lastWorkDate"))
|
||||||
id_number = str(emp.get("iDNumber") or "")
|
id_number = str(emp.get("iDNumber") or "")
|
||||||
|
|
@ -757,6 +760,15 @@ class SyncEhrToOaFormJob(BaseJob):
|
||||||
manager_show = str(manager_member.get("name") or manager_code)
|
manager_show = str(manager_member.get("name") or manager_code)
|
||||||
is_leaving = "是" if _date_only(rec.get("lastWorkDate")) else "否"
|
is_leaving = "是" if _date_only(rec.get("lastWorkDate")) else "否"
|
||||||
domain_account = _custom_prop_value(emp.get("customProperties"), domain_custom_key) or str(emp.get("_Name") or "")
|
domain_account = _custom_prop_value(emp.get("customProperties"), domain_custom_key) or str(emp.get("_Name") or "")
|
||||||
|
if place_debug_count < 50:
|
||||||
|
logger.info(
|
||||||
|
"工作地点调试:job_no=%s PlaceText=%r place_code=%r chosen=%r",
|
||||||
|
job_no,
|
||||||
|
place_text,
|
||||||
|
place_code,
|
||||||
|
place,
|
||||||
|
)
|
||||||
|
place_debug_count += 1
|
||||||
|
|
||||||
debug_payload = {
|
debug_payload = {
|
||||||
"job_no": job_no,
|
"job_no": job_no,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue