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
5c982a6c
Commit
5c982a6c
authored
Apr 29, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同上
parent
5ae51faa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+29
-3
No files found.
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
5c982a6c
...
...
@@ -263,21 +263,47 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
if
(
type
==
2
)
//按周
{
if
(
date
.
DayOfWeek
==
DayOfWeek
.
Saturday
)
if
(
day
.
HasValue
)
//Add by Allan at 20210429,按周也可以选择日期进行查看
{
date
=
day
.
Value
;
}
else
{
date
=
date
.
AddDays
(-
1
);
}
if
(
date
.
DayOfWeek
==
DayOfWeek
.
Saturday
)
{
date
=
date
.
AddDays
(-
4
);
}
else
if
(
date
.
DayOfWeek
==
DayOfWeek
.
Sunday
)
{
date
=
date
.
AddDays
(-
5
);
}
else
if
(
date
.
DayOfWeek
==
DayOfWeek
.
Friday
)
{
date
=
date
.
AddDays
(-
3
);
}
else
if
(
date
.
DayOfWeek
==
DayOfWeek
.
Thursday
)
{
date
=
date
.
AddDays
(-
2
);
}
else
else
if
(
date
.
DayOfWeek
==
DayOfWeek
.
Wednesday
)
{
date
=
date
.
AddDays
(-
2
-
(
int
)
date
.
DayOfWeek
);
date
=
date
.
AddDays
(-
1
);
}
else
if
(
date
.
DayOfWeek
==
DayOfWeek
.
Monday
)
{
date
=
date
.
AddDays
(-
6
);
}
}
else
if
(
type
==
3
)
//按月
{
if
(
day
.
HasValue
)
//Add by Allan at 20210429,for 月份也可选择日期进行查看
{
date
=
day
.
Value
;
}
if
(
date
.
AddDays
(
1
).
ToString
(
"yyyy-MM"
)
==
date
.
ToString
(
"yyyy-MM"
))
{
date
=
DateTime
.
Parse
(
date
.
ToString
(
"yyyy-MM"
)
+
"-01"
).
AddDays
(-
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