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
4564d742
Commit
4564d742
authored
Oct 20, 2021
by
DESKTOP-732ATD8\BLT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加功能:Shopify 广告费
parent
f12427d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
OrdersServices.cs
Bailun.DC.Services/OrdersServices.cs
+7
-2
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+2
-0
No files found.
Bailun.DC.Services/OrdersServices.cs
View file @
4564d742
...
@@ -6604,18 +6604,23 @@ namespace Bailun.DC.Services
...
@@ -6604,18 +6604,23 @@ namespace Bailun.DC.Services
public
decimal
ShopifyAD
(
DateTime
?
start
,
DateTime
?
end
,
bool
isUSD
)
public
decimal
ShopifyAD
(
DateTime
?
start
,
DateTime
?
end
,
bool
isUSD
)
{
{
var
sqlparam
=
new
DynamicParameters
();
var
sqlparam
=
new
DynamicParameters
();
TimeZoneInfo
easternZone
=
TimeZoneInfo
.
FindSystemTimeZoneById
(
"Eastern Standard Time"
);
var
sql
=
$" select round(sum(fee *
{(
isUSD
?
"1"
:
"cny_exchange_rate"
)}
),2) as fee from dc_base_finance_shopify_fee where status = 0"
;
var
sql
=
$" select round(sum(fee *
{(
isUSD
?
"1"
:
"cny_exchange_rate"
)}
),2) as fee from dc_base_finance_shopify_fee where status = 0"
;
if
(
start
.
HasValue
)
if
(
start
.
HasValue
)
{
{
//转美东时间
start
=
TimeZoneInfo
.
ConvertTimeFromUtc
(
start
.
Value
.
Date
.
ToUniversalTime
(),
easternZone
);
sql
+=
" and bdate >= @bdate"
;
sql
+=
" and bdate >= @bdate"
;
sqlparam
.
Add
(
"bdate"
,
start
.
Value
.
Date
);
sqlparam
.
Add
(
"bdate"
,
start
.
Value
);
}
}
if
(
end
.
HasValue
)
if
(
end
.
HasValue
)
{
{
//转美东时间
end
=
TimeZoneInfo
.
ConvertTimeFromUtc
(
end
.
Value
.
Date
.
AddDays
(
1
).
ToUniversalTime
(),
easternZone
);
sql
+=
" and edate < @edate"
;
sql
+=
" and edate < @edate"
;
sqlparam
.
Add
(
"edate"
,
end
.
Value
.
Date
.
AddDays
(
1
)
);
sqlparam
.
Add
(
"edate"
,
end
.
Value
);
}
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
...
...
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
4564d742
...
@@ -2062,6 +2062,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -2062,6 +2062,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
else
if
(
item
.
platform_type
.
ToLower
()
==
"shopify"
)
//Shopify广告费
else
if
(
item
.
platform_type
.
ToLower
()
==
"shopify"
)
//Shopify广告费
{
{
item
.
adfee
=
shopifyFee
;
item
.
adfee
=
shopifyFee
;
item
.
profit_total
=
(
item
.
profit_total
-
item
.
adfee
??
0
);
item
.
profit_rate
=
(
item
.
amount_sales
-
item
.
amount_prepaid
)
!=
0
?
Math
.
Round
((
item
.
profit_total
/
(
item
.
amount_sales
-
item
.
amount_prepaid
)),
2
)
:
0
;
}
}
}
}
else
if
(
statistictype
==
1
)
else
if
(
statistictype
==
1
)
...
...
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