Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
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
data-center-auto
Commits
7e966dc3
Commit
7e966dc3
authored
Feb 27, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改利润算法
parent
e92f4cc9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
1 deletion
+50
-1
dc_auto_turnover.cs
AutoTurnOver.DB/dc_auto_turnover.cs
+50
-1
No files found.
AutoTurnOver.DB/dc_auto_turnover.cs
View file @
7e966dc3
...
...
@@ -1319,6 +1319,9 @@ from dc_auto_turnover_air where gmt_modified>=@btime and gmt_modified<=@etime
val
=
modalData
.
freight_price
});
//实际周转金额
modalData
.
turnover_amount
=
modalData
.
turnover
*
modalData
.
unit_price
;
modalData
.
quantity_final_advise_ocean
=
(
int
)
Math
.
Round
(
result_ocean
.
quantity_safe_inventory
+
(
result_ocean
.
daily_weighted_sales
*
result_ocean
.
turnover_days
));
datas
.
FirstOrDefault
(
s
=>
s
.
name
==
"海运周转数(推荐海运)"
).
days
.
Add
(
new
transfer_profit_dto
.
day_dto
...
...
@@ -1357,6 +1360,47 @@ from dc_auto_turnover_air where gmt_modified>=@btime and gmt_modified<=@etime
date
=
this_time
,
val
=
modalData
.
freight_price_air
});
modalData
.
freight_price_ocean_difference_amount
=
modalData
.
freight_price
-
modalData
.
freight_price_ocean
;
datas
.
FirstOrDefault
(
s
=>
s
.
name
==
"实际-海运运费差值"
).
days
.
Add
(
new
transfer_profit_dto
.
day_dto
{
date
=
this_time
,
val
=
modalData
.
freight_price_ocean_difference_amount
});
modalData
.
quantity_final_ocean_difference_amount
=
modalData
.
turnover_amount
-
modalData
.
quantity_final_advise_ocean_amount
;
datas
.
FirstOrDefault
(
s
=>
s
.
name
==
"实际-海运周转采购金额差值"
).
days
.
Add
(
new
transfer_profit_dto
.
day_dto
{
date
=
this_time
,
val
=
modalData
.
quantity_final_ocean_difference_amount
});
datas
.
FirstOrDefault
(
s
=>
s
.
name
==
"差值(海运)-实际周转采购金额占比"
).
days
.
Add
(
new
transfer_profit_dto
.
day_dto
{
date
=
this_time
,
val
=
(
modalData
.
turnover_amount
??
0
)
<=
0
?
0
M
:
(
Math
.
Round
((
modalData
.
quantity_final_ocean_difference_amount
??
0
)
/
modalData
.
turnover_amount
.
Value
,
3
))
});
modalData
.
freight_price_air_difference_amount
=
modalData
.
freight_price
-
modalData
.
freight_price_air
;
datas
.
FirstOrDefault
(
s
=>
s
.
name
==
"实际-空运运费差值"
).
days
.
Add
(
new
transfer_profit_dto
.
day_dto
{
date
=
this_time
,
val
=
modalData
.
freight_price_air_difference_amount
});
modalData
.
quantity_final_air_difference_amount
=
modalData
.
turnover_amount
-
modalData
.
quantity_final_advise_air_amount
;
datas
.
FirstOrDefault
(
s
=>
s
.
name
==
"实际-空运周转采购金额差值"
).
days
.
Add
(
new
transfer_profit_dto
.
day_dto
{
date
=
this_time
,
val
=
modalData
.
quantity_final_air_difference_amount
});
datas
.
FirstOrDefault
(
s
=>
s
.
name
==
"差值(空运)-实际周转采购金额占比"
).
days
.
Add
(
new
transfer_profit_dto
.
day_dto
{
date
=
this_time
,
val
=
(
modalData
.
turnover_amount
??
0
)
<=
0
?
0
M
:
(
Math
.
Round
((
modalData
.
quantity_final_air_difference_amount
??
0
)
/
modalData
.
turnover_amount
.
Value
,
3
))
});
}
else
// 过去
{
...
...
@@ -1592,6 +1636,11 @@ from dc_auto_turnover_air where gmt_modified>=@btime and gmt_modified<=@etime
internal
decimal
?
quantity_final_advise_amount
;
/// <summary>
/// 实际周转金额
/// </summary>
internal
decimal
?
turnover_amount
;
/// <summary>
/// 实际周转数
/// </summary>
internal
decimal
?
purchase_quantity
;
...
...
@@ -1630,7 +1679,7 @@ from dc_auto_turnover_air where gmt_modified>=@btime and gmt_modified<=@etime
/// </summary>
internal
decimal
?
quantity_final_advise_air
;
/// <summary>
/// 实际-海运周转
金额
差值
/// 实际-海运周转
运费
差值
/// </summary>
internal
decimal
?
freight_price_ocean_difference_amount
;
...
...
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