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
5787d30b
Commit
5787d30b
authored
Apr 12, 2023
by
wyc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'考勤下发' 新增\修改调动记录 条件
parent
4d617ba9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
performance/Performance.Services/AttendanceService.cs
+10
-1
No files found.
performance/Performance.Services/AttendanceService.cs
View file @
5787d30b
...
@@ -365,6 +365,10 @@ public ApiResponse AttendanceAdd(int allotId, AttendanceData request)
...
@@ -365,6 +365,10 @@ public ApiResponse AttendanceAdd(int allotId, AttendanceData request)
var
allot
=
perforPerallotRepository
.
GetEntity
(
w
=>
w
.
ID
==
allotId
);
var
allot
=
perforPerallotRepository
.
GetEntity
(
w
=>
w
.
ID
==
allotId
);
if
(
allot
==
null
)
if
(
allot
==
null
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
cofaccounting
=
cofaccountingRepository
.
GetEntities
(
ca
=>
ca
.
AllotId
==
allotId
);
if
(!
cofaccounting
.
Any
(
t
=>
t
.
AccountingUnit
==
request
.
CallInAccountingUnit
&&
t
.
UnitType
==
request
.
CallInUnitType
))
throw
new
PerformanceException
(
"当前“核算组别与核算单元”无法对应,请检查后重试!"
);
var
data
=
mapper
.
Map
<
per_attendance
>(
request
);
var
data
=
mapper
.
Map
<
per_attendance
>(
request
);
data
.
AllotId
=
allotId
;
data
.
AllotId
=
allotId
;
data
.
HospitalId
=
allot
.
HospitalId
;
data
.
HospitalId
=
allot
.
HospitalId
;
...
@@ -382,8 +386,8 @@ public ApiResponse AttendanceAdd(int allotId, AttendanceData request)
...
@@ -382,8 +386,8 @@ public ApiResponse AttendanceAdd(int allotId, AttendanceData request)
{
{
data
.
CallInDate
=
new
DateTime
(
allot
.
Year
,
allot
.
Month
,
1
);
data
.
CallInDate
=
new
DateTime
(
allot
.
Year
,
allot
.
Month
,
1
);
}
}
perforPerAttendanceRepository
.
Add
(
data
);
perforPerAttendanceRepository
.
Add
(
data
);
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
...
@@ -394,6 +398,11 @@ public ApiResponse AttendanceUpdate(int allotId, AttendanceUpdateData request)
...
@@ -394,6 +398,11 @@ public ApiResponse AttendanceUpdate(int allotId, AttendanceUpdateData request)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
data
=
perforPerAttendanceRepository
.
GetEntity
(
w
=>
w
.
Id
==
request
.
AttendanceId
&&
w
.
AllotId
==
allotId
);
var
data
=
perforPerAttendanceRepository
.
GetEntity
(
w
=>
w
.
Id
==
request
.
AttendanceId
&&
w
.
AllotId
==
allotId
);
if
(
data
==
null
)
throw
new
PerformanceException
(
"当前调动记录不存在"
);
if
(
data
==
null
)
throw
new
PerformanceException
(
"当前调动记录不存在"
);
var
cofaccounting
=
cofaccountingRepository
.
GetEntities
(
ca
=>
ca
.
AllotId
==
allotId
);
if
(!
cofaccounting
.
Any
(
t
=>
t
.
AccountingUnit
==
request
.
CallInAccountingUnit
&&
t
.
UnitType
==
request
.
CallInUnitType
))
throw
new
PerformanceException
(
"当前“核算组别与核算单元”无法对应,请检查后重试!"
);
data
.
PermanentStaff
=
request
.
PermanentStaff
;
data
.
PermanentStaff
=
request
.
PermanentStaff
;
data
.
CallInUnitType
=
request
.
CallInUnitType
;
data
.
CallInUnitType
=
request
.
CallInUnitType
;
data
.
CallInAccountingUnit
=
request
.
CallInAccountingUnit
;
data
.
CallInAccountingUnit
=
request
.
CallInAccountingUnit
;
...
...
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