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
61b81848
Commit
61b81848
authored
Apr 04, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
e971208d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
59 deletions
+72
-59
xgg-saas-merchant/app/base/controller/impl/tax/taxCtl.js
+56
-57
xgg-saas-merchant/app/base/service/impl/saas/orderSve.js
+13
-0
xgg-saas-merchant/app/base/service/impl/trade/tradeSve.js
+2
-1
xgg-saas-merchant/app/base/system.js
+1
-1
No files found.
xgg-saas-merchant/app/base/controller/impl/tax/taxCtl.js
View file @
61b81848
...
...
@@ -2,71 +2,69 @@ var system = require("../../../system")
const
CtlBase
=
require
(
"../../ctlms.base"
);
class
TaxCtl
extends
CtlBase
{
constructor
()
{
super
();
this
.
taxSve
=
system
.
getObject
(
"service.tax.taxSve"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
}
constructor
()
{
super
();
this
.
taxSve
=
system
.
getObject
(
"service.tax.taxSve"
);
this
.
orderSve
=
system
.
getObject
(
"service.saas.orderSve"
);
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
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
.
getReportDataQuarter
(
params
);
return
system
.
getResult
(
res
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
/**
* 季度账期
* @param {*} params
*/
async
getReportDataQuarter
(
params
)
{
try
{
let
res
=
await
this
.
taxSve
.
getReportDataQuarter
(
params
);
return
system
.
getResult
(
res
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 获取账簿用户信息
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
* @id
*/
async
getCustomerById
(
pobj
,
pobj2
,
req
)
{
try
{
if
(
!
pobj
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 ID 不能为空`
);
}
let
res
=
await
this
.
taxSve
.
getCustomerById
(
pobj
);
return
res
;
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
error
);
}
/**
* 获取账簿用户信息
* @param {*} pobj
* @param {*} pobj2
* @param {*} req
* @id
*/
async
getCustomerById
(
pobj
,
pobj2
,
req
)
{
try
{
if
(
!
pobj
.
id
)
{
return
system
.
getResult
(
null
,
`参数错误 ID 不能为空`
);
}
let
res
=
await
this
.
taxSve
.
getCustomerById
(
pobj
);
return
res
;
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
error
);
}
}
// async businessmenPage(pobj, pobj2, req) {
// try {
// if (!pobj.id) {
// return system.getResult(null, `参数错误 ID 不能为空`);
// }
// let res = await this.taxSve.businessmenPage(pobj);
// return res;
// } catch (error) {
// console.log(error);
// return system.getResult(error);
// }
// }
async
businessmenPage
(
pobj
,
pobj2
,
req
)
{
try
{
let
res
=
await
this
.
orderSve
.
businessmenPage
(
pobj
);
return
res
;
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
error
);
}
}
}
module
.
exports
=
TaxCtl
;
\ No newline at end of file
xgg-saas-merchant/app/base/service/impl/saas/orderSve.js
View file @
61b81848
...
...
@@ -39,6 +39,19 @@ class OrderService extends ServiceBase {
return
rs
.
data
||
{};
}
// 交付信息 map by 信用代码
async
mapByCreditCodes
(
params
)
{
let
rs
=
await
this
.
callms
(
"order"
,
"saasOrderDeliverMapByCreditCodes"
,
params
);
if
(
!
rs
||
!
rs
.
data
)
{
return
{};
}
return
rs
.
data
;
}
async
businessmenPage
(
params
)
{
let
rs
=
await
this
.
callms
(
"order"
,
"saasOrderDeliverBusinessmenPage"
,
params
)
||
{};
return
rs
;
}
transOrderField
(
rows
)
{
if
(
!
rows
||
rows
.
length
==
0
)
{
return
;
...
...
xgg-saas-merchant/app/base/service/impl/trade/tradeSve.js
View file @
61b81848
...
...
@@ -9,6 +9,7 @@ class TradeService extends ServiceBase {
super
();
// this.businessmenSve = system.getObject("service.business.businessmenSve");
this
.
merchantSve
=
system
.
getObject
(
"service.saas.merchantSve"
);
this
.
orderSve
=
system
.
getObject
(
"service.saas.orderSve"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
}
...
...
@@ -220,7 +221,7 @@ class TradeService extends ServiceBase {
for
(
let
data
of
itemList
)
{
creditCodes
.
push
(
data
.
credit_code
);
}
let
creditCodeMap
=
await
this
.
businessmenSve
.
mapByCreditCodes
({
creditCodes
:
creditCodes
,
attrs
:
"
credit_code"
});
let
creditCodeMap
=
await
this
.
orderSve
.
mapByCreditCodes
({
creditCodes
:
creditCodes
,
attrs
:
"sve_businessmen_
credit_code"
});
for
(
let
data
of
itemList
)
{
this
.
checkField
(
data
,
"acc_name"
,
{
name
:
"收款户名"
,
is_require
:
true
,
maxLen
:
64
});
let
bm
=
creditCodeMap
[
data
.
credit_code
];
...
...
xgg-saas-merchant/app/base/system.js
View file @
61b81848
...
...
@@ -181,7 +181,7 @@ class System {
merchant
:
dev
+
":3101"
+
path
,
// 订单服务
order
:
dev
+
":3103"
+
path
,
order
:
local
+
":3103"
+
path
,
// 发票服务
invoice
:
dev
+
":3105"
+
path
,
...
...
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