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
3dfdd456
Commit
3dfdd456
authored
Jun 24, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hrp人员科室修复
parent
30a3a895
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
14 deletions
+63
-14
performance/Performance.EntityModels/Entity/per_employee.cs
+14
-9
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
+49
-5
No files found.
performance/Performance.EntityModels/Entity/per_employee.cs
View file @
3dfdd456
...
@@ -127,23 +127,28 @@ public class per_employee
...
@@ -127,23 +127,28 @@ public class per_employee
public
string
Remark
{
get
;
set
;
}
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// <summary>
///
///
0 未通过验证 1 通过验证
/// </summary>
/// </summary>
public
Nullable
<
DateTime
>
CreateTime
{
get
;
set
;
}
public
int
?
IsVerify
{
get
;
set
;
}
/// <summary>
/// <summary>
///
///
验证失败描述
/// </summary>
/// </summary>
public
Nullable
<
int
>
CreateUser
{
get
;
set
;
}
public
string
VerifyMessage
{
get
;
set
;
}
/// <summary>
/// <summary>
///
0 未通过验证 1 通过验证
///
是否是hrp人员 0 不是 1 是
/// </summary>
/// </summary>
public
int
?
IsVerify
{
get
;
set
;
}
public
Nullable
<
int
>
IsHrpEmployee
{
get
;
set
;
}
/// <summary>
/// <summary>
///
验证失败描述
///
/// </summary>
/// </summary>
public
string
VerifyMessage
{
get
;
set
;
}
public
Nullable
<
DateTime
>
CreateTime
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
CreateUser
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
View file @
3dfdd456
...
@@ -16,6 +16,7 @@ public class DictionaryService : IAutoInjection
...
@@ -16,6 +16,7 @@ public class DictionaryService : IAutoInjection
private
readonly
ILogger
<
DictionaryService
>
logger
;
private
readonly
ILogger
<
DictionaryService
>
logger
;
private
readonly
QueryService
queryService
;
private
readonly
QueryService
queryService
;
private
readonly
LogManageService
logService
;
private
readonly
LogManageService
logService
;
private
readonly
PerforCofhrpdepartmentRepository
cofhrpdepartmentRepository
;
private
readonly
PerforPeremployeeRepository
peremployeeRepository
;
private
readonly
PerforPeremployeeRepository
peremployeeRepository
;
private
readonly
PerforHospitalconfigRepository
hospitalconfigRepository
;
private
readonly
PerforHospitalconfigRepository
hospitalconfigRepository
;
private
readonly
PerforExtypeRepository
extypeRepository
;
private
readonly
PerforExtypeRepository
extypeRepository
;
...
@@ -27,6 +28,7 @@ public class DictionaryService : IAutoInjection
...
@@ -27,6 +28,7 @@ public class DictionaryService : IAutoInjection
ILogger
<
DictionaryService
>
logger
,
ILogger
<
DictionaryService
>
logger
,
QueryService
queryService
,
QueryService
queryService
,
LogManageService
logService
,
LogManageService
logService
,
PerforCofhrpdepartmentRepository
cofhrpdepartmentRepository
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforHospitalconfigRepository
hospitalconfigRepository
,
PerforHospitalconfigRepository
hospitalconfigRepository
,
PerforExtypeRepository
extypeRepository
,
PerforExtypeRepository
extypeRepository
,
...
@@ -38,6 +40,7 @@ PerforHisscriptRepository hisscriptRepository
...
@@ -38,6 +40,7 @@ PerforHisscriptRepository hisscriptRepository
this
.
logger
=
logger
;
this
.
logger
=
logger
;
this
.
queryService
=
queryService
;
this
.
queryService
=
queryService
;
this
.
logService
=
logService
;
this
.
logService
=
logService
;
this
.
cofhrpdepartmentRepository
=
cofhrpdepartmentRepository
;
this
.
peremployeeRepository
=
peremployeeRepository
;
this
.
peremployeeRepository
=
peremployeeRepository
;
this
.
hospitalconfigRepository
=
hospitalconfigRepository
;
this
.
hospitalconfigRepository
=
hospitalconfigRepository
;
this
.
extypeRepository
=
extypeRepository
;
this
.
extypeRepository
=
extypeRepository
;
...
@@ -93,17 +96,29 @@ private void Employee(per_allot allot, sys_hospitalconfig config, string sql)
...
@@ -93,17 +96,29 @@ private void Employee(per_allot allot, sys_hospitalconfig config, string sql)
var
data
=
queryService
.
QueryData
<
per_employee
>(
config
,
allot
,
sql
);
var
data
=
queryService
.
QueryData
<
per_employee
>(
config
,
allot
,
sql
);
if
(
data
==
null
||
!
data
.
Any
())
return
;
if
(
data
==
null
||
!
data
.
Any
())
return
;
var
employees
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
);
//
var employees = peremployeeRepository.GetEntities(t => t.AllotId == allot.ID);
if
(
employees
!=
null
&&
employees
.
Any
())
//
if (employees != null && employees.Any())
{
//
{
peremployeeRepository
.
RemoveRange
(
employees
.
ToArray
());
//
peremployeeRepository.RemoveRange(employees.ToArray());
}
//
}
data
.
ToList
().
ForEach
(
t
=>
data
.
ToList
().
ForEach
(
t
=>
{
{
t
.
AllotId
=
allot
.
ID
;
t
.
AllotId
=
allot
.
ID
;
t
.
HospitalId
=
allot
.
HospitalId
;
t
.
HospitalId
=
allot
.
HospitalId
;
t
.
IsHrpEmployee
=
1
;
});
});
var
hrpDepartments
=
cofhrpdepartmentRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
);
if
(
hrpDepartments
!=
null
&&
hrpDepartments
.
Any
())
{
data
=
data
.
GroupJoin
(
hrpDepartments
,
outer
=>
new
{
department
=
outer
.
Department
},
inner
=>
new
{
department
=
inner
.
HRPDepartment
},
(
outer
,
inner
)
=>
new
{
outer
,
inner
}).
Select
(
t
=>
{
t
.
outer
.
AccountingUnit
=
t
.
inner
?.
FirstOrDefault
()?.
AccountingUnit
;
return
t
.
outer
;
});
}
peremployeeRepository
.
AddRange
(
data
.
ToArray
());
peremployeeRepository
.
AddRange
(
data
.
ToArray
());
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -161,5 +176,34 @@ private string GetSaveValue(params string[] arr)
...
@@ -161,5 +176,34 @@ private string GetSaveValue(params string[] arr)
return
value
;
return
value
;
return
arr
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
));
return
arr
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
));
}
}
/// <summary>
/// 校正HRP人员的科室信息
/// </summary>
/// <param name="allotId"></param>
public
void
CorrectionHRPDepartment
(
int
allotId
)
{
try
{
var
employees
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
(
t
.
IsHrpEmployee
??
0
)
==
1
);
if
(
employees
==
null
||
!
employees
.
Any
())
return
;
var
hrpDepartments
=
cofhrpdepartmentRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
if
(
hrpDepartments
!=
null
&&
hrpDepartments
.
Any
())
{
employees
=
employees
.
GroupJoin
(
hrpDepartments
,
outer
=>
new
{
department
=
outer
.
Department
},
inner
=>
new
{
department
=
inner
.
HRPDepartment
},
(
outer
,
inner
)
=>
new
{
outer
,
inner
}).
Select
(
t
=>
{
t
.
outer
.
AccountingUnit
=
t
.
inner
?.
FirstOrDefault
()?.
AccountingUnit
;
return
t
.
outer
;
}).
ToList
();
peremployeeRepository
.
UpdateRange
(
employees
.
ToArray
());
}
}
catch
(
Exception
ex
)
{
logger
.
LogError
(
$"修改HRP人员科室时发生异常:
{
ex
}
"
);
}
}
}
}
}
}
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