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
8557ff6a
Commit
8557ff6a
authored
Aug 29, 2022
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量添加人员字典正确核算组别判断
parent
968e980b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
performance/Performance.Services/PersonService.cs
+6
-6
No files found.
performance/Performance.Services/PersonService.cs
View file @
8557ff6a
...
@@ -383,7 +383,7 @@ public bool DeletePerson(int employeeId)
...
@@ -383,7 +383,7 @@ public bool DeletePerson(int employeeId)
if
(
employee
==
null
)
if
(
employee
==
null
)
throw
new
PerformanceException
(
$"员工信息错误!"
);
throw
new
PerformanceException
(
$"员工信息错误!"
);
var
oldbackup
=
perforPeremployeeBackupRepository
.
GetEntity
(
t
=>
t
.
Id
==
employee
.
Id
);
var
oldbackup
=
perforPeremployeeBackupRepository
.
GetEntity
(
t
=>
t
.
Id
==
employee
.
Id
);
if
(
oldbackup
!=
null
)
if
(
oldbackup
!=
null
)
perforPeremployeeBackupRepository
.
Remove
(
oldbackup
);
perforPeremployeeBackupRepository
.
Remove
(
oldbackup
);
...
@@ -402,7 +402,7 @@ public bool DeleteAllPerson(int allotId)
...
@@ -402,7 +402,7 @@ public bool DeleteAllPerson(int allotId)
{
{
var
employees
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
)
var
employees
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
)
??
new
List
<
per_employee
>();
??
new
List
<
per_employee
>();
dapperService
.
PerEmployeeBackup
(
allotId
);
dapperService
.
PerEmployeeBackup
(
allotId
);
return
peremployeeRepository
.
RemoveRange
(
employees
.
ToArray
());
return
peremployeeRepository
.
RemoveRange
(
employees
.
ToArray
());
...
@@ -852,7 +852,7 @@ public ApiResponse BathSavePerson(int allotId, int HospitalId, SaveCollectData r
...
@@ -852,7 +852,7 @@ public ApiResponse BathSavePerson(int allotId, int HospitalId, SaveCollectData r
var
jsons
=
JsonHelper
.
Serialize
(
dicData
);
var
jsons
=
JsonHelper
.
Serialize
(
dicData
);
var
newEmployees
=
JsonHelper
.
Deserialize
<
List
<
per_employee
>>(
jsons
);
var
newEmployees
=
JsonHelper
.
Deserialize
<
List
<
per_employee
>>(
jsons
);
var
oldEmployees
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
&&
t
.
AllotId
==
allotId
);
var
oldEmployees
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
&&
t
.
AllotId
==
allotId
);
var
accountinglist
=
perforCofaccountingRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
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
<
newEmployees
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
newEmployees
.
Count
;
i
++)
...
@@ -909,8 +909,8 @@ public ApiResponse BathSavePerson(int allotId, int HospitalId, SaveCollectData r
...
@@ -909,8 +909,8 @@ public ApiResponse BathSavePerson(int allotId, int HospitalId, SaveCollectData r
});
});
}
}
var
accounting
list
=
perforCofaccountingRepository
.
GetEntity
(
w
=>
w
.
UnitType
==
newEmployees
[
i
].
UnitType
&&
w
.
AccountingUnit
==
newEmployees
[
i
].
AccountingUnit
);
var
accounting
Unit
=
accountinglist
.
FirstOrDefault
(
w
=>
w
.
UnitType
==
newEmployees
[
i
].
UnitType
&&
w
.
AccountingUnit
==
newEmployees
[
i
].
AccountingUnit
);
if
(
accounting
lis
t
==
null
)
if
(
accounting
Uni
t
==
null
)
{
{
error
.
Add
(
new
Dictionary
<
string
,
string
>
error
.
Add
(
new
Dictionary
<
string
,
string
>
{
{
...
@@ -980,7 +980,7 @@ public ApiResponse BathSavePerson(int allotId, int HospitalId, SaveCollectData r
...
@@ -980,7 +980,7 @@ public ApiResponse BathSavePerson(int allotId, int HospitalId, SaveCollectData r
employees
.
ForEach
(
e
=>
employees
.
ForEach
(
e
=>
{
{
var
result
=
backupTab
.
FirstOrDefault
(
d
=>
d
.
PersonnelNumber
.
Contains
(
e
.
PersonnelNumber
)
&&
d
.
AllotId
==
e
.
AllotId
&&
d
.
HospitalId
==
e
.
HospitalId
);
var
result
=
backupTab
.
FirstOrDefault
(
d
=>
d
.
PersonnelNumber
.
Contains
(
e
.
PersonnelNumber
)
&&
d
.
AllotId
==
e
.
AllotId
&&
d
.
HospitalId
==
e
.
HospitalId
);
if
(
result
!=
null
)
if
(
result
!=
null
)
{
{
e
.
JobNumber
=
result
.
JobNumber
;
e
.
JobNumber
=
result
.
JobNumber
;
e
.
JobCategory
=
result
.
JobCategory
;
e
.
JobCategory
=
result
.
JobCategory
;
...
...
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