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
1b38ea21
Commit
1b38ea21
authored
Apr 14, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
c00910d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
xgg-saas-merchant/app/base/service/impl/trade/tradeSve.js
+12
-4
xgg-saas-merchant/app/base/system.js
+1
-1
No files found.
xgg-saas-merchant/app/base/service/impl/trade/tradeSve.js
View file @
1b38ea21
...
...
@@ -57,7 +57,7 @@ class TradeService extends ServiceBase {
return
system
.
getResultFail
(
-
1
,
`锁定批次无数据`
,
itemList
);
}
// 验证字段
let
error
=
await
this
.
checkItemList
(
itemList
);
let
error
=
await
this
.
checkItemList
(
itemList
,
params
.
saas_merchant_id
);
if
(
error
)
{
return
system
.
getResultFail
(
-
1
,
`批次内有错误数据,请检查后修改`
,
itemList
);
}
...
...
@@ -98,6 +98,9 @@ class TradeService extends ServiceBase {
itemList
:
itemList
};
let
rs
=
await
this
.
callms
(
"trade"
,
"orderAdd"
,
order
);
if
(
rs
.
data
)
{
this
.
transFields
([
rs
.
data
]);
}
return
rs
;
}
...
...
@@ -126,7 +129,7 @@ class TradeService extends ServiceBase {
let
itemList
=
await
this
.
readItems
(
params
.
fileUrl
,
params
.
fileName
);
// 验证字段
let
error
=
await
this
.
checkItemList
(
itemList
);
let
error
=
await
this
.
checkItemList
(
itemList
,
params
.
saas_merchant_id
);
// 计算预计付款基恩
let
result
=
await
this
.
countAmt
(
itemList
,
info
);
...
...
@@ -225,7 +228,7 @@ class TradeService extends ServiceBase {
}
}
async
checkItemList
(
itemList
)
{
async
checkItemList
(
itemList
,
saas_merchant_id
)
{
let
error
=
false
;
if
(
!
itemList
||
itemList
.
length
==
0
)
{
return
system
.
getResult
(
null
,
"打款文件无数据"
)
...
...
@@ -236,7 +239,12 @@ class TradeService extends ServiceBase {
for
(
let
data
of
itemList
)
{
creditCodes
.
push
(
data
.
credit_code
);
}
let
creditCodeMap
=
await
this
.
orderSve
.
mapByCreditCodes
({
creditCodes
:
creditCodes
,
attrs
:
"sve_businessmen_credit_code"
});
let
creditCodeMap
=
await
this
.
orderSve
.
mapByCreditCodes
({
saas_merchant_id
:
saas_merchant_id
,
creditCodes
:
creditCodes
,
attrs
:
"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 @
1b38ea21
...
...
@@ -181,7 +181,7 @@ class System {
merchant
:
dev
+
":3101"
+
path
,
// 订单服务
order
:
local
+
":3103"
+
path
,
order
:
dev
+
":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