报表分组

This commit is contained in:
Àî×ÚÕñ 2022-08-31 14:18:29 +08:00
parent 1f1f1294be
commit 3e1195febb
2 changed files with 8 additions and 1 deletions

View File

@ -28,5 +28,9 @@ class ApiInterviewTables(CRUDBase):
async def get_tables(self, db: AsyncIOMotorDatabase, where):
return await self.find_many(db, where, {'_id': 0})
# 获取一条报表信息
async def get_one_table(self, db: AsyncIOMotorDatabase, table_id):
return await self.find_one(db, {'table_id': table_id}, {'_id': 0})
api_interview_tables = ApiInterviewTables('interview_tables')

View File

@ -399,7 +399,10 @@ class InterviewDo:
sql += f" and toDate(addHours(`event_time`, 0)) <= '{end_time}'"
# 没有日期条件
else:
sql = f"select {findStr} from HR.resumes where {whereStr}"
if whereStr:
sql = f"select {findStr} from HR.resumes where {whereStr}"
else:
sql = f"select {findStr} from HR.resumes"
print(sql)
return {