1.优化职位显示
This commit is contained in:
parent
b810dcdbd6
commit
c163d02176
@ -278,23 +278,30 @@ async def interview_insert(
|
||||
async def event_edit(
|
||||
request: Request,
|
||||
data_in: schemas.Jobs = None,
|
||||
db: AsyncIOMotorDatabase = Depends(get_database)
|
||||
db: AsyncIOMotorDatabase = Depends(get_database),
|
||||
ckdb: CKDrive = Depends(get_ck_db)
|
||||
) -> schemas.Msg:
|
||||
"""获取职位名称"""
|
||||
# 获取对应条件的职位
|
||||
res = await crud.jobs.all_fields(db, data_in)
|
||||
# 获取职位数量
|
||||
num = len(res)
|
||||
|
||||
job = []
|
||||
for i in res:
|
||||
# 获取职位名称
|
||||
job_list = []
|
||||
job_list.append(i['job_id'])
|
||||
# 查询对应职位id入职多少人
|
||||
sql = f"""
|
||||
select count(job_id) from HR.resumes where job_id = '{i['job_id']}' and interview_stage = 7
|
||||
"""
|
||||
num=await ckdb.execute(sql)
|
||||
|
||||
job_list.append(i['job_name'])
|
||||
job_list.append(i['job_sector'])
|
||||
job_list.append(i['principal'])
|
||||
job_list.append(i['owner_name'])
|
||||
job_list.append(num)
|
||||
job_list.append(i['job_num'])
|
||||
job.append(job_list)
|
||||
data = {
|
||||
|
Loading…
Reference in New Issue
Block a user