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
d83af709
Commit
d83af709
authored
Dec 15, 2019
by
王昆
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'laowubao' of gitlab.gongsibao.com:jiangyong/zhichan into laowubao
parents
3f2761bd
f23d20c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
185 additions
and
2 deletions
+185
-2
laowubao/app/base/api/impl/operator/laoActionApi.js
+185
-2
No files found.
laowubao/app/base/api/impl/operator/laoActionApi.js
View file @
d83af709
...
...
@@ -674,6 +674,188 @@ class LaoActionApi extends APIBase {
}
}
<<<<<<<
HEAD
async
ParamRecruitExcel
(
obj
){
if
(
!
obj
.
userId
||
!
obj
.
ossUrl
){
return
system
.
getResult
(
null
,
"参数不能为空"
);
}
var
userId
=
obj
.
userId
;
var
ossurl
=
obj
.
ossUrl
;
var
dataList
=
[];
var
filePath
=
"/tmp/recruit_info_"
+
userId
+
".xlsx"
;
try
{
await
this
.
restClient
.
execDownload
(
"'"
+
ossurl
+
"'"
,
filePath
);
var
sheets
=
xlsx
.
parse
(
filePath
);
var
rows
=
sheets
[
0
].
data
;
for
(
var
i
=
5
;
i
<
rows
.
length
;
i
++
)
{
var
cells
=
rows
[
i
];
if
(
cells
[
0
]){
var
data
=
{};
data
.
recruit_name
=
""
+
cells
[
1
];
data
.
recruit_type
=
""
+
cells
[
2
];
data
.
recruit_count
=
""
+
cells
[
3
];
data
.
pay_name
=
""
+
cells
[
4
];
if
(
data
.
pay_name
==
"月薪"
){
data
.
pay_type
=
1
;
}
else
if
(
data
.
pay_name
==
"日薪"
){
data
.
pay_type
=
2
;
}
else
if
(
data
.
pay_name
==
"时薪"
){
data
.
pay_type
=
3
;
}
else
{
data
.
pay_type
=
null
;
}
data
.
pay_unit
=
null
;
//少一个薪资单价
var
temp
=
""
+
cells
[
5
];
if
(
temp
&&
temp
!=
"—"
&&
temp
!=
"面议"
&&
temp
!=
"undefined"
){
data
.
basic_salary
=
Number
(
temp
)
*
100
;
}
else
{
data
.
basic_salary
=
null
;
}
temp
=
""
+
cells
[
6
];
if
(
temp
&&
temp
!=
"—"
&&
temp
!=
"面议"
&&
temp
!=
"undefined"
){
data
.
compre_salary
=
Number
(
temp
)
*
100
;
}
else
{
data
.
compre_salary
=
null
;
}
temp
=
""
+
cells
[
7
];
if
(
temp
&&
temp
!=
"—"
&&
temp
!=
"undefined"
){
data
.
work_duration
=
Number
(
temp
);
}
else
{
data
.
work_duration
=
null
;
}
temp
=
""
+
cells
[
8
];
if
(
temp
==
"面议"
){
data
.
rfee_type
=
0
;
}
else
if
(
temp
==
"月返"
){
data
.
rfee_type
=
1
;
}
else
if
(
temp
==
"日返"
){
data
.
rfee_type
=
2
;
}
else
if
(
temp
==
"时返"
){
data
.
rfee_type
=
3
;
}
else
if
(
temp
==
"一次返"
){
data
.
rfee_type
=
4
;
}
else
{
data
.
rfee_type
=
null
;
}
temp
=
""
+
cells
[
9
];
if
(
temp
&&
temp
!=
"—"
&&
temp
!=
"undefined"
){
var
arr
=
temp
.
split
(
"/"
);
if
(
arr
.
length
==
2
){
data
.
rfee_duration
=
arr
[
0
];
data
.
rfee_time
=
arr
[
1
];
}
else
{
data
.
rfee_duration
=
null
;
data
.
rfee_time
=
null
;
}
}
else
{
data
.
rfee_duration
=
null
;
data
.
rfee_time
=
null
;
}
temp
=
""
+
cells
[
10
];
if
(
temp
&&
temp
!=
"undefined"
){
data
.
age_range
=
temp
;
}
else
{
data
.
age_range
=
null
;
}
temp
=
""
+
cells
[
11
];
if
(
temp
&&
temp
!=
"undefined"
){
data
.
work_address
=
temp
;
}
else
{
data
.
work_address
=
null
;
}
data
.
publish_date
=
(
new
Date
()).
Format
(
"yyyy-MM-dd"
);
temp
=
""
+
cells
[
12
];
if
(
temp
&&
temp
!=
"undefined"
){
if
(
temp
==
"长期"
){
data
.
end_date
=
"1970-01-01"
;
}
else
{
data
.
end_date
=
temp
;
}
}
else
{
data
.
end_date
=
null
;
}
temp
=
""
+
cells
[
14
];
if
(
temp
&&
temp
!=
"undefined"
){
data
.
pic_path
=
temp
;
}
else
{
data
.
pic_path
=
null
;
}
console
.
log
(
"###############"
+
data
.
pic_path
+
"#############"
);
temp
=
""
+
cells
[
15
];
if
(
temp
&&
temp
!=
"undefined"
){
data
.
recrui_require
=
temp
;
}
else
{
data
.
recrui_require
=
null
;
}
temp
=
""
+
cells
[
16
];
if
(
temp
&&
temp
!=
"undefined"
){
data
.
phone_no
=
temp
;
}
else
{
data
.
phone_no
=
null
;
//data.user_id = null;
}
temp
=
""
+
cells
[
14
];
if
(
temp
&&
temp
!=
"undefined"
){
var
parm
=
{
user_name
:
temp
,
find_type
:
0
,
real_status
:
"企业已认证"
}
var
user_info
=
await
this
.
usersSve
.
findUserInfo
(
parm
);
if
(
user_info
.
status
==
-
1
)
{
data
.
user_id
=
null
;
}
else
{
if
(
user_info
.
count
>
0
){
data
.
user_id
=
user_info
.
rows
[
0
].
id
;
}
else
{
data
.
user_id
=
null
;
}
}
}
else
{
data
.
user_id
=
null
;
}
data
.
counter_mark
=
null
;
data
.
cur_type
=
1
;
data
.
cur_status
=
"展示中"
;
dataList
.
push
(
data
)
}
=======
async
ParamRecruitExcel
(
obj
)
{
if
(
!
obj
.
userId
||
!
obj
.
ossUrl
)
{
return
system
.
getResult
(
null
,
"参数不能为空"
);
...
...
@@ -772,6 +954,7 @@ class LaoActionApi extends APIBase {
data
.
end_date
=
"1970-01-01"
;
}
else
{
data
.
end_date
=
temp
;
>>>>>>>
aaa393d880fbd1c02cf33d739ab56187e35bce65
}
}
else
{
data
.
end_date
=
null
;
...
...
@@ -1019,10 +1202,10 @@ class LaoActionApi extends APIBase {
module
.
exports
=
LaoActionApi
;
//
var tesk = new LaoActionApi();
var
tesk
=
new
LaoActionApi
();
// var parm = {
// userId:4,
// ossUrl:"https://gsb-zc.oss-cn-beijing.aliyuncs.com/
1111
.xlsx"
// ossUrl:"https://gsb-zc.oss-cn-beijing.aliyuncs.com/
/zc_wxapplet_1576396810278
.xlsx"
// //id:2,
// //cur_status:"已过期"
// //memo_text:"sssssssss"
...
...
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