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
aa48fbc7
Commit
aa48fbc7
authored
Aug 11, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
空字典错误过滤
parent
bb6b2950
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
performance/Performance.Services/RedistributionService.cs
+6
-6
No files found.
performance/Performance.Services/RedistributionService.cs
View file @
aa48fbc7
...
@@ -451,7 +451,7 @@ List<ag_bodysource> LoadEmployeeByDictionary(ag_secondallot second, List<per_emp
...
@@ -451,7 +451,7 @@ List<ag_bodysource> LoadEmployeeByDictionary(ag_secondallot second, List<per_emp
List
<
ag_bodysource
>
loadDatas
=
new
List
<
ag_bodysource
>();
List
<
ag_bodysource
>
loadDatas
=
new
List
<
ag_bodysource
>();
foreach
(
var
personnelNumber
in
numbers
)
foreach
(
var
personnelNumber
in
numbers
)
{
{
var
existEmp
=
employees
.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
?.
Trim
()
==
personnelNumber
?.
Trim
());
var
existEmp
=
employees
?
.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
?.
Trim
()
==
personnelNumber
?.
Trim
());
var
data
=
new
ag_bodysource
var
data
=
new
ag_bodysource
{
{
...
@@ -1249,7 +1249,7 @@ public List<SecondComputeCheckResultDto> CheckData(ag_secondallot second, Comput
...
@@ -1249,7 +1249,7 @@ public List<SecondComputeCheckResultDto> CheckData(ag_secondallot second, Comput
List
<
SecondComputeCheckResultDto
>
result
=
new
List
<
SecondComputeCheckResultDto
>();
List
<
SecondComputeCheckResultDto
>
result
=
new
List
<
SecondComputeCheckResultDto
>();
var
employees
=
_peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
)
var
employees
=
_peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
)
.
Select
(
w
=>
new
{
w
.
PersonnelNumber
,
w
.
DoctorName
,
w
.
AccountingUnit
,
w
.
UnitType
,
w
.
ReservedRatio
});
?
.
Select
(
w
=>
new
{
w
.
PersonnelNumber
,
w
.
DoctorName
,
w
.
AccountingUnit
,
w
.
UnitType
,
w
.
ReservedRatio
});
var
handsonTable
=
GetHandsonTable
(
computeMode
,
loads
);
var
handsonTable
=
GetHandsonTable
(
computeMode
,
loads
);
var
fixat
=
new
string
[]
{
nameof
(
ag_bodysource
.
Id
).
ToLower
(),
nameof
(
ag_bodysource
.
SecondId
).
ToLower
(),
nameof
(
ag_bodysource
.
Department
).
ToLower
()
};
var
fixat
=
new
string
[]
{
nameof
(
ag_bodysource
.
Id
).
ToLower
(),
nameof
(
ag_bodysource
.
SecondId
).
ToLower
(),
nameof
(
ag_bodysource
.
Department
).
ToLower
()
};
...
@@ -1266,17 +1266,17 @@ public List<SecondComputeCheckResultDto> CheckData(ag_secondallot second, Comput
...
@@ -1266,17 +1266,17 @@ public List<SecondComputeCheckResultDto> CheckData(ag_secondallot second, Comput
item
.
AddOrUpdate
(
nameof
(
ResponseType
),
ResponseType
.
Warning
);
item
.
AddOrUpdate
(
nameof
(
ResponseType
),
ResponseType
.
Warning
);
result
.
Add
(
new
SecondComputeCheckResultDto
(
nameof
(
ResponseType
.
Error
),
"空"
,
"空"
,
$"第
{(
i
+
1
)}
行,工号或姓名无效;请删除!"
));
result
.
Add
(
new
SecondComputeCheckResultDto
(
nameof
(
ResponseType
.
Error
),
"空"
,
"空"
,
$"第
{(
i
+
1
)}
行,工号或姓名无效;请删除!"
));
}
}
else
if
(!
employees
.
Any
(
w
=>
w
.
PersonnelNumber
==
number
&&
w
.
DoctorName
==
name
))
else
if
(
employees
==
null
||
!
employees
.
Any
(
w
=>
w
.
PersonnelNumber
==
number
&&
w
.
DoctorName
==
name
))
{
{
item
.
AddOrUpdate
(
nameof
(
ResponseType
),
ResponseType
.
Error
);
item
.
AddOrUpdate
(
nameof
(
ResponseType
),
ResponseType
.
Error
);
result
.
Add
(
new
SecondComputeCheckResultDto
(
nameof
(
ResponseType
.
Error
),
number
,
name
,
$"第
{(
i
+
1
)}
行,工号和姓名在字典中不存在,请修复!"
));
result
.
Add
(
new
SecondComputeCheckResultDto
(
nameof
(
ResponseType
.
Error
),
number
,
name
,
$"第
{(
i
+
1
)}
行,工号和姓名在字典中不存在,请修复!"
));
}
}
else
else
{
{
var
emp
=
employees
.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
number
&&
w
.
DoctorName
==
name
);
var
emp
=
employees
?
.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
number
&&
w
.
DoctorName
==
name
);
item
.
AddOrUpdate
(
nameof
(
ResponseType
),
ResponseType
.
OK
);
item
.
AddOrUpdate
(
nameof
(
ResponseType
),
ResponseType
.
OK
);
item
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
Department
),
emp
.
AccountingUnit
);
item
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
Department
),
emp
?.
AccountingUnit
??
""
);
item
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
ReservedRatio
),
emp
.
ReservedRatio
);
item
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
ReservedRatio
),
emp
?.
ReservedRatio
??
0
);
}
}
}
}
}
}
...
...
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