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
3b1bdd19
Commit
3b1bdd19
authored
Nov 27, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整服务
parent
5577a6d3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
25 deletions
+88
-25
Program.cs
Bailun.DC.DailyItemNoProfitRate/Program.cs
+0
-1
Services.cs
Bailun.DC.DailyItemNoProfitRate/Services.cs
+59
-23
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+29
-1
No files found.
Bailun.DC.DailyItemNoProfitRate/Program.cs
View file @
3b1bdd19
...
@@ -9,7 +9,6 @@ namespace Bailun.DC.DailyItemNoProfitRate
...
@@ -9,7 +9,6 @@ namespace Bailun.DC.DailyItemNoProfitRate
{
{
static
async
Task
Main
(
string
[]
args
)
static
async
Task
Main
(
string
[]
args
)
{
{
//Console.WriteLine("Hello World!");
Console
.
WriteLine
(
"启动服务 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
Console
.
WriteLine
(
"启动服务 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
var
builder
=
new
HostBuilder
().
ConfigureServices
((
hostContext
,
services
)
=>
var
builder
=
new
HostBuilder
().
ConfigureServices
((
hostContext
,
services
)
=>
...
...
Bailun.DC.DailyItemNoProfitRate/Services.cs
View file @
3b1bdd19
This diff is collapsed.
Click to expand it.
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
3b1bdd19
...
@@ -4114,13 +4114,41 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -4114,13 +4114,41 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// itemno 利润率 的订单明细
/// itemno 利润率 的订单明细
/// </summary>
/// </summary>
/// <param name="itemid"></param>
/// <param name="itemid"></param>
/// <param name="type"></param>
/// <param name="type">
1:广告订单利润率,2:自然订单利润率,3:合并订单利润率
</param>
/// <param name="day"></param>
/// <param name="day"></param>
/// <returns></returns>
/// <returns></returns>
public
ActionResult
ItemNoProfitOrderDetail
(
string
itemid
,
int
type
,
DateTime
day
)
public
ActionResult
ItemNoProfitOrderDetail
(
string
itemid
,
int
type
,
DateTime
day
)
{
{
ViewBag
.
itemid
=
itemid
;
ViewBag
.
itemid
=
itemid
;
ViewBag
.
day
=
day
.
ToString
(
"yyyy-MM-dd"
);
ViewBag
.
day
=
day
.
ToString
(
"yyyy-MM-dd"
);
string
tips
=
""
;
string
valus
=
""
;
var
objCount
=
new
Services
.
OrdersServices
().
ListItemNoProfitRate
(
new
List
<
string
>
{
itemid
},
day
).
FirstOrDefault
();
if
(
objCount
!=
null
)
{
if
(
type
==
1
)
//1:广告订单利润率
{
tips
=
"广告订单利润率数值填入计算=(广告GMV-(过去20天OMS订单总销售成本(不计广告费)*过去20天广告GMV/过去20天OMS订单销量额)-广告费)/广告GMV"
;
valus
=
"广告订单利润率计算公式=("
+
objCount
.
amount_sales_ad_gmv
+
"-("
+
objCount
.
cost_sales
+
"*"
+
objCount
.
amount_sales_ad_gmv
+
"/"
+
objCount
.
amount_sales
+
")-"
+
objCount
.
cost_ad
+
")/"
+
objCount
.
amount_sales_ad_gmv
;
}
else
if
(
type
==
2
)
//2:自然订单利润率
{
tips
=
"自然订单利润率数值填入计算=(总GMV-广告GMV-过去20天OMS订单总销售成本(不计广告费)*(1-(过去20天广告GMV/过去20天OMS订单销量额)))/(总GMV-广告GMV)"
;
valus
=
"自然订单利润率计算公式=("
+
objCount
.
amount_sales
+
"-"
+
objCount
.
amount_sales_ad_gmv
+
"-"
+
objCount
.
cost_sales
+
"*(1-("
+
objCount
.
amount_sales_ad_gmv
+
"/"
+
objCount
.
amount_sales
+
")))/("
+
objCount
.
amount_sales
+
"-"
+
objCount
.
amount_sales_ad_gmv
+
")"
;
}
else
if
(
type
==
3
)
//3:合并订单利润率
{
tips
=
"合并订单利润率数值填入计算=(过去20天OMS订单销售额-过去20天广告费-过去20天全部订单销售成本(不计广告费))/过去20天OMS订单销售额"
;
valus
=
"合并订单利润率计算公式=("
+
objCount
.
amount_sales
+
"-"
+
objCount
.
cost_ad
+
"-"
+
objCount
.
cost_sales
+
"))/"
+
objCount
.
amount_sales
;
}
}
ViewBag
.
m
=
objCount
;
ViewBag
.
tips
=
tips
;
ViewBag
.
values
=
valus
;
return
View
();
return
View
();
}
}
...
...
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