|
@@ -686,7 +686,11 @@ async def get_event_list(
|
|
|
):
|
|
|
|
|
|
try:
|
|
|
- where = and_(OnlineRollCallDetail.leader_id == user_id, OnlineRollCallDetail.del_flag == '0')
|
|
|
+ is_myid_where = or_(OnlineRollCallDetail.standby_staff_id == user_id,
|
|
|
+ OnlineRollCallDetail.leader_id == user_id,
|
|
|
+ OnlineRollCallDetail.primary_staff_id == user_id,
|
|
|
+ OnlineRollCallDetail.secondary_staff_id == user_id)
|
|
|
+ where = and_(is_myid_where, OnlineRollCallDetail.del_flag == '0')
|
|
|
|
|
|
if begin_date is not None and begin_date != '':
|
|
|
begin_date = datetime.strptime(begin_date, "%Y-%m-%d")
|
|
@@ -711,8 +715,13 @@ async def get_event_list(
|
|
|
|
|
|
for row in rows:
|
|
|
duration_time = ""
|
|
|
+ img_url = ""
|
|
|
# 已应答
|
|
|
if row.ack_status == 1:
|
|
|
+
|
|
|
+ file_info = db.query(OnlineRollCallFile).filter(and_(OnlineRollCallFile.foreign_key == str(row.id), OnlineRollCallFile.from_scenario == 'online_call_photo_file', OnlineRollCallFile.del_flag == '0')).first()
|
|
|
+ if file_info is not None:
|
|
|
+ img_url = file_info.storage_file_name
|
|
|
time_diff = row.ack_time - row.create_time
|
|
|
if time_diff.days < 0:
|
|
|
duration_time = "超过{}天".format(abs(time_diff.days))
|
|
@@ -724,7 +733,8 @@ async def get_event_list(
|
|
|
"id": row.id,
|
|
|
"create_time": get_datetime_str(row.create_time),
|
|
|
"duration_time": duration_time,
|
|
|
- "ack_status": row.ack_status
|
|
|
+ "ack_status": row.ack_status,
|
|
|
+ "img_url": img_url
|
|
|
})
|
|
|
|
|
|
# 返回结果
|