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
3f2761bd
Commit
3f2761bd
authored
Dec 15, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
aaa393d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
274 additions
and
157 deletions
+274
-157
laowubao/app/base/api/impl/operator/laoActionApi.js
+72
-15
laowubao/app/base/api/impl/operator/xbgApi.js
+202
-142
No files found.
laowubao/app/base/api/impl/operator/laoActionApi.js
View file @
3f2761bd
...
...
@@ -18,6 +18,49 @@ class LaoActionApi extends APIBase {
this
.
vcodePrev
=
"lwb_vcode_"
;
this
.
testPhones
=
[
'13691046554'
,
'13333333333'
];
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
companyConfig
=
{
yd
:
{
signCompanyIds
:
[
10173
],
payCompanyIds
:
[
'1152185172836229121'
,
'1152186076306087937'
,
'1165922409285480450'
,
'1169516233595670529'
,
'1174219506669584386'
,
'1197064800073707522'
,
'1199605424102690818'
],
compantInfo
:
{
companyName
:
"上海韵达货运有限公司"
,
taxType
:
"一般纳税人"
,
contactName
:
"陈梁"
,
contactEmail
:
"chenliang8725@yundasys.com"
,
contactAddr
:
"上海市青浦区赵巷镇盈港东路6679号"
,
bankAccount
:
"上海韵达货运有限公司"
,
openBank
:
"邮政储蓄银行青浦支行"
,
bankno
:
"100360752790012735"
,
sign_body
:
"舟山兰和科技有限公司"
,
signBeginTime
:
"2019-08-26"
,
signEndTime
:
"2020-08-26"
,
}
},
tfb
:
{
signCompanyIds
:
[
11410
],
payCompanyIds
:
[
'1187270470698082306'
,
'1187272600083308546'
,
'1187274198010056705'
,
'1202100969987661826'
],
compantInfo
:
{
companyName
:
"杭州淘粉吧网络技术股份有限公司"
,
taxType
:
"一般纳税人"
,
contactName
:
"王萍"
,
contactEmail
:
"wangping@taofen8.com"
,
contactAddr
:
"浙江省杭州市西湖区西斗门路9号福地创业园1号楼2楼"
,
bankAccount
:
"杭州淘粉吧网络技术股份有限公司"
,
openBank
:
"杭州银行学院路支行"
,
bankno
:
"3301040160000822687"
,
sign_body
:
"舟山兰和科技有限公司"
,
signBeginTime
:
"2019-10-24"
,
signEndTime
:
"2020-10-24"
,
}
}
}
this
.
userConfig
=
{
29
:
this
.
companyConfig
.
yd
,
30
:
this
.
companyConfig
.
tfb
}
}
async
test
(
pobj
,
query
)
{
...
...
@@ -800,6 +843,9 @@ class LaoActionApi extends APIBase {
// 工作量确认单
async
paramXlsx
(
obj
)
{
if
(
!
obj
.
userId
)
{
return
system
.
getResult
(
null
,
"用户未登录"
);
}
try
{
var
rs
=
await
this
.
workloadSve
.
paramXlsx
(
obj
.
userId
,
obj
.
ossUrl
);
if
(
rs
.
code
==
0
)
{
...
...
@@ -814,6 +860,10 @@ class LaoActionApi extends APIBase {
// 列表
async
workLoadPage
(
obj
)
{
if
(
!
obj
.
userId
)
{
return
system
.
getResult
(
null
,
"用户未登录"
);
}
try
{
obj
.
status
=
0
;
var
rs
=
await
this
.
workloadSve
.
pageByCondition
(
obj
);
...
...
@@ -825,6 +875,10 @@ class LaoActionApi extends APIBase {
}
async
workLoadHistoryInfo
(
obj
)
{
if
(
!
obj
.
userId
)
{
return
system
.
getResult
(
null
,
"用户未登录"
);
}
try
{
var
rs
=
await
this
.
workloadSve
.
historyInfo
(
obj
);
return
system
.
getResultSuccess
(
rs
);
...
...
@@ -836,6 +890,10 @@ class LaoActionApi extends APIBase {
// 确认/全部
async
workloadConfirm
(
obj
)
{
if
(
!
obj
.
userId
)
{
return
system
.
getResult
(
null
,
"用户未登录"
);
}
try
{
var
rs
=
await
this
.
workloadSve
.
workloadConfirm
(
obj
);
return
system
.
getResultSuccess
(
rs
);
...
...
@@ -846,6 +904,10 @@ class LaoActionApi extends APIBase {
}
async
workloadTotal
(
obj
)
{
if
(
!
obj
.
userId
)
{
return
system
.
getResult
(
null
,
"用户未登录"
);
}
try
{
obj
.
pageSize
=
1
;
obj
.
status
=
1
;
...
...
@@ -863,6 +925,10 @@ class LaoActionApi extends APIBase {
// 确认列表
async
workloadHistory
(
obj
)
{
if
(
!
obj
.
userId
)
{
return
system
.
getResult
(
null
,
"用户未登录"
);
}
try
{
obj
.
status
=
0
;
var
rs
=
await
this
.
workloadSve
.
historyPage
(
obj
);
...
...
@@ -874,22 +940,13 @@ class LaoActionApi extends APIBase {
}
// 企业信息,家属拒
async
companyInfo
()
{
async
companyInfo
(
qobj
)
{
try
{
let
companyInfo
=
{
companyName
:
"上海韵达货运有限公司"
,
taxType
:
"一般纳税人"
,
contactName
:
"陈梁"
,
contactEmail
:
"chenliang8725@yundasys.com"
,
contactAddr
:
"上海市青浦区赵巷镇盈港东路6679号"
,
bankAccount
:
"上海韵达货运有限公司"
,
openBank
:
"邮政储蓄银行青浦支行"
,
bankno
:
"100360752790012735"
,
sign_body
:
"舟山兰和科技有限公司"
,
signBeginTime
:
"2019-08-26"
,
signEndTime
:
"2020-08-26"
,
};
return
system
.
getResultSuccess
(
companyInfo
);
let
config
=
this
.
userConfig
[
qobj
.
userId
];
if
(
!
config
)
{
return
system
.
getResultSuccess
({});
}
return
system
.
getResultSuccess
(
config
.
companyInfo
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getErrResult2
(
"您的网络不稳, 请稍后重试"
)
...
...
laowubao/app/base/api/impl/operator/xbgApi.js
View file @
3f2761bd
...
...
@@ -3,167 +3,227 @@ const apiBase = require("../../api.base");
class
XbgApi
extends
apiBase
{
constructor
()
{
super
();
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
url
=
"https://bpohhr.gongsibao.com/api/xbgApi/"
;
this
.
testCompanyIds
=
12
;
this
.
ecompanyId
=
'1103817785420820481'
;
this
.
recruitSve
=
system
.
getObject
(
"service.operator.recruitSve"
);
constructor
()
{
super
();
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
url
=
"https://bpohhr.gongsibao.com/api/xbgApi/"
;
this
.
testCompanyIds
=
12
;
this
.
ecompanyId
=
'1103817785420820481'
;
this
.
recruitSve
=
system
.
getObject
(
"service.operator.recruitSve"
);
this
.
companyConfig
=
{
yd
:
{
signCompanyIds
:
[
10173
],
payCompanyIds
:
[
'1152185172836229121'
,
'1152186076306087937'
,
'1165922409285480450'
,
'1169516233595670529'
,
'1174219506669584386'
,
'1197064800073707522'
,
'1199605424102690818'
],
compantInfo
:
{
companyName
:
"上海韵达货运有限公司"
,
taxType
:
"一般纳税人"
,
contactName
:
"陈梁"
,
contactEmail
:
"chenliang8725@yundasys.com"
,
contactAddr
:
"上海市青浦区赵巷镇盈港东路6679号"
,
bankAccount
:
"上海韵达货运有限公司"
,
openBank
:
"邮政储蓄银行青浦支行"
,
bankno
:
"100360752790012735"
,
sign_body
:
"舟山兰和科技有限公司"
,
signBeginTime
:
"2019-08-26"
,
signEndTime
:
"2020-08-26"
,
}
},
tfb
:
{
signCompanyIds
:
[
11410
],
payCompanyIds
:
[
'1187270470698082306'
,
'1187272600083308546'
,
'1187274198010056705'
,
'1202100969987661826'
],
compantInfo
:
{
companyName
:
"杭州淘粉吧网络技术股份有限公司"
,
taxType
:
"一般纳税人"
,
contactName
:
"王萍"
,
contactEmail
:
"wangping@taofen8.com"
,
contactAddr
:
"浙江省杭州市西湖区西斗门路9号福地创业园1号楼2楼"
,
bankAccount
:
"杭州淘粉吧网络技术股份有限公司"
,
openBank
:
"杭州银行学院路支行"
,
bankno
:
"3301040160000822687"
,
sign_body
:
"舟山兰和科技有限公司"
,
signBeginTime
:
"2019-10-24"
,
signEndTime
:
"2020-10-24"
,
}
}
}
async
test
(
pobj
,
query
)
{
return
system
.
getResultSuccess
({
hello
:
"ok"
});
this
.
userConfig
=
{
29
:
this
.
companyConfig
.
yd
,
30
:
this
.
companyConfig
.
tfb
}
async
setCompanyIds
(
qobj
)
{
// qobj.id
// 查ecmpanyIds
qobj
.
ecompany_id
=
this
.
testCompanyIds
;
}
async
test
(
pobj
,
query
)
{
return
system
.
getResultSuccess
({
hello
:
"ok"
});
}
async
setCompanyIds
(
qobj
)
{
var
config
=
this
.
this
.
userConfig
[
qobj
.
userId
];
if
(
!
config
)
{
return
;
}
//合同模板
async
etemplateList
(
qobj
)
{
qobj
.
ecompany_id
=
config
.
signCompanyIds
;
}
this
.
setCompanyIds
(
qobj
);
var
params
=
qobj
||
{};
if
(
!
params
.
ecompany_id
)
{
return
system
.
getResult
(
"参数ecompany_id为空"
)
}
try
{
var
params
=
qobj
||
{};
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"etemplateList"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
async
setPayCompanyIds
(
qobj
)
{
var
config
=
this
.
this
.
userConfig
[
qobj
.
userId
];
if
(
!
config
)
{
return
;
}
qobj
.
busiIds
=
config
.
payCompanyIds
;
}
//已签合同
async
acontractList
(
qobj
)
{
this
.
setCompanyIds
(
qobj
);
var
params
=
qobj
||
{};
if
(
!
params
.
ecompany_id
)
{
return
system
.
getResult
(
"参数ecompany_id为空"
)
}
try
{
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"acontractList"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
}
//合同模板
async
etemplateList
(
qobj
)
{
var
params
=
qobj
||
{};
this
.
setCompanyIds
(
params
);
//纳税人人员
async
ratepayingListToPe
(
qobj
)
{
var
params
=
qobj
||
{};
params
.
ecompany_id
=
this
.
ecompanyId
;
if
(
!
params
.
ecompany_id
)
{
return
system
.
getResult
(
"参数ecompany_id为空"
)
}
try
{
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"ratepayingListToPe"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
if
(
!
params
.
ecompany_id
||
params
.
ecompany_id
.
length
==
0
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[]})
}
//纳税人按月
async
ratepayingListToMonth
(
qobj
)
{
var
params
=
qobj
||
{};
params
.
ecompany_id
=
this
.
ecompanyId
;
if
(
!
params
.
ecompany_id
)
{
return
system
.
getResult
(
"参数ecompany_id为空"
)
}
try
{
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"ratepayingListToMonth"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
try
{
var
params
=
qobj
||
{};
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"etemplateList"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
//纳税人个人详情
async
ratepayingListToOne
(
qobj
)
{
var
params
=
qobj
||
{};
params
.
ecompany_id
=
this
.
ecompanyId
;
if
(
!
params
.
ecompany_id
)
{
return
system
.
getResult
(
"参数ecompany_id为空"
)
}
try
{
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"ratepayingListToOne"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
}
//已签合同
async
acontractList
(
qobj
)
{
var
params
=
qobj
||
{};
this
.
setCompanyIds
(
params
);
if
(
!
params
.
ecompany_id
||
params
.
ecompany_id
.
length
==
0
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[]})
}
try
{
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"acontractList"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
}
//纳税人人员
async
ratepayingListToPe
(
qobj
)
{
var
params
=
qobj
||
{};
this
.
setPayCompanyIds
(
params
);
if
(
!
params
.
busiIds
||
params
.
busiIds
.
length
==
0
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[]})
}
//数据概览
async
dataOverview
(
qobj
)
{
var
params
=
qobj
||
{};
params
.
ecompany_id
=
this
.
ecompanyId
;
if
(
!
params
.
ecompany_id
)
{
return
system
.
getResult
(
"参数ecompany_id为空"
)
}
try
{
var
recruit_info
=
await
this
.
recruitSve
.
findAllList
(
params
);
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"dataOverview"
);
var
resut
=
JSON
.
parse
(
rs
.
stdout
);
var
rcount
=
0
;
if
(
recruit_info
.
status
==
0
){
rcount
=
recruit_info
.
data
.
count
;
}
resut
.
data
[
"recruit_count"
]
=
rcount
;
return
resut
;
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
try
{
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"ratepayingListToPe"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
}
//纳税人按月
async
ratepayingListToMonth
(
qobj
)
{
var
params
=
qobj
||
{};
this
.
setPayCompanyIds
(
params
);
if
(
!
params
.
busiIds
||
params
.
busiIds
.
length
==
0
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[]})
}
try
{
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"ratepayingListToMonth"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
}
//纳税人个人详情
async
ratepayingListToOne
(
qobj
)
{
exam
()
{
return
"xxx"
;
var
params
=
qobj
||
{};
this
.
setPayCompanyIds
(
params
);
if
(
!
params
.
busiIds
||
params
.
busiIds
.
length
==
0
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[]})
}
classDesc
()
{
return
{
groupName
:
"auth"
,
groupDesc
:
"认证相关的包"
,
name
:
"AccessAuthAPI"
,
desc
:
"关于认证的类"
,
exam
:
""
,
};
try
{
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"ratepayingListToOne"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
methodDescs
()
{
return
[{
methodDesc
:
"生成访问token"
,
methodName
:
"getAccessKey"
,
paramdescs
:
[{
paramDesc
:
"访问appkey"
,
paramName
:
"appkey"
,
paramType
:
"string"
,
defaultValue
:
"x"
,
},
{
paramDesc
:
"访问secret"
,
paramName
:
"secret"
,
paramType
:
"string"
,
defaultValue
:
null
,
}
],
rtnTypeDesc
:
"xxxx"
,
rtnType
:
"xxx"
}];
}
//数据概览
async
dataOverview
(
qobj
)
{
var
params
=
qobj
||
{};
this
.
setPayCompanyIds
(
params
);
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
rcount
=
0
;
if
(
recruit_info
.
status
==
0
)
{
rcount
=
recruit_info
.
data
.
count
;
}
resut
.
data
[
"recruit_count"
]
=
rcount
;
return
resut
;
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
"接口异常"
);
}
}
exam
()
{
return
"xxx"
;
}
classDesc
()
{
return
{
groupName
:
"auth"
,
groupDesc
:
"认证相关的包"
,
name
:
"AccessAuthAPI"
,
desc
:
"关于认证的类"
,
exam
:
""
,
};
}
methodDescs
()
{
return
[{
methodDesc
:
"生成访问token"
,
methodName
:
"getAccessKey"
,
paramdescs
:
[{
paramDesc
:
"访问appkey"
,
paramName
:
"appkey"
,
paramType
:
"string"
,
defaultValue
:
"x"
,
},
{
paramDesc
:
"访问secret"
,
paramName
:
"secret"
,
paramType
:
"string"
,
defaultValue
:
null
,
}
],
rtnTypeDesc
:
"xxxx"
,
rtnType
:
"xxx"
}];
}
}
module
.
exports
=
XbgApi
;
...
...
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