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
6591291f
Commit
6591291f
authored
Apr 03, 2020
by
王昆
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xgg-saas-merchant' of gitlab.gongsibao.com:jiangyong/zhichan into xgg-saas-merchant
parents
b97104e5
b4841a39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
114 additions
and
3 deletions
+114
-3
xgg-saas-merchant/app/base/controller/impl/tax/taxCtl.js
+55
-0
xgg-saas-merchant/app/base/service/impl/tax/taxSve.js
+59
-3
No files found.
xgg-saas-merchant/app/base/controller/impl/tax/taxCtl.js
0 → 100644
View file @
6591291f
var
system
=
require
(
"../../../system"
)
const
CtlBase
=
require
(
"../../ctlms.base"
);
class
TaxCtl
extends
CtlBase
{
constructor
()
{
super
();
this
.
taxSve
=
system
.
getObject
(
"service.trade.tradeSve"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
}
/**
* 月账期
* @param {*} params
*/
async
getReportData
(
params
)
{
try
{
let
res
=
await
this
.
taxSve
.
getReportData
(
params
);
return
system
.
getResult
(
res
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 季度账期
* @param {*} params
*/
async
getReportDataQuarter
(
params
)
{
try
{
let
res
=
await
this
.
taxSve
.
getReportData
(
params
);
return
system
.
getResult
(
res
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 获取账簿用户信息
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
* @id
*/
async
getCustomerById
(
pobj
,
pobj2
,
req
){
if
(
!
pobj
.
id
){
return
system
.
getResult
(
null
,
`参数错误 ID 不能为空`
);
}
let
res
=
await
this
.
orderSve
.
getCustomerById
(
pobj
.
invoice_id
);
return
res
;
}
}
module
.
exports
=
TaxCtl
;
\ No newline at end of file
xgg-saas-merchant/app/base/service/impl/tax/taxSve.js
View file @
6591291f
...
...
@@ -6,16 +6,71 @@ class TaxService extends ServiceBase {
super
();
}
/**
*
组织机构 添加
*
月账期
* @param {*} params
*/
async
getReportData
(
params
)
{
try
{
// settings.ntapi().getReportData
// return await this.callApi(url, data, name);
let
data
=
{
"accountPeriod"
:
202003
,
"companyId"
:
102
,
"customerId"
:
498779
,
"desc"
:
"string"
,
"reportType"
:
2
,
"signWithoutKey"
:
"string"
}
let
url
=
settings
.
ntapi
().
getReportData
return
await
this
.
callApi
(
url
,
data
,
"月账期"
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 季度账期
* @param {*} params
*/
async
getReportDataQuarter
(
params
)
{
try
{
let
data
=
{
"companyId"
:
102
,
"customerId"
:
498779
,
"desc"
:
"string"
,
"endPeriod"
:
202003
,
"reportType"
:
2
,
"signWithoutKey"
:
"string"
,
"startPeriod"
:
202001
};
let
url
=
settings
.
ntapi
().
getReportDataQuarter
return
await
this
.
callApi
(
url
,
data
,
"季度账期"
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 获取用户账簿信息
* @param {*} params
* id 个体工商户ID
*/
async
getCustomerById
(
params
)
{
try
{
let
businessmen
=
await
this
.
callms
(
"order"
,
"queryObusinessmen"
,
{
id
:
params
.
id
});
if
(
!
businessmen
||
!
businessmen
.
data
)
{
return
system
.
getResult
(
null
,
`个体工商户不存在`
);
}
let
url
=
settings
.
ntapi
().
getCustomerById
;
let
res
=
await
this
.
callApi
(
url
,
{
id
:
businessmen
.
customer_id
},
"获取用户账簿信息"
);
return
res
;
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
module
.
exports
=
TaxService
;
\ No newline at end of file
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