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
d9c75b53
Commit
d9c75b53
authored
Nov 20, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
b14e6a69
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
dc_base_week_coefficient_dao.cs
AutoTurnOver.DB/dc_base_week_coefficient_dao.cs
+9
-1
ReportsController.cs
AutoTurnOver/Controllers/ReportsController.cs
+0
-0
No files found.
AutoTurnOver.DB/dc_base_week_coefficient_dao.cs
View file @
d9c75b53
...
...
@@ -54,7 +54,7 @@ where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code and t1.bailun_o
// 计算每周,每天的加权系数
for
(
int
i
=
1
;
i
<=
weeks
;
i
++)
{
var
btime
=
date28
.
AddDays
(
i
-
1
);
var
btime
=
date28
.
AddDays
(
(
i
-
1
)*
7
);
var
etime
=
btime
.
AddDays
(
6
);
// 计算本周总销量
var
sumData
=
week_date_datas
.
Where
(
s
=>
s
.
date
>=
btime
&&
s
.
date
<=
etime
).
ToList
();
...
...
@@ -62,6 +62,10 @@ where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code and t1.bailun_o
var
sumDataAvgVal
=
((
decimal
)
sumDataVal
)
/
7
M
;
for
(
int
j
=
0
;
j
<=
6
;
j
++)
{
if
(
j
==
3
&&
i
==
4
)
{
}
if
(
sumDataAvgVal
<=
0
)
{
week_coefficient_datas
.
Add
(
new
week_coefficient_dto
{
week
=
j
,
coefficient
=
0
M
,
formula
=
" ( 0 / 0 )"
});
...
...
@@ -83,6 +87,10 @@ where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code and t1.bailun_o
for
(
int
i
=
0
;
i
<=
6
;
i
++)
{
if
(
i
==
3
)
{
}
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();
...
...
AutoTurnOver/Controllers/ReportsController.cs
View file @
d9c75b53
This diff is collapsed.
Click to expand it.
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