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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
163 additions
and
46 deletions
+163
-46
laowubao/app/base/api/impl/operator/laoActionApi.js
+72
-15
laowubao/app/base/api/impl/operator/xbgApi.js
+91
-31
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
...
...
@@ -10,6 +10,47 @@ class XbgApi extends apiBase {
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"
,
}
}
}
this
.
userConfig
=
{
29
:
this
.
companyConfig
.
yd
,
30
:
this
.
companyConfig
.
tfb
}
}
async
test
(
pobj
,
query
)
{
...
...
@@ -17,22 +58,34 @@ class XbgApi extends apiBase {
hello
:
"ok"
});
}
async
setCompanyIds
(
qobj
)
{
// qobj.id
// 查ecmpanyIds
qobj
.
ecompany_id
=
this
.
testCompanyIds
;
var
config
=
this
.
this
.
userConfig
[
qobj
.
userId
];
if
(
!
config
)
{
return
;
}
qobj
.
ecompany_id
=
config
.
signCompanyIds
;
}
async
setPayCompanyIds
(
qobj
)
{
var
config
=
this
.
this
.
userConfig
[
qobj
.
userId
];
if
(
!
config
)
{
return
;
}
qobj
.
busiIds
=
config
.
payCompanyIds
;
}
//合同模板
async
etemplateList
(
qobj
)
{
this
.
setCompanyIds
(
qobj
);
var
params
=
qobj
||
{};
if
(
!
params
.
ecompany_id
)
{
return
system
.
getResult
(
"参数ecompany_id为空"
)
this
.
setCompanyIds
(
params
);
if
(
!
params
.
ecompany_id
||
params
.
ecompany_id
.
length
==
0
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[]})
}
try
{
var
params
=
qobj
||
{};
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"etemplateList"
);
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"etemplateList"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -42,13 +95,13 @@ class XbgApi extends apiBase {
//已签合同
async
acontractList
(
qobj
)
{
this
.
setCompanyIds
(
qobj
);
var
params
=
qobj
||
{};
if
(
!
params
.
ecompany_id
)
{
return
system
.
getResult
(
"参数ecompany_id为空"
)
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"
);
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"acontractList"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -59,12 +112,13 @@ class XbgApi extends apiBase {
//纳税人人员
async
ratepayingListToPe
(
qobj
)
{
var
params
=
qobj
||
{};
params
.
ecompany_id
=
this
.
ecompanyId
;
if
(
!
params
.
ecompany_id
)
{
return
system
.
getResult
(
"参数ecompany_id为空"
)
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
+
"ratepayingListToPe"
);
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"ratepayingListToPe"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -75,12 +129,12 @@ class XbgApi extends apiBase {
//纳税人按月
async
ratepayingListToMonth
(
qobj
)
{
var
params
=
qobj
||
{};
params
.
ecompany_id
=
this
.
ecompanyId
;
if
(
!
params
.
ecompany_id
)
{
return
system
.
getResult
(
"参数ecompany_id为空"
)
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"
);
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"ratepayingListToMonth"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -90,13 +144,14 @@ class XbgApi extends apiBase {
//纳税人个人详情
async
ratepayingListToOne
(
qobj
)
{
var
params
=
qobj
||
{};
params
.
ecompany_id
=
this
.
ecompanyId
;
if
(
!
params
.
ecompany_id
)
{
return
system
.
getResult
(
"参数ecompany_id为空"
)
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
+
"ratepayingListToOne"
);
var
rs
=
await
this
.
restClient
.
execPost
(
params
,
this
.
url
+
"ratepayingListToOne"
);
return
JSON
.
parse
(
rs
.
stdout
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -107,17 +162,20 @@ class XbgApi extends apiBase {
//数据概览
async
dataOverview
(
qobj
)
{
var
params
=
qobj
||
{};
params
.
ecompany_id
=
this
.
ecompanyId
;
this
.
setPayCompanyIds
(
params
)
;
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
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
)
{
if
(
recruit_info
.
status
==
0
)
{
rcount
=
recruit_info
.
data
.
count
;
}
resut
.
data
[
"recruit_count"
]
=
rcount
;
...
...
@@ -133,6 +191,7 @@ class XbgApi extends apiBase {
exam
()
{
return
"xxx"
;
}
classDesc
()
{
return
{
groupName
:
"auth"
,
...
...
@@ -142,6 +201,7 @@ class XbgApi extends apiBase {
exam
:
""
,
};
}
methodDescs
()
{
return
[{
methodDesc
:
"生成访问token"
,
...
...
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