Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
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
黄奎
Education
Commits
92758a76
Commit
92758a76
authored
May 10, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ebb3abc8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
9 deletions
+65
-9
RB_Duty_PlanDetails_ViewModel.cs
Edu.Model/ViewModel/Duty/RB_Duty_PlanDetails_ViewModel.cs
+2
-2
DutyPlanModule.cs
Edu.Module.Duty/DutyPlanModule.cs
+40
-2
DutyPlanController.cs
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
+5
-4
TimerJobj.cs
Edu.WebApi/Timers/TimerJobj.cs
+18
-1
No files found.
Edu.Model/ViewModel/Duty/RB_Duty_PlanDetails_ViewModel.cs
View file @
92758a76
...
...
@@ -82,7 +82,7 @@ namespace Edu.Model.ViewModel.Duty
get
{
string
str
=
Common
.
ConvertHelper
.
FormatTimeStr
(
this
.
CheckTime
);
if
(
str
==
""
)
if
(
str
==
""
||
str
==
"00:00"
)
{
str
=
"未打卡"
;
}
...
...
@@ -98,7 +98,7 @@ namespace Edu.Model.ViewModel.Duty
get
{
string
str
=
Common
.
ConvertHelper
.
FormatTimeStr
(
this
.
FinishTime
);
if
(
str
==
"
"
)
if
(
str
==
""
||
str
==
"00:00
"
)
{
str
=
"未打卡"
;
}
...
...
Edu.Module.Duty/DutyPlanModule.cs
View file @
92758a76
...
...
@@ -491,12 +491,30 @@ namespace Edu.Module.Duty
result
.
Add
(
"Id"
,
model
?.
Id
);
result
.
Add
(
"PlanDate"
,
Common
.
ConvertHelper
.
FormatDate
(
model
?.
Date
));
result
.
Add
(
"WeekDay"
,
Common
.
ConvertHelper
.
GetWeekDay
(
model
?.
Date
));
result
.
Add
(
"CheckTime"
,
currentModel
?.
CheckTimeStr
);
result
.
Add
(
"CheckLateTime"
,
currentModel
?.
CheckLateTime
);
result
.
Add
(
"CheckLateTimeStr"
,
(
currentModel
?.
CheckLateTime
>
0
?
string
.
Format
(
"[迟到{0}分钟]"
,
currentModel
.
CheckLateTime
)
:
"[正常]"
));
if
(
currentModel
?.
CheckTimeStr
!=
"未打卡"
)
{
result
.
Add
(
"CheckLateTimeStr"
,
(
currentModel
?.
CheckLateTime
>
0
?
string
.
Format
(
"[迟到{0}分钟]"
,
currentModel
.
CheckLateTime
)
:
"[正常]"
));
}
else
{
result
.
Add
(
"CheckLateTimeStr"
,
""
);
}
result
.
Add
(
"FinishTime"
,
currentModel
?.
FinishTimeStr
);
result
.
Add
(
"FinishLateTime"
,
currentModel
?.
FinishLateTime
);
result
.
Add
(
"FinishLateTimeStr"
,
(
currentModel
?.
FinishLateTime
>
0
?
string
.
Format
(
"[早退{0}分钟]"
,
currentModel
.
FinishLateTime
)
:
"[正常]"
));
if
(
currentModel
?.
FinishTimeStr
!=
"未打卡"
)
{
result
.
Add
(
"FinishLateTimeStr"
,
(
currentModel
?.
FinishLateTime
>
0
?
string
.
Format
(
"[早退{0}分钟]"
,
currentModel
.
FinishLateTime
)
:
"[正常]"
));
}
else
{
result
.
Add
(
"FinishLateTimeStr"
,
""
);
}
result
.
Add
(
"SchoolName"
,
model
?.
SchoolName
);
result
.
Add
(
"ShiftName"
,
currentModel
?.
ShiftName
);
result
.
Add
(
"StartTime"
,
currentModel
?.
StartTime
);
...
...
@@ -914,6 +932,26 @@ namespace Edu.Module.Duty
return
flag
;
}
/// <summary>
/// 更新用户【值班完成】状态
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
bool
UpdateDutyFinishedModule
(
int
Id
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Duty_PlanDetails_ViewModel
.
Status
),
(
int
)
DutyStatusEnum
.
DutyFinished
},
{
nameof
(
RB_Duty_PlanDetails_ViewModel
.
FinishTime
),
null
},
};
List
<
WhereHelper
>
list
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(
nameof
(
RB_Duty_PlanDetails_ViewModel
.
Id
),
Id
),
};
var
flag
=
duty_PlanDetailsRepository
.
Update
(
fileds
,
list
);
return
flag
;
}
/// <summary>
/// 新增修改值班事项
/// </summary>
...
...
Edu.WebApi/Controllers/Duty/DutyPlanController.cs
View file @
92758a76
...
...
@@ -87,10 +87,10 @@ namespace Edu.WebApi.Controllers.Duty
qitem
.
StatusStr
,
qitem
.
CheckTimeStr
,
qitem
.
CheckLateTime
,
CheckLateTimeStr
=
(
qitem
.
Check
LateTime
>
0
?
string
.
Format
(
"[迟到{0}分钟]"
,
qitem
.
CheckLateTime
)
:
"[正常]
"
),
CheckLateTimeStr
=
(
qitem
.
Check
TimeStr
!=
"未打卡"
?(
qitem
.
CheckLateTime
>
0
?
string
.
Format
(
"[迟到{0}分钟]"
,
qitem
.
CheckLateTime
)
:
"[正常]"
):
"
"
),
qitem
.
FinishTimeStr
,
qitem
.
FinishLateTime
,
FinishLateTimeStr
=
(
qitem
.
Finish
LateTime
>
0
?
string
.
Format
(
"[早退{0}分钟]"
,
qitem
.
FinishLateTime
)
:
"[正常]
"
),
FinishLateTimeStr
=
(
qitem
.
Finish
TimeStr
!=
"未打卡"
?(
qitem
.
FinishLateTime
>
0
?
string
.
Format
(
"[早退{0}分钟]"
,
qitem
.
FinishLateTime
)
:
"[正常]"
):
"
"
),
})
});
}
...
...
@@ -170,10 +170,11 @@ namespace Edu.WebApi.Controllers.Duty
item
.
TotalHandoverCount
,
currentModel
.
CheckTimeStr
,
currentModel
.
CheckLateTime
,
CheckLateTimeStr
=
(
currentModel
.
CheckLateTime
>
0
?
string
.
Format
(
"[迟到{0}分钟]"
,
currentModel
.
CheckLateTime
)
:
"[正常]"
),
CheckLateTimeStr
=
(
currentModel
.
CheckTimeStr
!=
"未打卡"
?
(
currentModel
.
CheckLateTime
>
0
?
string
.
Format
(
"[迟到{0}分钟]"
,
currentModel
.
CheckLateTime
)
:
"[正常]"
)
:
""
),
currentModel
.
FinishTimeStr
,
currentModel
.
FinishLateTime
,
FinishLateTimeStr
=
(
currentModel
.
Finish
LateTime
>
0
?
string
.
Format
(
"[早退{0}分钟]"
,
currentModel
.
FinishLateTime
)
:
"[正常]
"
),
FinishLateTimeStr
=
(
currentModel
.
Finish
TimeStr
!=
"未打卡"
?
(
currentModel
.
FinishLateTime
>
0
?
string
.
Format
(
"[早退{0}分钟]"
,
currentModel
.
FinishLateTime
)
:
"[正常]"
)
:
"
"
),
});
}
pageModel
.
Count
=
rowsCount
;
...
...
Edu.WebApi/Timers/TimerJobj.cs
View file @
92758a76
...
...
@@ -22,7 +22,7 @@ namespace Edu.WebApi.Timers
timer1
.
Enabled
=
true
;
timer2
=
new
System
.
Timers
.
Timer
();
timer2
.
Interval
=
(
1000
*
60
)
*
(
60
*
2
);
//2
小时执行一次
timer2
.
Interval
=
(
1000
*
60
)
*
(
1
);
//1
小时执行一次
timer2
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
DealDuty
);
timer2
.
Enabled
=
true
;
}
...
...
@@ -112,6 +112,23 @@ namespace Edu.WebApi.Timers
}
}
}
var
list2
=
dutyPlanModule
.
GetDutyPlanPageModule
(
1
,
20
,
out
_
,
new
Model
.
ViewModel
.
Duty
.
RB_Duty_Plan_ViewModel
()
{
QDutyStatus
=
1
,
QEndDate
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
)
});
foreach
(
var
item
in
list2
)
{
foreach
(
var
subItem
in
item
.
PlanDetails
)
{
var
endTime
=
Convert
.
ToDateTime
((
Common
.
ConvertHelper
.
FormatDate
(
item
.
Date
)
+
" "
+
subItem
.
EndTime
)).
AddHours
(
2
);
if
(
subItem
.
Status
==
Common
.
Enum
.
Duty
.
DutyStatusEnum
.
DutyIng
&&
endTime
<
DateTime
.
Now
)
{
dutyPlanModule
.
UpdateDutyFinishedModule
(
subItem
.
Id
);
}
}
}
Interlocked
.
Exchange
(
ref
inTimer2
,
0
);
}
}
...
...
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