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
c3db4f5a
Commit
c3db4f5a
authored
Nov 20, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a9480b22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
dc_base_week_coefficient_dao.cs
AutoTurnOver.DB/dc_base_week_coefficient_dao.cs
+2
-1
No files found.
AutoTurnOver.DB/dc_base_week_coefficient_dao.cs
View file @
c3db4f5a
...
...
@@ -85,13 +85,14 @@ where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code and t1.bailun_o
{
var
weekDatas
=
week_coefficient_datas
.
Where
(
s
=>
s
.
week
==
i
);
var
avg
=
weekDatas
.
Select
(
s
=>
s
.
coefficient
).
Average
();
//var has_val = weekDatas.Select(s => s.coefficient).Average();
var
data
=
new
dc_base_week_coefficient
()
{
bailun_sku
=
item
.
bailun_sku
,
warehouse_code
=
item
.
warehouse_code
,
bailun_sku_warehouse_code
=
$"
{
item
.
bailun_sku
}{
item
.
warehouse_code
}
"
,
week
=
i
,
coefficient
=
(
avg
==
0
?
1
:
avg
)
,
coefficient
=
avg
,
update_date
=
DateTime
.
Now
,
formula
=
"("
+
string
.
Join
(
"+"
,
weekDatas
.
Select
(
s
=>
s
.
formula
))
+
" ) / "
+
weekDatas
.
Count
()
};
...
...
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