Commit f2bd99f5 by DESKTOP-7Q3CA17\86137

gsb

parent 67e50a14
...@@ -325,9 +325,12 @@ class ChannelApi { ...@@ -325,9 +325,12 @@ class ChannelApi {
for (let order of orders) { for (let order of orders) {
//查询打款时间 //查询打款时间
let paytime = await this.esettleSve.paytime(order.id) || []; let paytime = await this.esettleSve.paytime(order.id) || [];
if(paytime){ if (paytime) {
order.pay_complete_time = paytime[0].create_time; order.pay_complete_time = paytime[0].create_time;
} }
order.orderPrice = order.actual_amt + order.service_tax;
order.cost = order.actual_amt + order.income_tax + order.added_value_tax;
// 获取推送数据 // 获取推送数据
let pushData = this.getPushData(merchant, order); let pushData = this.getPushData(merchant, order);
...@@ -350,6 +353,13 @@ class ChannelApi { ...@@ -350,6 +353,13 @@ class ChannelApi {
return; return;
} }
for (let order of orders) { for (let order of orders) {
order.orderPrice = 0;
order.cost = 0;
let itemsum = await this.esettleofflineSve.getincome(order.id) || [];
if (itemsum) {
order.orderPrice = itemsum.actual_amt + itemsum.service_tax;
order.cost = itemsum.actual_amt + itemsum.income_tax + itemsum.added_value_tax;
}
// 获取推送数据 // 获取推送数据
let pushData = this.getPushData(merchant, order); let pushData = this.getPushData(merchant, order);
...@@ -376,7 +386,8 @@ class ChannelApi { ...@@ -376,7 +386,8 @@ class ChannelApi {
// "productId": "5e6b02cc3290c3000a3a63dc",// 云服产品id (测试环境) // "productId": "5e6b02cc3290c3000a3a63dc",// 云服产品id (测试环境)
"productId": settings.FQYF().productId,// 云服产品id (生产环境) "productId": settings.FQYF().productId,// 云服产品id (生产环境)
// "allotRatio":"50",// 分润比例(百分比的数字部分(如:50代表50%)) // "allotRatio":"50",// 分润比例(百分比的数字部分(如:50代表50%))
"orderPrice": system.f2y(order.deduct_amt),// 订单金额 "orderPrice": system.f2y(order.orderPrice),// 订单金额
"cost": system.f2y(order.cost),//成本
"productQuantity": "1",// 产品数量 "productQuantity": "1",// 产品数量
"companyName": merchant.merchant_name,// 公司名称 "companyName": merchant.merchant_name,// 公司名称
"phone": merchant.contact_mobile, "phone": merchant.contact_mobile,
......
...@@ -39,7 +39,7 @@ class ChannelService extends microService { ...@@ -39,7 +39,7 @@ class ChannelService extends microService {
} }
async bindPlatform(params){ async bindPlatform(params){
return await this.callms("channel" , "bindPlatform", params);
} }
async getchannelIds(params){ async getchannelIds(params){
return await this.callms("channel" , "channelIds", params); return await this.callms("channel" , "channelIds", params);
......
...@@ -921,13 +921,13 @@ class EsettleService extends ServiceBase { ...@@ -921,13 +921,13 @@ class EsettleService extends ServiceBase {
return { count: total, rows: list }; return { count: total, rows: list };
} }
async findPushInfos(busiId, begin, end) { async findPushInfos(busiId, begin, end) {
if (!busiId) { if (!busiId) {
return []; return [];
} }
let sql = []; let sql = [];
sql.push("SELECT"); sql.push("SELECT");
sql.push("id, deduct_amt,create_time as created_at "); sql.push("id, deduct_amt,create_time as created_at,actual_amt,service_tax,income_tax,added_value_tax ");
sql.push("FROM `tbl_order` "); sql.push("FROM `tbl_order` ");
sql.push("WHERE busi_id = :busiId"); sql.push("WHERE busi_id = :busiId");
sql.push("AND create_time >= :begin"); sql.push("AND create_time >= :begin");
......
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