Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
Ftt_Common
Project
Project
Details
Activity
Releases
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
Administrator
Ftt_Common
Commits
488e94a9
Commit
488e94a9
authored
Sep 16, 2021
by
tr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、员工考核:日期边界修复(限定为每月1号,到最后一天)
parent
c48cc7ce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
Tools.exe.config
AppHome/Tools.exe.config
+1
-1
wEvaluationOfEmployee.cs
Tools/UI/wEvaluationOfEmployee.cs
+6
-5
No files found.
AppHome/Tools.exe.config
View file @
488e94a9
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
configuration
>
<
appSettings
>
<
appSettings
>
<
add
key
=
"UpdateTime"
value
=
"2021-09-1
1 17:38:34.41
7"
/>
<
add
key
=
"UpdateTime"
value
=
"2021-09-1
6 14:24:34.77
7"
/>
</
appSettings
>
</
appSettings
>
<
startup
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.8"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.8"
/>
...
...
Tools/UI/wEvaluationOfEmployee.cs
View file @
488e94a9
...
@@ -111,10 +111,13 @@ namespace Tools.UI
...
@@ -111,10 +111,13 @@ namespace Tools.UI
Utils
.
Tip
(
"请先选择月份!"
);
Utils
.
Tip
(
"请先选择月份!"
);
return
;
return
;
}
}
//生成开始、结束日期
string
startDate
=
this
.
tscbMonth
.
Text
;
string
endDate
=
Convert
.
ToDateTime
(
startDate
).
AddMonths
(
1
).
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
//开始日期所在月份的最后一天
//考勤数据-分组
//考勤数据-分组
var
dic
=
new
Dictionary
<
string
,
List
<
DataRow
>>();
var
dic
=
new
Dictionary
<
string
,
List
<
DataRow
>>();
var
rows
=
this
.
_ds
.
Tables
[
0
].
Select
(
$"CreateDate >
'
{
this
.
tscbMonth
.
Text
}
'"
);
var
rows
=
this
.
_ds
.
Tables
[
0
].
Select
(
$"CreateDate >
= '
{
startDate
}
' AND CreateDate <= '
{
endDate
}
'"
);
var
unionRows
=
this
.
UnionTaskDelayRows
(
rows
,
this
.
tscbMonth
.
Text
);
var
unionRows
=
this
.
UnionTaskDelayRows
(
rows
,
startDate
,
endDate
);
foreach
(
DataRow
r
in
unionRows
)
foreach
(
DataRow
r
in
unionRows
)
{
{
if
(
Utils
.
IsIllegalDataRow
(
r
))
if
(
Utils
.
IsIllegalDataRow
(
r
))
...
@@ -207,13 +210,11 @@ namespace Tools.UI
...
@@ -207,13 +210,11 @@ namespace Tools.UI
/// <param name="rows">已有的数据行</param>
/// <param name="rows">已有的数据行</param>
/// <param name="startDate">格式:yyyy-MM-01</param>
/// <param name="startDate">格式:yyyy-MM-01</param>
/// <returns></returns>
/// <returns></returns>
private
List
<
DataRow
>
UnionTaskDelayRows
(
DataRow
[]
rows
,
string
startDate
)
private
List
<
DataRow
>
UnionTaskDelayRows
(
DataRow
[]
rows
,
string
startDate
,
string
endDate
)
{
{
List
<
DataRow
>
result
=
new
List
<
DataRow
>(
rows
);
List
<
DataRow
>
result
=
new
List
<
DataRow
>(
rows
);
try
try
{
{
//生成结束日期,开始日期所在月份的最后一天
string
endDate
=
Convert
.
ToDateTime
(
startDate
).
AddMonths
(
1
).
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
//取指定月份的延期任务,即最后一次待验收时间大于任务结束时间。延期天数作为减分值。
//取指定月份的延期任务,即最后一次待验收时间大于任务结束时间。延期天数作为减分值。
//为适配原数据格式,此处列名做了特殊处理。
//为适配原数据格式,此处列名做了特殊处理。
string
sql
=
$@"
string
sql
=
$@"
...
...
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