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
97ba3478
Commit
97ba3478
authored
Dec 22, 2022
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员字典添加时获取月份超出
parent
78453b6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
performance/Performance.Services/PersonService.cs
+4
-3
No files found.
performance/Performance.Services/PersonService.cs
View file @
97ba3478
...
@@ -281,7 +281,7 @@ public ApiResponse CreatePerson(PerEmployeeResponse request)
...
@@ -281,7 +281,7 @@ public ApiResponse CreatePerson(PerEmployeeResponse request)
var
entity
=
_mapper
.
Map
<
per_employee
>(
request
);
var
entity
=
_mapper
.
Map
<
per_employee
>(
request
);
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
AllotId
);
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
AllotId
);
int
day
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
;
int
day
=
allot
.
Month
<=
12
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
entity
.
Attendance
=
request
.
AttendanceDay
/
day
;
entity
.
Attendance
=
request
.
AttendanceDay
/
day
;
entity
.
CreateTime
=
DateTime
.
Now
;
entity
.
CreateTime
=
DateTime
.
Now
;
entity
.
IsVerify
=
1
;
entity
.
IsVerify
=
1
;
...
@@ -295,7 +295,7 @@ public ApiResponse CreatePerson(PerEmployeeResponse request)
...
@@ -295,7 +295,7 @@ public ApiResponse CreatePerson(PerEmployeeResponse request)
perallotRepository
.
AccoungtingVerify
(
entity
.
AllotId
??
0
);
perallotRepository
.
AccoungtingVerify
(
entity
.
AllotId
??
0
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"添加成功"
,
entity
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"添加成功"
,
entity
);
}
}
...
@@ -373,7 +373,8 @@ public ApiResponse UpdatePerson(PerEmployeeResponse request)
...
@@ -373,7 +373,8 @@ public ApiResponse UpdatePerson(PerEmployeeResponse request)
// 出勤率
// 出勤率
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
AllotId
);
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
AllotId
);
var
day
=
(
decimal
)
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
var
day
=
allot
.
Month
<=
12
?
(
decimal
)
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
employee
.
Attendance
=
Math
.
Round
((
request
.
AttendanceDay
??
0
)
/
day
,
4
);
employee
.
Attendance
=
Math
.
Round
((
request
.
AttendanceDay
??
0
)
/
day
,
4
);
//CheckAccountingDept(request.HospitalId.Value, request.AccountingUnit, request.Department);
//CheckAccountingDept(request.HospitalId.Value, request.AccountingUnit, request.Department);
...
...
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