Commit f3106832 by 王昆

gsb

parent e4e20790
......@@ -121,6 +121,9 @@ class MerchantService extends ServiceBase {
if(row.main_id) {
mainIds.push(row.main_id);
}
if(row.main_id_trade) {
mainIds.push(row.main_id_trade);
}
}
if(mainIds.length == 0) {
return;
......@@ -129,6 +132,7 @@ class MerchantService extends ServiceBase {
map = map.data || {};
for(let row of rows) {
row.main = map[row.main_id] || {};
row.main_trade = map[row.main_id_trade] || {};
}
}
......
......@@ -64,7 +64,7 @@ class TradeService extends ServiceBase {
// 获取商户签约信息
let info = await this.merchantSve.signInfo({id: params.saas_merchant_id}) || {};
info = info.data || {};
let main = info.main || {};
let main = info.main_trade || {};
// 计算预计付款金额
let result = await this.countAmt(itemList, info);
......@@ -114,17 +114,21 @@ class TradeService extends ServiceBase {
}
async parseItems(params) {
// 获取商户签约信息
let info = await this.merchantSve.signInfo({id: params.saas_merchant_id}) || {};
info = info.data || {};
if(!info.main_trade || !info.main_trade.id) {
return system.getResult(null, "签约时未设置转账交易签约主体,请联系平台进行设置");
}
// 读取excel
let itemList = await this.readItems(params.fileUrl, params.fileName);
// 验证字段
let error = await this.checkItemList(itemList);
// 获取商户签约信息
let info = await this.merchantSve.signInfo({id: params.saas_merchant_id}) || {};
// 计算预计付款基恩
let result = await this.countAmt(itemList, (info.data || {}));
let result = await this.countAmt(itemList, info);
// 封装返回对象
result.error = error;
......
......@@ -190,7 +190,7 @@ class System {
uc: dev + ":3106" + path,
// 交易
trade: local + ":3107" + path,
trade: dev + ":3107" + path,
}
} else {
var odomain = "http://123.57.217.203"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment