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
c729871e
Commit
c729871e
authored
Mar 17, 2022
by
jianshuqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整逻辑:平台月销信利润付款维度的退款取数
parent
854a7e5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
OrdersServices.cs
Bailun.DC.Services/OrdersServices.cs
+8
-4
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+8
-6
No files found.
Bailun.DC.Services/OrdersServices.cs
View file @
c729871e
...
...
@@ -1664,7 +1664,7 @@ namespace Bailun.DC.Services
/// <param name="start">付款开始时间</param>
/// <param name="end">付款结束时间</param>
/// <returns></returns>
public
List
<
Models
.
Orders
.
dc_base_oms_sku
>
ListPlatformProfit
(
string
platform
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
DateTime
?
shipstart
,
DateTime
?
shipend
,
bool
isUSD
,
int
?
companyid
,
string
skucategoryids
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
,
int
statistictype
,
int
?
skunewcategoryid
,
DateTime
?
createstart
=
null
,
DateTime
?
createend
=
null
,
DateTime
?
shipmentstart
=
null
,
DateTime
?
shipmentend
=
null
)
public
List
<
Models
.
Orders
.
dc_base_oms_sku
>
ListPlatformProfit
(
string
platform
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
DateTime
?
shipstart
,
DateTime
?
shipend
,
bool
isUSD
,
int
?
companyid
,
string
skucategoryids
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
,
int
statistictype
,
int
?
skunewcategoryid
,
DateTime
?
createstart
,
DateTime
?
createend
,
DateTime
?
shipmentstart
,
DateTime
?
shipmentend
,
out
string
[]
originOrderIds
)
{
var
str_statistic_col
=
"tb.platform_type"
;
...
...
@@ -1900,7 +1900,7 @@ namespace Bailun.DC.Services
}
var
obj
=
cn
.
Query
<
Models
.
Orders
.
dc_base_oms_sku
>(
sql
,
sqlparam
,
null
,
true
,
2
*
60
);
originOrderIds
=
shipmentstart
.
HasValue
?
null
:
cn
.
Query
<
string
>(
$"select distinct IF(tb.platform_type = 'Ebay',tb.transaction_id,tb.origin_order_id) as origin_order_id
{
sql
.
Substring
(
0
,
sql
.
LastIndexOf
(
"group by"
)).
Substring
(
sql
.
IndexOf
(
"from dc_base_oms_sku tb"
))}
"
,
sqlparam
,
null
,
true
,
2
*
60
).
ToArray
();
return
obj
.
AsList
();
}
...
...
@@ -5761,7 +5761,7 @@ namespace Bailun.DC.Services
/// <param name="website"></param>
/// <param name="isUSD"></param>
/// <returns></returns>
public
List
<
dc_base_oms_order
>
ListPlatformRefund
(
DateTime
?
start
,
DateTime
?
end
,
int
?
companyid
,
string
platform
,
string
website
,
bool
isUSD
,
bool
containNotShipping
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
,
int
statistictype
)
public
List
<
dc_base_oms_order
>
ListPlatformRefund
(
DateTime
?
start
,
DateTime
?
end
,
int
?
companyid
,
string
platform
,
string
website
,
bool
isUSD
,
bool
containNotShipping
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
,
int
statistictype
,
string
[]
originOrderIds
=
null
)
{
var
str_statistic_col
=
"t1.platform_type"
;
...
...
@@ -5875,6 +5875,11 @@ namespace Bailun.DC.Services
{
sql
+=
" and t1.shipping_status in ('TotalShipping','PartShipping') "
;
}
else
if
(
originOrderIds
?.
Length
>
0
)
{
sqlparam
.
Add
(
"origin_order_id"
,
originOrderIds
);
sql
+=
$" and t1.origin_order_id in @origin_order_id"
;
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql
+=
@" and t1.id not in (
...
...
@@ -5909,7 +5914,6 @@ namespace Bailun.DC.Services
{
cn
.
Open
();
}
var
obj
=
cn
.
Query
<
dc_base_oms_order
>(
sql
,
sqlparam
,
null
,
true
,
2
*
60
);
return
obj
.
AsList
();
...
...
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
c729871e
...
...
@@ -1727,8 +1727,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
dtstart
=
shipstart
??
shipmentstart
;
dtend
=
shipend
??
shipmentend
;
result
=
_service
.
ListPlatformProfitByShipTime
(
platform
,
website
,
start
,
end
,
dtstart
,
dtend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
skunewcategory
);
var
fbaResult
=
_service
.
ListPlatformProfit
(
string
.
IsNullOrEmpty
(
platform
)
?
"FBA"
:
""
,
website
,
null
,
null
,
null
,
null
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
skunewcategory
,
shipstart
,
shipend
,
shipmentstart
,
shipmentend
);
string
[]
originOrderIds
=
null
;
var
fbaResult
=
_service
.
ListPlatformProfit
(
string
.
IsNullOrEmpty
(
platform
)
?
"FBA"
:
""
,
website
,
null
,
null
,
null
,
null
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
skunewcategory
,
shipstart
,
shipend
,
shipmentstart
,
shipmentend
,
out
originOrderIds
);
...
...
@@ -1803,8 +1803,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
}
else
{
result
=
_service
.
ListPlatformProfit
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
skunewcategory
);
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
true
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
);
//包含未发货的退款金额
string
[]
originOrderIds
=
null
;
result
=
_service
.
ListPlatformProfit
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
skunewcategory
,
null
,
null
,
null
,
null
,
out
originOrderIds
);
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
true
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
originOrderIds
);
//包含未发货的退款金额
//针对SKU FJH-L-2 做特殊处理
if
(
producttype
.
Length
>
0
)
...
...
@@ -1894,8 +1895,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
}
else
{
result
=
_service
.
ListPlatformProfit
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
null
,
null
,
null
,
statistictype
,
skunewcategory
);
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
true
,
null
,
null
,
null
,
statistictype
);
//包含未发货的退款金额
string
[]
originOrderIds
=
null
;
result
=
_service
.
ListPlatformProfit
(
platform
,
website
,
start
,
end
,
shipstart
,
shipend
,
currency
.
ToUpper
()
==
"USD"
,
companyid
,
skucategoryids
,
null
,
null
,
null
,
statistictype
,
skunewcategory
,
null
,
null
,
null
,
null
,
out
originOrderIds
);
listRefund
=
_service
.
ListPlatformRefund
(
dtstart
,
dtend
,
companyid
,
platform
,
website
,
currency
.
ToUpper
()
==
"USD"
,
true
,
null
,
null
,
null
,
statistictype
,
originOrderIds
);
//包含未发货的退款金额
}
if
(
statistictype
==
0
)
...
...
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