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
f2bd99f5
Commit
f2bd99f5
authored
Jul 21, 2020
by
DESKTOP-7Q3CA17\86137
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
67e50a14
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
7 deletions
+33
-7
bpo-admin/app/base/api/impl/channelApi.js
+13
-2
bpo-admin/app/base/service/impl/channelSve.js
+1
-1
bpo-admin/app/base/service/impl/esettleSve.js
+1
-1
bpo-admin/app/base/service/impl/esettleofflineSve.js
+18
-3
No files found.
bpo-admin/app/base/api/impl/channelApi.js
View file @
f2bd99f5
...
@@ -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
,
...
...
bpo-admin/app/base/service/impl/channelSve.js
View file @
f2bd99f5
...
@@ -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
);
...
...
bpo-admin/app/base/service/impl/esettleSve.js
View file @
f2bd99f5
...
@@ -927,7 +927,7 @@ class EsettleService extends ServiceBase {
...
@@ -927,7 +927,7 @@ class EsettleService extends ServiceBase {
}
}
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"
);
...
...
bpo-admin/app/base/service/impl/esettleofflineSve.js
View file @
f2bd99f5
...
@@ -38,7 +38,7 @@ class EsettleofflineService extends ServiceBase {
...
@@ -38,7 +38,7 @@ class EsettleofflineService extends ServiceBase {
item
.
esettleoffline_id
=
settle
.
id
;
item
.
esettleoffline_id
=
settle
.
id
;
}
}
await
self
.
esettleofflineitemDao
.
model
.
bulkCreate
(
itemList
,
{
transaction
:
t
});
await
self
.
esettleofflineitemDao
.
model
.
bulkCreate
(
itemList
,
{
transaction
:
t
});
var
sql
=
"INSERT INTO c_esettle_offline_log (esettleoffline_id, url, opuser, created_at, updated_at) VALUES ('"
+
settle
.
id
+
"', '"
+
settle
.
fileurl
+
"', '"
+
opuser
+
"', NOW(), NOW()) "
;
var
sql
=
"INSERT INTO c_esettle_offline_log (esettleoffline_id, url, opuser, created_at, updated_at) VALUES ('"
+
settle
.
id
+
"', '"
+
settle
.
fileurl
+
"', '"
+
opuser
+
"', NOW(), NOW()) "
;
await
self
.
dao
.
customExecAddOrPutSql
(
sql
);
await
self
.
dao
.
customExecAddOrPutSql
(
sql
);
...
@@ -297,7 +297,7 @@ class EsettleofflineService extends ServiceBase {
...
@@ -297,7 +297,7 @@ class EsettleofflineService extends ServiceBase {
var
map
=
[];
var
map
=
[];
var
list
=
await
this
.
dao
.
customQuery
(
sql
.
join
(
" "
),
{
personsSign
:
personsSignArr
,
bankno
:
banknoArr
});
var
list
=
await
this
.
dao
.
customQuery
(
sql
.
join
(
" "
),
{
personsSign
:
personsSignArr
,
bankno
:
banknoArr
});
if
(
!
list
||
list
.
length
==
0
)
{
if
(
!
list
||
list
.
length
==
0
)
{
return
unSignLines
;
return
unSignLines
;
...
@@ -359,8 +359,23 @@ class EsettleofflineService extends ServiceBase {
...
@@ -359,8 +359,23 @@ class EsettleofflineService extends ServiceBase {
sql
.
push
(
"WHERE ecompany_id = :companyId"
);
sql
.
push
(
"WHERE ecompany_id = :companyId"
);
sql
.
push
(
"AND created_at >= :begin"
);
sql
.
push
(
"AND created_at >= :begin"
);
sql
.
push
(
"AND created_at <= :end"
);
sql
.
push
(
"AND created_at <= :end"
);
return
await
this
.
dao
.
customQuery
(
sql
.
join
(
" "
),
{
companyId
:
companyId
,
begin
:
begin
,
end
:
end
})
||
[];
return
await
this
.
dao
.
customQuery
(
sql
.
join
(
" "
),
{
companyId
:
companyId
,
begin
:
begin
,
end
:
end
})
||
[];
}
}
async
getincome
(
esettleoffline_id
)
{
if
(
!
esettleoffline_id
)
{
return
[];
}
let
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
"SUM(income_tax) income_tax,SUM(added_value_tax) added_value_tax"
);
sql
.
push
(
"FROM `c_esettle_offline_item` "
);
sql
.
push
(
"WHERE esettleoffline_id = :esettleoffline_id"
);
return
await
this
.
dao
.
customQuery
(
sql
.
join
(
" "
),
{
esettleoffline_id
:
esettleoffline_id
})
||
[];
}
}
}
module
.
exports
=
EsettleofflineService
;
module
.
exports
=
EsettleofflineService
;
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