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
26a6d560
Commit
26a6d560
authored
Apr 07, 2023
by
ruyun.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调动记录批量粘贴默认人员系数
parent
2c78f1de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
performance/Performance.Services/AttendanceService.cs
+12
-5
No files found.
performance/Performance.Services/AttendanceService.cs
View file @
26a6d560
...
@@ -214,7 +214,8 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
...
@@ -214,7 +214,8 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
CallInAccountingUnit
=
w
[
"CallInAccountingUnit"
],
CallInAccountingUnit
=
w
[
"CallInAccountingUnit"
],
CallInUnitType
=
w
[
"CallInUnitType"
],
CallInUnitType
=
w
[
"CallInUnitType"
],
CallInDate
=
ConvertHelper
.
To
<
DateTime
>(
w
[
"CallInDate"
]),
CallInDate
=
ConvertHelper
.
To
<
DateTime
>(
w
[
"CallInDate"
]),
});
PermanentStaff
=
ConvertHelper
.
To
<
decimal
?>(
w
[
"PermanentStaff"
]),
}).
ToList
();
var
jsons
=
JsonHelper
.
Serialize
(
convertDicData
);
var
jsons
=
JsonHelper
.
Serialize
(
convertDicData
);
var
newAttendanceVacatione
=
JsonHelper
.
Deserialize
<
List
<
per_attendance
>>(
jsons
);
var
newAttendanceVacatione
=
JsonHelper
.
Deserialize
<
List
<
per_attendance
>>(
jsons
);
...
@@ -226,13 +227,11 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
...
@@ -226,13 +227,11 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
var
cofaccounting
=
cofaccountingRepository
.
GetEntities
(
ca
=>
ca
.
AllotId
==
allotId
);
var
cofaccounting
=
cofaccountingRepository
.
GetEntities
(
ca
=>
ca
.
AllotId
==
allotId
);
var
per_employee
=
perforPeremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
HospitalId
==
hospitalId
);
var
employees
=
perforPeremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
HospitalId
==
hospitalId
);
List
<
Dictionary
<
string
,
string
>>
error
=
new
List
<
Dictionary
<
string
,
string
>>();
List
<
Dictionary
<
string
,
string
>>
error
=
new
List
<
Dictionary
<
string
,
string
>>();
for
(
int
i
=
0
;
i
<
newAttendanceVacatione
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
newAttendanceVacatione
.
Count
;
i
++)
{
{
if
(
string
.
IsNullOrEmpty
(
newAttendanceVacatione
[
i
].
PersonnelName
?.
Trim
())
if
(
string
.
IsNullOrEmpty
(
newAttendanceVacatione
[
i
].
PersonnelName
?.
Trim
())
||
string
.
IsNullOrEmpty
(
newAttendanceVacatione
[
i
].
PersonnelNumber
?.
Trim
())
||
string
.
IsNullOrEmpty
(
newAttendanceVacatione
[
i
].
PersonnelNumber
?.
Trim
())
||
string
.
IsNullOrEmpty
(
newAttendanceVacatione
[
i
].
CallInAccountingUnit
?.
Trim
())
||
string
.
IsNullOrEmpty
(
newAttendanceVacatione
[
i
].
CallInAccountingUnit
?.
Trim
())
...
@@ -247,6 +246,7 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
...
@@ -247,6 +246,7 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
{
"调入核算单元"
,
newAttendanceVacatione
[
i
].
CallInAccountingUnit
??
""
},
{
"调入核算单元"
,
newAttendanceVacatione
[
i
].
CallInAccountingUnit
??
""
},
{
"调入组别"
,
newAttendanceVacatione
[
i
].
CallInUnitType
??
""
},
{
"调入组别"
,
newAttendanceVacatione
[
i
].
CallInUnitType
??
""
},
{
"调入时间"
,
newAttendanceVacatione
[
i
].
CallInDate
?.
ToString
(
"d"
)??
""
},
{
"调入时间"
,
newAttendanceVacatione
[
i
].
CallInDate
?.
ToString
(
"d"
)??
""
},
{
"人员系数"
,
newAttendanceVacatione
[
i
].
PermanentStaff
?.
ToString
()??
""
},
{
"来源"
,
"粘贴数据"
},
{
"来源"
,
"粘贴数据"
},
{
"错误原因"
,
"“关键信息缺失”请补全或删除"
},
{
"错误原因"
,
"“关键信息缺失”请补全或删除"
},
});
});
...
@@ -264,6 +264,7 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
...
@@ -264,6 +264,7 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
{
"调入核算单元"
,
newAttendanceVacatione
[
i
].
CallInAccountingUnit
??
""
},
{
"调入核算单元"
,
newAttendanceVacatione
[
i
].
CallInAccountingUnit
??
""
},
{
"调入组别"
,
newAttendanceVacatione
[
i
].
CallInUnitType
??
""
},
{
"调入组别"
,
newAttendanceVacatione
[
i
].
CallInUnitType
??
""
},
{
"调入时间"
,
newAttendanceVacatione
[
i
].
CallInDate
?.
ToString
(
"d"
)??
""
},
{
"调入时间"
,
newAttendanceVacatione
[
i
].
CallInDate
?.
ToString
(
"d"
)??
""
},
{
"人员系数"
,
newAttendanceVacatione
[
i
].
PermanentStaff
?.
ToString
()??
""
},
{
"来源"
,
"粘贴数据"
},
{
"来源"
,
"粘贴数据"
},
{
"错误原因"
,
$"调入时间不在当前绩效月份范围内,已超出
{
SplitEveryDay
(
dt
.
AddDays
(-
1
),
newAttendanceVacatione
[
i
].
CallInDate
.
Value
).
Count
-
1
}
天"
},
{
"错误原因"
,
$"调入时间不在当前绩效月份范围内,已超出
{
SplitEveryDay
(
dt
.
AddDays
(-
1
),
newAttendanceVacatione
[
i
].
CallInDate
.
Value
).
Count
-
1
}
天"
},
});
});
...
@@ -280,12 +281,13 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
...
@@ -280,12 +281,13 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
{
"调入核算单元"
,
newAttendanceVacatione
[
i
].
CallInAccountingUnit
??
""
},
{
"调入核算单元"
,
newAttendanceVacatione
[
i
].
CallInAccountingUnit
??
""
},
{
"调入组别"
,
newAttendanceVacatione
[
i
].
CallInUnitType
??
""
},
{
"调入组别"
,
newAttendanceVacatione
[
i
].
CallInUnitType
??
""
},
{
"调入时间"
,
newAttendanceVacatione
[
i
].
CallInDate
?.
ToString
(
"d"
)??
""
},
{
"调入时间"
,
newAttendanceVacatione
[
i
].
CallInDate
?.
ToString
(
"d"
)??
""
},
{
"人员系数"
,
newAttendanceVacatione
[
i
].
PermanentStaff
?.
ToString
()??
""
},
{
"来源"
,
"粘贴数据"
},
{
"来源"
,
"粘贴数据"
},
{
"错误原因"
,
"该核算单元的调入组别不一致或不存在"
},
{
"错误原因"
,
"该核算单元的调入组别不一致或不存在"
},
});
});
}
}
if
(
newAttendanceVacatione
[
i
].
PersonnelName
!=
per_employee
.
FirstOrDefault
(
t
=>
t
.
PersonnelNumber
==
newAttendanceVacatione
[
i
].
PersonnelNumber
&&
t
.
AllotId
==
allotId
&&
t
.
HospitalId
==
hospitalId
)?.
DoctorName
)
if
(
newAttendanceVacatione
[
i
].
PersonnelName
!=
employees
.
FirstOrDefault
(
t
=>
t
.
PersonnelNumber
==
newAttendanceVacatione
[
i
].
PersonnelNumber
&&
t
.
AllotId
==
allotId
&&
t
.
HospitalId
==
hospitalId
)?.
DoctorName
)
{
{
error
.
Add
(
new
Dictionary
<
string
,
string
>
error
.
Add
(
new
Dictionary
<
string
,
string
>
{
{
...
@@ -295,6 +297,7 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
...
@@ -295,6 +297,7 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
{
"调入核算单元"
,
newAttendanceVacatione
[
i
].
CallInAccountingUnit
??
""
},
{
"调入核算单元"
,
newAttendanceVacatione
[
i
].
CallInAccountingUnit
??
""
},
{
"调入组别"
,
newAttendanceVacatione
[
i
].
CallInUnitType
??
""
},
{
"调入组别"
,
newAttendanceVacatione
[
i
].
CallInUnitType
??
""
},
{
"调入时间"
,
newAttendanceVacatione
[
i
].
CallInDate
?.
ToString
(
"d"
)??
""
},
{
"调入时间"
,
newAttendanceVacatione
[
i
].
CallInDate
?.
ToString
(
"d"
)??
""
},
{
"人员系数"
,
newAttendanceVacatione
[
i
].
PermanentStaff
?.
ToString
()??
""
},
{
"来源"
,
"粘贴数据"
},
{
"来源"
,
"粘贴数据"
},
{
"错误原因"
,
"该人员与人员字典不一致或不存在"
},
{
"错误原因"
,
"该人员与人员字典不一致或不存在"
},
});
});
...
@@ -310,6 +313,7 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
...
@@ -310,6 +313,7 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
{
"调入核算单元"
,
newAttendanceVacatione
[
i
].
CallInAccountingUnit
??
""
},
{
"调入核算单元"
,
newAttendanceVacatione
[
i
].
CallInAccountingUnit
??
""
},
{
"调入组别"
,
newAttendanceVacatione
[
i
].
CallInUnitType
??
""
},
{
"调入组别"
,
newAttendanceVacatione
[
i
].
CallInUnitType
??
""
},
{
"调入时间"
,
newAttendanceVacatione
[
i
].
CallInDate
?.
ToString
(
"d"
)??
""
},
{
"调入时间"
,
newAttendanceVacatione
[
i
].
CallInDate
?.
ToString
(
"d"
)??
""
},
{
"人员系数"
,
newAttendanceVacatione
[
i
].
PermanentStaff
?.
ToString
()??
""
},
{
"来源"
,
"“粘贴数据”与“历史数据”比对"
},
{
"来源"
,
"“粘贴数据”与“历史数据”比对"
},
{
"错误原因"
,
$"原名“
{
oldEmp
.
PersonnelName
}
”,工号相同但姓名不同,请删除“历史数据”中该员工"
},
{
"错误原因"
,
$"原名“
{
oldEmp
.
PersonnelName
}
”,工号相同但姓名不同,请删除“历史数据”中该员工"
},
});
});
...
@@ -324,6 +328,9 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
...
@@ -324,6 +328,9 @@ public ApiResponse BatchCallIn(int allotId, int hospitalId, SaveCollectData requ
{
{
data
.
AllotId
=
allotId
;
data
.
AllotId
=
allotId
;
data
.
HospitalId
=
hospitalId
;
data
.
HospitalId
=
hospitalId
;
data
.
PermanentStaff
=
data
.
PermanentStaff
.
HasValue
?
data
.
PermanentStaff
:
employees
.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
data
.
PersonnelNumber
)?.
PermanentStaff
;
addPer_Attendances
.
Add
(
data
);
addPer_Attendances
.
Add
(
data
);
var
any
=
oldCallinAttendance
.
FirstOrDefault
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
HospitalId
==
hospitalId
&&
w
.
CallInDate
==
data
.
CallInDate
&&
w
.
CallInAccountingUnit
?.
Trim
()
==
data
.
CallInAccountingUnit
?.
Trim
()
&&
w
.
CallInUnitType
?.
Trim
()
==
data
.
CallInUnitType
?.
Trim
()
&&
w
.
PersonnelName
?.
Trim
()
==
data
.
PersonnelName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
data
.
PersonnelNumber
?.
Trim
());
var
any
=
oldCallinAttendance
.
FirstOrDefault
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
HospitalId
==
hospitalId
&&
w
.
CallInDate
==
data
.
CallInDate
&&
w
.
CallInAccountingUnit
?.
Trim
()
==
data
.
CallInAccountingUnit
?.
Trim
()
&&
w
.
CallInUnitType
?.
Trim
()
==
data
.
CallInUnitType
?.
Trim
()
&&
w
.
PersonnelName
?.
Trim
()
==
data
.
PersonnelName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
data
.
PersonnelNumber
?.
Trim
());
}
}
...
...
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