Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
675699c7
Commit
675699c7
authored
Dec 20, 2019
by
高宇强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gyq
parent
6e16dfb4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
191 additions
and
9 deletions
+191
-9
laowubao/app/base/api/impl/operator/laoActionApi.js
+171
-0
laowubao/app/base/service/impl/operator/userlabourSve.js
+20
-9
No files found.
laowubao/app/base/api/impl/operator/laoActionApi.js
View file @
675699c7
...
@@ -11,6 +11,7 @@ class LaoActionApi extends APIBase {
...
@@ -11,6 +11,7 @@ class LaoActionApi extends APIBase {
this
.
recruitSve
=
system
.
getObject
(
"service.operator.recruitSve"
);
this
.
recruitSve
=
system
.
getObject
(
"service.operator.recruitSve"
);
this
.
labourSve
=
system
.
getObject
(
"service.operator.labourSve"
);
this
.
labourSve
=
system
.
getObject
(
"service.operator.labourSve"
);
this
.
workloadSve
=
system
.
getObject
(
"service.common.workloadSve"
);
this
.
workloadSve
=
system
.
getObject
(
"service.common.workloadSve"
);
this
.
userlabourSve
=
system
.
getObject
(
"service.operator.userlabourSve"
);
//this.uploadCtl = system.getObject("controller.common.uploadCtl");
//this.uploadCtl = system.getObject("controller.common.uploadCtl");
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
// this.restClient = system.getObject("util.restClient");
// this.restClient = system.getObject("util.restClient");
...
@@ -315,6 +316,157 @@ class LaoActionApi extends APIBase {
...
@@ -315,6 +316,157 @@ class LaoActionApi extends APIBase {
}
}
async
SaveUserLabourInfo
(
obj
)
{
//添加或更新应聘信息,返回添加或更新后的信息
if
(
!
obj
)
{
return
system
.
getResult
(
null
,
"参数不能为空"
);
}
var
parm
=
{};
parm
.
id
=
obj
.
id
;
parm
.
com_id
=
obj
.
com_id
;
if
(
obj
.
labour_id
){
parm
.
labour_id
=
obj
.
labour_id
;
}
parm
.
recruit_id
=
obj
.
recruit_id
;
parm
.
user_id
=
obj
.
user_id
;
if
(
obj
.
ecid
){
parm
.
ecid
=
obj
.
ecid
;
}
if
(
obj
.
apply_stauts
==
"已申请"
)
{
parm
.
apply_stauts
=
10
;
}
else
if
(
obj
.
apply_stauts
==
"邀请面试"
)
{
parm
.
apply_stauts
=
20
;
}
else
if
(
obj
.
apply_stauts
==
"面试成功"
)
{
parm
.
apply_stauts
=
30
;
}
else
if
(
obj
.
apply_stauts
==
"面试失败"
)
{
parm
.
apply_stauts
=
40
;
}
else
if
(
obj
.
apply_stauts
==
"待签约"
)
{
parm
.
apply_stauts
=
50
;
}
else
if
(
obj
.
apply_stauts
==
"签约成功"
)
{
parm
.
apply_stauts
=
60
;
}
if
(
obj
.
interview_time
){
parm
.
interview_time
=
obj
.
interview_time
;
}
if
(
obj
.
sign_at
){
parm
.
sign_at
=
obj
.
sign_at
;
}
if
(
obj
.
contract_url
){
parm
.
contract_url
=
obj
.
contract_url
;
}
var
result
=
await
this
.
userlabourSve
.
SaveUserLabourInfo
(
parm
);
return
system
.
getResult
(
result
.
data
.
dataValues
);
}
async
FindUserLabourInfo
(
obj
){
//获取应聘信息
if
(
!
obj
){
return
system
.
getResult
(
null
,
"参数不能为空"
);
}
var
temp_info
=
{};
var
parm
=
{};
if
(
obj
.
page_size
)
{
parm
.
page_size
=
Number
(
obj
.
page_size
);
}
else
{
parm
.
page_size
=
10
;
}
if
(
obj
.
current_page
)
{
parm
.
current_page
=
Number
(
obj
.
current_page
);
}
else
{
parm
.
current_page
=
1
;
}
if
(
obj
.
id
){
parm
.
id
=
obj
.
id
;
}
if
(
obj
.
user_id
){
parm
.
user_id
=
obj
.
user_id
;
}
if
(
obj
.
labour_id
){
parm
.
labour_id
=
obj
.
labour_id
;
}
if
(
obj
.
recruit_id
){
parm
.
recruit_id
=
obj
.
recruit_id
;
}
if
(
obj
.
labour_user_id
){
parm
.
labour_user_id
=
obj
.
labour_user_id
;
}
if
(
obj
.
ecid
){
parm
.
ecid
=
obj
.
ecid
;
}
if
(
obj
.
apply_stauts
){
if
(
obj
.
apply_stauts
==
"已申请"
){
parm
.
apply_stauts
=
10
;
}
else
if
(
obj
.
apply_stauts
==
"邀请面试"
){
parm
.
apply_stauts
=
20
;
}
else
if
(
obj
.
apply_stauts
==
"面试成功"
){
parm
.
apply_stauts
=
30
;
}
else
if
(
obj
.
apply_stauts
==
"面试失败"
){
parm
.
apply_stauts
=
40
;
}
else
if
(
obj
.
apply_stauts
==
"待签约"
){
parm
.
apply_stauts
=
50
;
}
else
if
(
obj
.
apply_stauts
==
"签约成功"
){
parm
.
apply_stauts
=
60
;
}
}
temp_info
=
await
this
.
userlabourSve
.
finduserlabourByWhere
(
parm
);
if
(
temp_info
.
status
==
0
)
{
try
{
var
cominfo
=
await
this
.
usersSve
.
findListByUserid
(
temp_info
.
data
.
user_id
);
if
(
cominfo
.
status
==
0
){
temp_info
.
data
.
com_name
=
cominfo
.
data
.
com_name
;
}
else
{
temp_info
.
data
.
com_name
=
""
;
}
var
recruiinfo
=
await
this
.
recruitSve
.
findListByUserid
(
temp_info
.
data
.
recruit_id
);
if
(
recruiinfo
.
status
==
0
){
temp_info
.
data
.
recruit_name
=
recruiinfo
.
data
.
recruit_name
;
temp_info
.
data
.
work_address
=
recruiinfo
.
data
.
work_address
;
}
else
{
temp_info
.
data
.
recruit_name
=
""
;
temp_info
.
data
.
work_address
=
""
;
}
var
userinfo
=
await
this
.
usersSve
.
findListByUserid
(
temp_info
.
data
.
labour_user_id
);
if
(
userinfo
.
status
==
0
){
temp_info
.
data
.
phone_no
=
userinfo
.
data
.
phone_no
;
temp_info
.
data
.
user_name
=
userinfo
.
data
.
user_name
;;
temp_info
.
data
.
id_card
=
userinfo
.
data
.
id_card
;;
}
else
{
temp_info
.
data
.
phone_no
=
""
;
temp_info
.
data
.
user_name
=
""
;
temp_info
.
data
.
id_card
=
""
;
}
return
temp_info
;
}
catch
{
return
system
.
getResult
(
null
,
"获取数据失败"
);
}
}
else
{
return
system
.
getResult
(
null
,
"获取数据失败"
);
}
}
async
FindRecruitInfo
(
obj
)
{
//获取招聘信息
async
FindRecruitInfo
(
obj
)
{
//获取招聘信息
if
(
!
obj
)
{
if
(
!
obj
)
{
return
system
.
getResult
(
null
,
"参数不能为空"
);
return
system
.
getResult
(
null
,
"参数不能为空"
);
...
@@ -568,6 +720,25 @@ class LaoActionApi extends APIBase {
...
@@ -568,6 +720,25 @@ class LaoActionApi extends APIBase {
return
await
this
.
recruitSve
.
findRecruitByWhere
(
parm
);
return
await
this
.
recruitSve
.
findRecruitByWhere
(
parm
);
}
}
async
updateUserLabourStatusInfo
(
obj
){
//根据id更新应聘信息
if
(
!
obj
.
id
||
!
obj
.
apply_stauts
){
return
system
.
getResult
(
null
,
"参数错误"
);
}
try
{
var
re
=
await
this
.
userlabourSve
.
updateStatus
(
obj
);
if
(
re
==
1
)
{
return
system
.
getResult
(
re
);
}
else
{
return
system
.
getResult
(
null
,
"更新数据失败"
);
}
}
catch
{
return
system
.
getResult
(
null
,
"更新失败!"
);
}
}
async
updateUserInfo
(
obj
)
{
//根据id更新用户信息
async
updateUserInfo
(
obj
)
{
//根据id更新用户信息
if
(
!
obj
.
id
)
{
if
(
!
obj
.
id
)
{
return
system
.
getResult
(
null
,
"参数错误"
);
return
system
.
getResult
(
null
,
"参数错误"
);
...
...
laowubao/app/base/service/impl/operator/userlabourSve.js
View file @
675699c7
...
@@ -7,21 +7,30 @@ class UserlabourService extends ServiceBase {
...
@@ -7,21 +7,30 @@ class UserlabourService extends ServiceBase {
this
.
userlabourDao
=
system
.
getObject
(
"db.operator.userlabourDao"
);
this
.
userlabourDao
=
system
.
getObject
(
"db.operator.userlabourDao"
);
}
}
async
Save
Recruit
Info
(
params
){
//添加或更新招聘信息
async
Save
UserLabour
Info
(
params
){
//添加或更新招聘信息
var
id
=
params
.
id
;
var
id
=
params
.
id
;
var
userlabour
;
var
userlabour
;
if
(
id
){
if
(
id
){
userlabour
=
await
this
.
dao
.
findById
(
id
);
userlabour
=
await
this
.
dao
.
findById
(
id
);
userlabour
.
user_id
=
params
.
com_id
;
userlabour
.
user_id
=
params
.
com_id
;
userlabour
.
labour_id
=
params
.
labour_id
;
if
(
params
.
labour_id
){
userlabour
.
labour_id
=
params
.
labour_id
;
}
userlabour
.
recruit_id
=
params
.
recruit_id
;
userlabour
.
recruit_id
=
params
.
recruit_id
;
userlabour
.
labour_user_id
=
params
.
user_id
;
userlabour
.
labour_user_id
=
params
.
user_id
;
userlabour
.
ecid
=
params
.
ecid
;
if
(
params
.
ecid
){
userlabour
.
apply_stauts
==
apply_stauts
;
userlabour
.
ecid
=
params
.
ecid
;
userlabour
.
interview_time
=
params
.
interview_time
;
}
userlabour
.
sign_at
=
params
.
sign_at
;
userlabour
.
apply_stauts
=
params
.
apply_stauts
;
userlabour
.
contract_url
=
params
.
contract_url
;
if
(
params
.
interview_time
){
userlabour
.
interview_time
=
params
.
interview_time
;
}
if
(
params
.
sign_at
){
userlabour
.
sign_at
=
params
.
sign_at
;
}
if
(
params
.
contract_url
){
userlabour
.
contract_url
=
params
.
contract_url
;
}
userlabour
=
await
userlabour
.
save
();
userlabour
=
await
userlabour
.
save
();
userlabour
=
await
this
.
dao
.
findById
(
id
);
userlabour
=
await
this
.
dao
.
findById
(
id
);
}
}
...
@@ -98,7 +107,7 @@ class UserlabourService extends ServiceBase {
...
@@ -98,7 +107,7 @@ class UserlabourService extends ServiceBase {
}
}
async
update
s
tatus
(
obj
){
//更新状态信息
async
update
S
tatus
(
obj
){
//更新状态信息
try
{
try
{
var
whereobj
=
{
where
:{
id
:
obj
.
id
}};
var
whereobj
=
{
where
:{
id
:
obj
.
id
}};
var
setobj
=
{};
var
setobj
=
{};
...
@@ -107,6 +116,7 @@ class UserlabourService extends ServiceBase {
...
@@ -107,6 +116,7 @@ class UserlabourService extends ServiceBase {
}
}
else
if
(
obj
.
apply_stauts
==
"邀请面试"
){
else
if
(
obj
.
apply_stauts
==
"邀请面试"
){
setobj
.
apply_stauts
=
20
;
setobj
.
apply_stauts
=
20
;
where
.
interview_time
=
(
new
Date
()).
Format
(
"yyyy-MM-dd"
);
}
}
else
if
(
obj
.
apply_stauts
==
"面试成功"
){
else
if
(
obj
.
apply_stauts
==
"面试成功"
){
setobj
.
apply_stauts
=
30
;
setobj
.
apply_stauts
=
30
;
...
@@ -119,6 +129,7 @@ class UserlabourService extends ServiceBase {
...
@@ -119,6 +129,7 @@ class UserlabourService extends ServiceBase {
}
}
else
if
(
obj
.
apply_stauts
==
"签约成功"
){
else
if
(
obj
.
apply_stauts
==
"签约成功"
){
setobj
.
apply_stauts
=
60
;
setobj
.
apply_stauts
=
60
;
where
.
sign_at
=
(
new
Date
()).
Format
(
"yyyy-MM-dd"
);
}
}
var
self
=
this
;
var
self
=
this
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment