Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
DataCenter_Core2.1_20190520
Commits
4f7edc89
Commit
4f7edc89
authored
Sep 02, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、解决速卖通广告费导出不了的问题,2、平台利润统计报表增加速卖通广告费
parent
16eab188
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
Services.cs
Bailun.DC.SkuDailyPurchaseAndSales/Services.cs
+1
-1
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+15
-5
No files found.
Bailun.DC.SkuDailyPurchaseAndSales/Services.cs
View file @
4f7edc89
...
...
@@ -237,7 +237,7 @@ namespace Bailun.DC.SkuDailyPurchaseAndSales
//卖出
sql
=
$@"select "
;
//入库
...
...
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
4f7edc89
...
...
@@ -1402,6 +1402,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
wishAD
=
_service
.
ListWishADCount
(
companyid
,
null
,
dtstart
,
dtend
,
currency
.
ToUpper
()
==
"USD"
);
var
aliexpressAD
=
_service
.
ListAliexpressADCount
(
companyid
,
""
,
dtstart
,
dtend
,
currency
.
ToUpper
()
==
"USD"
);
foreach
(
var
item
in
result
)
{
item
.
adfee
=
0
;
...
...
@@ -1410,14 +1412,14 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
//利润减去广告费和刊登费
if
(
item
.
platform_type
.
ToLower
()
==
"ebay"
)
{
item
.
adfee
=
ebayADFee
!=
null
?
ebayADFee
.
gross_amount_rmb
:
0
;
item
.
adfee
=
ebayADFee
!=
null
?
ebayADFee
.
gross_amount_rmb
:
0
;
item
.
putawayfee
=
ebayPutAway
!=
null
?
ebayPutAway
.
gross_amount_rmb
:
0
;
item
.
profit_total
=
(
item
.
profit_total
-
item
.
adfee
??
0
-
item
.
putawayfee
??
0
);
item
.
profit_total
=
(
item
.
profit_total
-
item
.
adfee
??
0
-
item
.
putawayfee
??
0
);
item
.
profit_rate
=
Math
.
Round
((
item
.
profit_total
/
item
.
amount_sales
),
2
);
}
else
if
(
item
.
platform_type
.
ToLower
()
==
"fba"
)
else
if
(
item
.
platform_type
.
ToLower
()
==
"fba"
)
//亚马逊广告费
{
item
.
adfee
=
amazonAD
!=
null
?
amazonAD
.
cost_rmb
:
0
;
...
...
@@ -1425,13 +1427,20 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
item
.
profit_rate
=
Math
.
Round
((
item
.
profit_total
/
item
.
amount_sales
),
2
);
}
else
if
(
item
.
platform_type
.
ToLower
()
==
"wish"
)
else
if
(
item
.
platform_type
.
ToLower
()
==
"wish"
)
//Wish广告费
{
item
.
adfee
=
wishAD
!=
null
?
wishAD
.
daily_total_campaign_spend
:
0
;
item
.
profit_total
=
(
item
.
profit_total
-
item
.
adfee
??
0
);
item
.
profit_rate
=
Math
.
Round
((
item
.
profit_total
/
item
.
amount_sales
),
2
);
}
else
if
(
item
.
platform_type
.
ToLower
()
==
"aliexpress"
)
//速卖通广告费
{
item
.
adfee
=
aliexpressAD
!=
null
?
aliexpressAD
.
cost_fee
:
0
;
item
.
profit_total
=
(
item
.
profit_total
-
item
.
adfee
??
0
);
item
.
profit_rate
=
Math
.
Round
((
item
.
profit_total
/
item
.
amount_sales
),
2
);
}
item
.
amount_refund
=
0
;
item
.
amount_refund_rate
=
0
;
var
objRefund
=
listRefund
.
Where
(
a
=>
a
.
platform_type
.
ToLower
()
==
item
.
platform_type
.
ToLower
()).
FirstOrDefault
();
...
...
@@ -2408,8 +2417,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <param name="currency">币种</param>
/// <param name="companyid">公司id</param>
/// <returns></returns>
public
ActionResult
ExportAliexpressAD
(
DateTime
?
start
,
DateTime
?
end
,
string
account
,
string
currency
,
int
?
companyid
)
public
ActionResult
ExportAliexpressAD
(
DateTime
?
start
,
DateTime
?
end
,
string
account
,
int
?
companyid
,
string
currency
=
"CNY"
)
{
var
_service
=
new
Services
.
OrdersServices
();
var
obj
=
_service
.
ListAliexpressAD
(
companyid
,
account
,
start
,
end
,
currency
.
ToUpper
()
==
"USD"
);
var
list
=
obj
.
Select
(
a
=>
new
...
...
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