Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
dd124219
Commit
dd124219
authored
Apr 14, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考勤统计补全0的类型
parent
ee3a94d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
performance/Performance.Services/AttendanceService.cs
+16
-8
No files found.
performance/Performance.Services/AttendanceService.cs
View file @
dd124219
...
...
@@ -292,8 +292,8 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
public
ApiResponse
<
List
<
per_attendance_type
>>
GetAttendanceType
(
int
allotId
,
int
hospitalId
)
{
var
result
=
perfoPperAttendanceTypeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
HospitalId
==
hospitalId
).
ToList
();
if
(
result
!=
null
)
return
new
ApiResponse
<
List
<
per_attendance_type
>>(
ResponseType
.
OK
,
result
);
if
(
result
!=
null
)
return
new
ApiResponse
<
List
<
per_attendance_type
>>(
ResponseType
.
OK
,
result
);
else
{
return
new
ApiResponse
<
List
<
per_attendance_type
>>(
ResponseType
.
Fail
);
...
...
@@ -525,8 +525,8 @@ public ApiResponse AttendanceBatch(int allotId, int hospitalId, SaveCollectData
}
if
(
any
)
error
.
Add
(
new
Dictionary
<
string
,
string
>
if
(
any
)
error
.
Add
(
new
Dictionary
<
string
,
string
>
{
{
"行号"
,
$"第
{
i
+
1
}
行"
},
{
"人员工号"
,
newAttendanceVacatione
[
i
].
PersonnelNumber
??
""
},
...
...
@@ -634,12 +634,20 @@ public ApiResponse<List<AttendanceStatistics>> GetAttendanceStatistics(int allot
})
.
ToList
();
int
vacationesDays
=
0
;
foreach
(
var
item
in
stat
.
Detial
)
foreach
(
var
item
in
types
)
{
if
(!
item
.
Remark
.
Contains
(
"不核减"
))
vacationesDays
+=
item
.
Value
;
if
(!
stat
.
Detial
.
Any
(
w
=>
w
.
Title
==
item
.
AttendanceName
))
{
stat
.
Detial
.
Add
(
new
AttendanceStatisticsDetial
{
Title
=
item
.
AttendanceName
,
Value
=
0
,
Remark
=
item
.
IsDeduction
==
(
int
)
Attendance
.
Deduction
.
核减
?
"核减"
:
"不核减"
,
});
}
}
int
vacationesDays
=
stat
.
Detial
.
Where
(
w
=>
!
w
.
Remark
.
Contains
(
"不核减"
)).
Sum
(
w
=>
w
.
Value
);
stat
.
AttendanceDays
=
SplitEveryDay
(
stat
.
BeginDate
,
stat
.
EndDate
).
Where
(
date
=>
date
>=
stat
.
BeginDate
&&
date
<=
stat
.
EndDate
).
Count
()
-
vacationesDays
;
}
return
new
ApiResponse
<
List
<
AttendanceStatistics
>>(
ResponseType
.
OK
,
""
,
statistics
);
...
...
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