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
bcf7cc59
Commit
bcf7cc59
authored
Mar 25, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加sku来源利润统计报表
parent
88f097fb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
14 deletions
+32
-14
dc_base_oms_sku.cs
Bailun.DC.Models/Orders/dc_base_oms_sku.cs
+5
-0
OrdersServices.cs
Bailun.DC.Services/OrdersServices.cs
+0
-0
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+27
-14
PlatformProfitCount.cshtml
...Web/Areas/Reports/Views/Orders/PlatformProfitCount.cshtml
+0
-0
No files found.
Bailun.DC.Models/Orders/dc_base_oms_sku.cs
View file @
bcf7cc59
...
@@ -560,5 +560,10 @@ namespace Bailun.DC.Models.Orders
...
@@ -560,5 +560,10 @@ namespace Bailun.DC.Models.Orders
/// 产品类型
/// 产品类型
/// </summary>
/// </summary>
public
string
product_type_desc
{
get
;
set
;
}
public
string
product_type_desc
{
get
;
set
;
}
/// <summary>
/// sku来源
/// </summary>
public
int
source
{
get
;
set
;
}
}
}
}
}
Bailun.DC.Services/OrdersServices.cs
View file @
bcf7cc59
This diff is collapsed.
Click to expand it.
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
bcf7cc59
...
@@ -1528,7 +1528,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1528,7 +1528,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// 平台利润统计
/// 平台利润统计
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
ActionResult
PlatformProfitCount
()
public
ActionResult
PlatformProfitCount
(
int
statistictype
=
0
)
{
{
var
_skuService
=
new
Services
.
SkuInfoServices
();
var
_skuService
=
new
Services
.
SkuInfoServices
();
...
@@ -1559,6 +1559,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1559,6 +1559,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
ViewBag
.
listSkuType
=
list
;
ViewBag
.
listSkuType
=
list
;
ViewBag
.
listSource
=
_skuService
.
ListSkuSource
().
Where
(
a
=>
a
==
1
||
a
==
3
||
a
==
6
||
a
==
7
).
ToList
();
//精准开发,线下美容,普货供应商推荐,服务供应商推荐
ViewBag
.
listSource
=
_skuService
.
ListSkuSource
().
Where
(
a
=>
a
==
1
||
a
==
3
||
a
==
6
||
a
==
7
).
ToList
();
//精准开发,线下美容,普货供应商推荐,服务供应商推荐
ViewBag
.
statistictype
=
statistictype
;
return
View
();
return
View
();
}
}
...
@@ -1569,10 +1570,12 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1569,10 +1570,12 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <param name="platform">平台类型</param>
/// <param name="platform">平台类型</param>
/// <param name="start">付款开始时间</param>
/// <param name="start">付款开始时间</param>
/// <param name="end">付款结束时间</param>
/// <param name="end">付款结束时间</param>
/// <param name="skunewcategory">Sku品类</param>
/// <param name="statistictype">统计方式,0:平台类型,1:sku品类,2:sku来源</param>
/// <returns></returns>
/// <returns></returns>
[
BailunAuthentication
(
LoginMode
.
Enforce
)]
[
BailunAuthentication
(
LoginMode
.
Enforce
)]
[
HttpPost
]
[
HttpPost
]
public
JsonResult
PlatformProfitCountJson
(
string
platform
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
DateTime
?
shipstart
,
DateTime
?
shipend
,
string
currency
,
string
skucategoryids
,
string
product_type
,
int
?
skusource
,
int
?
shippingstrategy
)
public
JsonResult
PlatformProfitCountJson
(
string
platform
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
DateTime
?
shipstart
,
DateTime
?
shipend
,
string
currency
,
string
skucategoryids
,
string
product_type
,
int
?
skusource
,
int
?
shippingstrategy
,
string
skunewcategory
,
int
statistictype
=
0
)
{
{
var
_service
=
new
Services
.
OrdersServices
();
var
_service
=
new
Services
.
OrdersServices
();
var
companyid
=
HttpContextHelper
.
Current
?.
User
?.
GetCompanyId
().
ToInt32
();
var
companyid
=
HttpContextHelper
.
Current
?.
User
?.
GetCompanyId
().
ToInt32
();
...
@@ -1626,14 +1629,14 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1626,14 +1629,14 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
{
{
if
(
shipstart
.
HasValue
||
shipend
.
HasValue
)
if
(
shipstart
.
HasValue
||
shipend
.
HasValue
)
{
{
result
=
_service
.
ListPlatformProfitByShipTime
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
producttype
,
skusource
,
shippingstrategy
);
result
=
_service
.
ListPlatformProfitByShipTime
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
);
var
fbaResult
=
_service
.
ListPlatformProfit
(
string
.
IsNullOrEmpty
(
platform
)
?
"FBA"
:
""
,
website
,
null
,
null
,
null
,
null
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
producttype
,
skusource
,
shippingstrategy
,
shipstart
,
shipend
);
var
fbaResult
=
_service
.
ListPlatformProfit
(
string
.
IsNullOrEmpty
(
platform
)
?
"FBA"
:
""
,
website
,
null
,
null
,
null
,
null
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
shipstart
,
shipend
);
dtstart
=
shipstart
;
dtstart
=
shipstart
;
dtend
=
shipend
;
dtend
=
shipend
;
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
false
,
producttype
,
skusource
,
shippingstrategy
);
//不包含未发货的退款金额
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
false
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
);
//不包含未发货的退款金额
//针对SKU FJH-L-2 做特殊处理
//针对SKU FJH-L-2 做特殊处理
if
(
producttype
.
Length
>
0
)
if
(
producttype
.
Length
>
0
)
...
@@ -1704,8 +1707,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1704,8 +1707,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
}
}
else
else
{
{
result
=
_service
.
ListPlatformProfit
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
producttype
,
skusource
,
shippingstrategy
);
result
=
_service
.
ListPlatformProfit
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
);
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
true
,
producttype
,
skusource
,
shippingstrategy
);
//包含未发货的退款金额
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
true
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
);
//包含未发货的退款金额
//针对SKU FJH-L-2 做特殊处理
//针对SKU FJH-L-2 做特殊处理
if
(
producttype
.
Length
>
0
)
if
(
producttype
.
Length
>
0
)
...
@@ -1748,13 +1751,17 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1748,13 +1751,17 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
}
}
ebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
);
if
(
statistictype
==
0
)
ebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
);
{
ebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
);
ebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
);
amazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
,
producttype
,
skusource
,
shippingstrategy
);
amazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
,
producttype
,
skusource
,
shippingstrategy
);
aliexpressAD
=
_service
.
ListAliexpressADCount
(
companyid
,
""
,
dtstart
,
dtend
,
currency
.
ToUpper
()
==
"USD"
);
aliexpressAD
=
_service
.
ListAliexpressADCount
(
companyid
,
""
,
dtstart
,
dtend
,
currency
.
ToUpper
()
==
"USD"
);
wishAD
=
_service
.
ListWishADCount
(
companyid
,
null
,
dtstart
,
dtend
,
currency
.
ToUpper
()
==
"USD"
);
wishAD
=
_service
.
ListWishADCount
(
companyid
,
null
,
dtstart
,
dtend
,
currency
.
ToUpper
()
==
"USD"
);
}
//aliexpressAD = _service.ListAliexpressADCount(companyid, "", dtstart, dtend, currency.ToUpper() == "USD");
//aliexpressAD = _service.ListAliexpressADCount(companyid, "", dtstart, dtend, currency.ToUpper() == "USD");
}
}
...
@@ -1762,7 +1769,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1762,7 +1769,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
{
{
if
(
shipstart
.
HasValue
||
shipend
.
HasValue
)
if
(
shipstart
.
HasValue
||
shipend
.
HasValue
)
{
{
result
=
_service
.
ListPlatformProfitByShipTime
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
null
,
null
,
null
);
result
=
_service
.
ListPlatformProfitByShipTime
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
null
,
null
,
null
,
statistictype
);
var
fbaResult
=
_service
.
ListPlatformProfit
(
string
.
IsNullOrEmpty
(
platform
)
?
"FBA"
:
""
,
website
,
null
,
null
,
null
,
null
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
shipstart
,
shipend
);
var
fbaResult
=
_service
.
ListPlatformProfit
(
string
.
IsNullOrEmpty
(
platform
)
?
"FBA"
:
""
,
website
,
null
,
null
,
null
,
null
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
shipstart
,
shipend
);
...
@@ -1770,12 +1777,12 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1770,12 +1777,12 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
dtstart
=
shipstart
;
dtstart
=
shipstart
;
dtend
=
shipend
;
dtend
=
shipend
;
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
false
,
null
,
null
,
null
);
//不包含未发货的退款金额
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
false
,
null
,
null
,
null
,
statistictype
);
//不包含未发货的退款金额
}
}
else
else
{
{
result
=
_service
.
ListPlatformProfit
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
);
result
=
_service
.
ListPlatformProfit
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
null
,
null
,
null
,
statistictype
);
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
true
,
null
,
null
,
null
);
//包含未发货的退款金额
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
true
,
null
,
null
,
null
,
statistictype
);
//包含未发货的退款金额
}
}
ebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
null
,
null
,
null
);
ebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
null
,
null
,
null
);
...
@@ -1789,6 +1796,11 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1789,6 +1796,11 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
foreach
(
var
item
in
result
)
foreach
(
var
item
in
result
)
{
{
if
(
statistictype
==
2
)
{
item
.
platform_type
=
Enum
.
GetName
(
typeof
(
SkuSource
),
int
.
Parse
(
item
.
platform_type
));
}
item
.
adfee
=
0
;
item
.
adfee
=
0
;
item
.
putawayfee
=
0
;
item
.
putawayfee
=
0
;
...
@@ -1837,6 +1849,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1837,6 +1849,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
item
.
profit_total
=
(
item
.
profit_total
-
item
.
amount_refund
);
item
.
profit_total
=
(
item
.
profit_total
-
item
.
amount_refund
);
item
.
profit_rate
=
item
.
amount_sales
!=
0
?
Math
.
Round
((
item
.
profit_total
/
item
.
amount_sales
),
2
):
0
;
item
.
profit_rate
=
item
.
amount_sales
!=
0
?
Math
.
Round
((
item
.
profit_total
/
item
.
amount_sales
),
2
):
0
;
}
}
if
(
result
.
Count
>
0
)
if
(
result
.
Count
>
0
)
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/PlatformProfitCount.cshtml
View file @
bcf7cc59
This diff is collapsed.
Click to expand it.
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