1.获取单个职位信息

This commit is contained in:
李伟 2022-08-22 09:43:18 +08:00
parent af2af42bd5
commit e3bcd6b7bc
4 changed files with 34 additions and 12 deletions

View File

@ -451,6 +451,17 @@ async def add_job(
return schemas.Msg(code=200, msg='ok', data='')
@router.post("/find_job")
async def find_job(
request: Request,
data_in: schemas.Find_job,
db: AsyncIOMotorDatabase = Depends(get_database),
) -> schemas.Msg:
"""获取单个职位信息"""
res = await crud.jobs.find_job(db, data_in.job_id)
return schemas.Msg(code=200, msg='ok', data=res)
@router.post("/condition")
async def condition(
request: Request,

View File

@ -42,7 +42,7 @@ class CRUDJobs(CRUDBase):
# 获取对应jobid的信息
async def find_job(self, db: AsyncIOMotorDatabase, job_id):
return await self.find_one(db, {'job_id': job_id})
return await self.find_one(db, {'job_id': job_id},{'_id':0})
# 获取对应job_id的部门和名称
async def find_job_name(self, db: AsyncIOMotorDatabase, job_id):

View File

@ -322,3 +322,9 @@ api:/api/v1/itr/ins_section
#所有的api
api:/api/v1/itr/api_list
请求方式get
#获取单个职位信息
api:/api/v1/itr/find_job
请求方式post
参数:
job_id: str # 职位的唯一id

View File

@ -33,6 +33,7 @@ class Job(BaseModel):
hr_name: List[dict] # 用人经理
interview: List[dict] # 面试官
class Jobs(BaseModel):
job_id: str = None # 职位的唯一id
job_name: str = None # 职位名称
@ -59,8 +60,8 @@ class Jobs(BaseModel):
min_money: int = None # 薪资范围min
max_money: int = None # 薪资范围max
requirement: str = None # 需求描述
hr_name: List[dict] =None # 用人经理
interview: List[str] =None # 面试官
hr_name: List[dict] = None # 用人经理
interview: List[str] = None # 面试官
class Ins_Job(BaseModel):
@ -68,15 +69,15 @@ class Ins_Job(BaseModel):
job_name: str # 职位名称
job_sector: str # 职位部门
job_nature: int # 职位性质
job_priority: str =None # 职位优先级
owner_name: str =None # 渠道
job_priority: str = None # 职位优先级
owner_name: str = None # 渠道
principal: List[dict] # 负责人
patronn: List[dict] # 协助人
start_time: str # 开始招聘时间
function_type: str # 职能类型
filtering_rules: bool=None # 是否使用筛选规则
hiring_needs: bool =None # 是否关联招聘需求
auto_repeater: bool =None # 是否自动转发
filtering_rules: bool = None # 是否使用筛选规则
hiring_needs: bool = None # 是否关联招聘需求
auto_repeater: bool = None # 是否自动转发
cacsi_count: int = 0 # 面试满意度反馈次数
state: bool # 职位招聘状态
job_num: str # 目标招聘人数
@ -84,10 +85,14 @@ class Ins_Job(BaseModel):
education: int # 学历要求
job_rank: str # 职位级别
work_exp: int # 工作经验
report_obj: str =None # 汇报对象
report_obj: str = None # 汇报对象
min_money: int # 薪资范围min
max_money: int # 薪资范围max
requirement: str # 需求描述
hr_name: List[dict] # 用人经理
interview: List[dict] # 面试官
end_time: str #结束招聘时间
end_time: str # 结束招聘时间
class Find_job(BaseModel):
job_id: str # 职位的唯一id