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
9172b130
Commit
9172b130
authored
Dec 16, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
0da795ac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
19 deletions
+44
-19
laowubao/app/base/api/impl/operator/laoActionApi.js
+1
-1
laowubao/app/base/api/impl/operator/xbgApi.js
+30
-16
laowubao/app/base/db/models/common/workload.js
+4
-0
laowubao/app/base/service/impl/common/workloadSve.js
+3
-1
laowubao/app/base/service/impl/operator/recruitSve.js
+6
-1
No files found.
laowubao/app/base/api/impl/operator/laoActionApi.js
View file @
9172b130
...
...
@@ -38,7 +38,7 @@ class LaoActionApi extends APIBase {
signBeginTime
:
"2019-08-26"
,
signEndTime
:
"2020-08-26"
,
contract_url
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_247111576475725735201916135525735contract_yd.pdf"
,
business_license
:
"
https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_142111576475271657201916134751657bl_tfb.jpg
"
,
business_license
:
""
,
}
},
tfb
:
{
...
...
laowubao/app/base/api/impl/operator/xbgApi.js
View file @
9172b130
...
...
@@ -6,8 +6,8 @@ class XbgApi extends apiBase {
constructor
()
{
super
();
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
//
this.url = "http://192.168.18.125:3000/api/xbgApi/";
this
.
url
=
"https://bpohhr.gongsibao.com/api/xbgApi/"
;
this
.
url
=
"http://192.168.18.125:3000/api/xbgApi/"
;
//
this.url = "https://bpohhr.gongsibao.com/api/xbgApi/";
this
.
testCompanyIds
=
12
;
this
.
ecompanyId
=
'1103817785420820481'
;
this
.
recruitSve
=
system
.
getObject
(
"service.operator.recruitSve"
);
...
...
@@ -28,8 +28,13 @@ class XbgApi extends apiBase {
signBeginTime
:
"2019-08-26"
,
signEndTime
:
"2020-08-26"
,
contract_url
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_247111576475725735201916135525735contract_yd.pdf"
,
business_license
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_142111576475271657201916134751657bl_yd.jpg"
,
}
business_license
:
""
,
},
dataView
:
{
actual_amt
:
"157073.09"
,
contractCount
:
11804
,
income_tax
:
"0"
,
},
},
tfb
:
{
signCompanyIds
:
[
11410
],
...
...
@@ -48,7 +53,12 @@ class XbgApi extends apiBase {
signEndTime
:
"2020-10-24"
,
contract_url
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_59111576475747388201916135547388contract_tfb.pdf"
,
business_license
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_142111576475271657201916134751657bl_tfb.jpg"
,
}
},
dataView
:
{
actual_amt
:
"197701.2"
,
contractCount
:
16
,
income_tax
:
"0"
,
},
}
}
...
...
@@ -168,24 +178,28 @@ class XbgApi extends apiBase {
//数据概览
async
dataOverview
(
qobj
)
{
var
params
=
qobj
||
{};
this
.
setPayCompanyIds
(
params
);
var
config
=
this
.
userConfig
[
qobj
.
userId
];
if
(
!
config
)
{
return
{};
}
qobj
.
busiIds
=
config
.
payCompanyIds
;
try
{
var
recruit_info
=
await
this
.
recruitSve
.
findAllList
(
params
);
var
resut
=
{};
if
(
!
params
.
busiIds
||
params
.
busiIds
.
length
==
0
)
{
resut
=
{
contractCount
:
0
,
actual_amt
:
0
,
income_tax
:
0
};
}
else
{
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"dataOverview"
);
resut
=
JSON
.
parse
(
rs
.
stdout
);
}
//
var resut = {};
//
if (!params.busiIds || params.busiIds.length == 0) {
//
resut = {contractCount: 0, actual_amt: 0, income_tax: 0};
//
} else {
//
var rs = await this.restClient.execPost(params, this.url + "dataOverview");
//
resut = JSON.parse(rs.stdout);
//
}
var
dv
=
config
.
dataView
||
{
actual_amt
:
0
,
contractCount
:
0
,
income_tax
:
0
};
var
rcount
=
0
;
if
(
recruit_info
.
status
==
0
)
{
rcount
=
recruit_info
.
data
.
count
;
}
resut
.
data
[
"recruit_count"
]
=
rcount
;
return
resut
;
dv
.
recruit_count
=
rcount
;
return
system
.
getResultSuccess
(
dv
)
;
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
...
...
laowubao/app/base/db/models/common/workload.js
View file @
9172b130
...
...
@@ -12,6 +12,10 @@ module.exports = (db, DataTypes) => {
created_time
:
DataTypes
.
DATE
,
updated_time
:
DataTypes
.
DATE
,
workload
:
DataTypes
.
STRING
,
status
:
{
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
},
},{
paranoid
:
true
,
//假的删除
underscored
:
true
,
...
...
laowubao/app/base/service/impl/common/workloadSve.js
View file @
9172b130
...
...
@@ -79,6 +79,7 @@ class WorkloadService extends ServiceBase {
let
list
=
await
this
.
dao
.
pageHistory
(
params
);
if
(
list
)
{
for
(
var
item
of
list
)
{
item
.
send_amount
=
parseFloat
(
Number
(
item
.
send_amount
||
0
).
toFixed
(
2
)).
toString
();
this
.
handleDate
(
item
,
[
'created_time'
,
'updated_time'
],
'YYYY-MM-DD'
);
this
.
handleDate
(
item
,
[
'updated_at'
,
'created_at'
],
'YYYY-MM-DD HH:mm:ss'
);
}
...
...
@@ -141,9 +142,10 @@ class WorkloadService extends ServiceBase {
data
.
created_time
=
new
Date
(
1900
,
0
,
cells
[
6
]);
data
.
updated_time
=
new
Date
(
1900
,
0
,
cells
[
7
]);
data
.
workload
=
this
.
trim
(
cells
[
8
]);
data
.
status
=
0
;
resu
.
push
(
data
)
}
await
this
.
dao
.
model
.
bulkCreate
(
resu
,
{
fields
:
[
"user
name"
,
"iphone"
,
"id_nu"
,
"card_nu"
,
"send_amount"
,
"created_time"
,
"updated_time"
,
"workload
"
]});
await
this
.
dao
.
model
.
bulkCreate
(
resu
,
{
fields
:
[
"user
_id"
,
"username"
,
"iphone"
,
"id_nu"
,
"card_nu"
,
"send_amount"
,
"created_time"
,
"updated_time"
,
"workload"
,
"status
"
]});
result
.
code
=
1
;
result
.
msg
=
"上传成功"
;
return
result
;
...
...
laowubao/app/base/service/impl/operator/recruitSve.js
View file @
9172b130
...
...
@@ -54,11 +54,16 @@ class RecruitService extends ServiceBase {
var
pageSize
=
obj
.
page_size
||
10
;
var
currentPage
=
obj
.
current_page
||
1
;
try
{
var
where
=
{};
if
(
obj
.
userId
)
{
where
.
user_id
=
obj
.
userId
;
}
var
sqlwhere
=
{
order
:
[[
"publish_date"
,
'desc'
]],
limit
:
pageSize
,
offset
:
(
currentPage
-
1
)
*
pageSize
,
raw
:
true
raw
:
true
,
where
:
where
};
//var list = await this.dao.model.findAll(sqlwhere);
var
list
=
await
this
.
dao
.
model
.
findAndCountAll
(
sqlwhere
)
||
[];
...
...
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