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
a1fc57ce
Commit
a1fc57ce
authored
Jan 29, 2023
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员字典修改工号重复验证修改
parent
a8de2e6c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
performance/Performance.Services/PersonService.cs
+23
-21
No files found.
performance/Performance.Services/PersonService.cs
View file @
a1fc57ce
...
...
@@ -306,27 +306,6 @@ public ApiResponse CreatePerson(PerEmployeeResponse request)
/// <returns></returns>
public
ApiResponse
UpdatePerson
(
PerEmployeeResponse
request
)
{
List
<
Dictionary
<
string
,
string
>>
error
=
new
List
<
Dictionary
<
string
,
string
>>();
var
oldEmployees
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
request
.
AllotId
);
for
(
int
i
=
0
;
i
<
oldEmployees
.
Count
;
i
++)
{
if
(
oldEmployees
.
Count
(
w
=>
w
.
PersonnelNumber
==
oldEmployees
[
i
].
PersonnelNumber
)
>
1
)
{
error
.
Add
(
new
Dictionary
<
string
,
string
>
{
{
"行号"
,
$"第
{
i
+
1
}
行"
},
{
"人员工号"
,
oldEmployees
[
i
].
PersonnelNumber
??
""
},
{
"姓名"
,
oldEmployees
[
i
].
DoctorName
??
""
},
{
"错误原因"
,
"“人员工号”重复"
},
});
}
}
if
(
error
.
Count
>
0
)
return
new
ApiResponse
(
ResponseType
.
WarningTable
,
"验证不通过,当前操作已拒绝"
,
error
);
if
(
string
.
IsNullOrEmpty
(
request
.
UnitType
?.
Trim
())
||
string
.
IsNullOrEmpty
(
request
.
Department
?.
Trim
())
||
string
.
IsNullOrEmpty
(
request
.
AccountingUnit
?.
Trim
())
...
...
@@ -382,6 +361,29 @@ public ApiResponse UpdatePerson(PerEmployeeResponse request)
allot
.
IsModifyConfig
=
1
;
perallotRepository
.
Update
(
allot
);
#
region
修改成功,但存在其他问题请及时处理
List
<
Dictionary
<
string
,
string
>>
error
=
new
List
<
Dictionary
<
string
,
string
>>();
var
oldEmployees
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
request
.
AllotId
);
for
(
int
i
=
0
;
i
<
oldEmployees
.
Count
;
i
++)
{
if
(
oldEmployees
.
Count
(
w
=>
w
.
PersonnelNumber
==
oldEmployees
[
i
].
PersonnelNumber
)
>
1
)
{
error
.
Add
(
new
Dictionary
<
string
,
string
>
{
{
"行号"
,
$"第
{
i
+
1
}
行"
},
{
"人员工号"
,
oldEmployees
[
i
].
PersonnelNumber
??
""
},
{
"姓名"
,
oldEmployees
[
i
].
DoctorName
??
""
},
{
"错误原因"
,
"“人员工号”重复"
},
});
}
}
if
(
error
.
Count
>
0
)
return
new
ApiResponse
(
ResponseType
.
WarningTable
,
"修改成功,但存在其他问题请及时处理"
,
error
);
#
endregion
return
new
ApiResponse
(
ResponseType
.
OK
,
"修改成功"
);
}
...
...
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