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
c496dfe0
Commit
c496dfe0
authored
Sep 01, 2022
by
罗显健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、修复绩效统计查询结束日期不准的问题
2、批量任务模拟,信息统计差异。
parent
bd271843
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
wEvaluationOfEmployee.cs
Tools/UI/wEvaluationOfEmployee.cs
+2
-2
wMuiltTaskSimulate.cs
Tools/UI/wMuiltTaskSimulate.cs
+19
-1
No files found.
Tools/UI/wEvaluationOfEmployee.cs
View file @
c496dfe0
...
...
@@ -149,10 +149,10 @@ namespace Tools.UI
}
//生成开始、结束日期
string
startDate
=
this
.
tscbMonth
.
Text
+
"-01"
;
string
endDate
=
Convert
.
ToDateTime
(
startDate
).
AddMonths
(
1
).
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
//开始日期所在月份的最后
一天
string
endDate
=
Convert
.
ToDateTime
(
startDate
).
AddMonths
(
1
).
ToString
(
"yyyy-MM-dd"
);
//开始日期所在下个月的第
一天
//考勤数据-分组
var
dic
=
new
Dictionary
<
string
,
List
<
DataRow
>>();
var
rows
=
this
.
_ds
.
Tables
[
0
].
Select
(
$"CreateDate >= '
{
startDate
}
' AND CreateDate <
= '
{
endDate
}
'"
);
var
rows
=
this
.
_ds
.
Tables
[
0
].
Select
(
$"CreateDate >= '
{
startDate
}
' AND CreateDate <
'
{
endDate
}
'"
);
// 注意结束日期是下月第一天,不能包含在内。
var
unionRows
=
this
.
UnionTaskDelayRows
(
rows
,
startDate
,
endDate
);
foreach
(
DataRow
r
in
unionRows
)
{
...
...
Tools/UI/wMuiltTaskSimulate.cs
View file @
c496dfe0
...
...
@@ -117,19 +117,37 @@ namespace Tools.UI
var
method
=
type
.
GetMethod
(
methodName
);
if
(
method
==
null
)
throw
new
Exception
(
$"程序集[
{
dllName
}
]-[
{
className
}
]类中不存在[
{
methodName
}
]方法或重载"
);
Utils
.
AsyncUI
(
wInstance
,
()
=>
ShowMsg
(
$"任务构建完成,准备执行。当前线程:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,任务编号:
{
taskNo
}
"
));
var
objInstance
=
Activator
.
CreateInstance
(
type
);
Utils
.
DoMainAsync
(
wInstance
,
ShowMsg
,
$"任务构建完成,准备执行。当前线程:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,任务编号:
{
taskNo
}
"
);
var
msg
=
$"任务构建完成,准备执行。当前线程:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,任务编号:
{
taskNo
}
"
;
// Utils.AsyncUI(wInstance, () => ShowMsg(msg));
TimeWatch
timeWatch
=
TimeWatch
.
Start
();
try
{
method
.
Invoke
(
objInstance
,
null
);
msg
=
$"任务执行完成、耗时:
{
timeWatch
.
TimeSpan
.
TotalMilliseconds
}
(毫秒),任务编号:
{
taskNo
}
"
;
Utils
.
DoMainAsync
(
wInstance
,
ShowMsg
,
$"任务执行完成、耗时:
{
timeWatch
.
TimeSpan
.
TotalMilliseconds
}
(毫秒),任务编号:
{
taskNo
}
"
);
Utils
.
AsyncUI
(
wInstance
,
()
=>
ShowMsg
(
msg
));
}
catch
(
Exception
ex
)
{
Utils
.
DoMainAsync
(
wInstance
,
ShowMsg
,
$"任务:
{
taskNo
}
执行失败、耗时:
{
timeWatch
.
TimeSpan
.
TotalMilliseconds
}
(毫秒),原因:
{
GetAllMessage
(
ex
)}
"
);
msg
=
$"任务:
{
taskNo
}
执行失败、耗时:
{
timeWatch
.
TimeSpan
.
TotalMilliseconds
}
(毫秒),原因:
{
GetAllMessage
(
ex
)}
"
;
// Utils.DoMainAsync(wInstance, ShowMsg, $"任务:{taskNo}执行失败、耗时:{timeWatch.TimeSpan.TotalMilliseconds} (毫秒),原因:{GetAllMessage(ex)}");
Utils
.
AsyncUI
(
wInstance
,
()
=>
ShowMsg
(
msg
));
}
}
...
...
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