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
a3499331
Commit
a3499331
authored
Mar 03, 2022
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据人员字典密码和医院配置新增用户
parent
b4901199
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
9 deletions
+39
-9
performance/Performance.Services/PersonService.cs
+4
-4
performance/Performance.Services/ReportGlobalService.cs
+35
-5
No files found.
performance/Performance.Services/PersonService.cs
View file @
a3499331
...
...
@@ -854,8 +854,6 @@ public ApiResponse BathSavePerson(int AllotId, int HospitalId, SaveCollectData r
peremployeeRepository
.
RemoveRange
(
delPerson
.
ToArray
());
if
(
employees
!=
null
&&
employees
.
Any
())
peremployeeRepository
.
AddRange
(
employees
.
ToArray
());
//个人绩效查询用户添加
SaveQueryRole
(
HospitalId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
);
}
...
...
@@ -1197,10 +1195,11 @@ public bool ReloadPersonnel(int hospitalId, int allotId)
public
void
SaveQueryRole
(
int
hospitalId
,
SaveCollectData
request
)
{
var
dict
=
new
Dictionary
<
string
,
string
>();
if
(!
PersonPassword
.
Any
(
t
=>
t
.
Item1
==
nameof
(
PersonePassword
.
Password
)))
PersonPassword
.
Add
((
nameof
(
PersonePassword
.
Password
),
"密码"
,
t
=>
t
.
Password
));
PersonPassword
.
ForEach
(
t
=>
dict
.
Add
(
t
.
Item1
,
t
.
Item2
));
var
hospital
=
perforHospitalRepository
.
GetEntity
(
t
=>
t
.
ID
==
hospitalId
);
if
(
hospital
.
IsOwnerQuery
!=
1
)
return
;
if
(
hospital
.
IsOwnerQuery
!=
1
)
return
;
var
dicData
=
CreateDataRow
(
request
,
dict
);
var
usercollor
=
new
UserCollectData
...
...
@@ -1211,6 +1210,7 @@ public void SaveQueryRole(int hospitalId, SaveCollectData request)
};
var
role
=
perforRoleRepository
.
GetEntity
(
t
=>
t
.
RoleName
==
"绩效查询"
);
if
(
role
==
null
)
return
;
var
userRole
=
perforUserroleRepository
.
GetEntities
(
t
=>
t
.
RoleID
==
role
.
ID
)?.
Select
(
t
=>
t
.
UserID
);
var
users
=
perforUserRepository
.
GetEntities
(
t
=>
userRole
.
Contains
(
t
.
ID
));
...
...
performance/Performance.Services/ReportGlobalService.cs
View file @
a3499331
...
...
@@ -25,6 +25,9 @@ public class ReportGlobalService : IAutoInjection
private
readonly
PerforReportperformancetagsRepository
reportperformancetagsRepository
;
private
readonly
PerforReportperformancepersontagsRepository
reportperformancepersontagsRepository
;
private
readonly
PerforPeremployeeRepository
perforPeremployeeRepository
;
private
readonly
PerforUserhospitalRepository
perforUserhospitalRepository
;
private
readonly
PerforUserRepository
perforUserRepository
;
private
readonly
PersonService
personService
;
public
ReportGlobalService
(
ILogger
<
ReportGlobalService
>
logger
,
...
...
@@ -36,7 +39,10 @@ public class ReportGlobalService : IAutoInjection
PerforHisimportbaiscnormRepository
hisimportbaiscnormRepository
,
PerforReportperformancetagsRepository
reportperformancetagsRepository
,
PerforReportperformancepersontagsRepository
reportperformancepersontagsRepository
,
PerforPeremployeeRepository
perforPeremployeeRepository
PerforPeremployeeRepository
perforPeremployeeRepository
,
PerforUserhospitalRepository
perforUserhospitalRepository
,
PerforUserRepository
perforUserRepository
,
PersonService
personService
)
{
this
.
logger
=
logger
;
...
...
@@ -49,6 +55,9 @@ PerforPeremployeeRepository perforPeremployeeRepository
this
.
reportperformancetagsRepository
=
reportperformancetagsRepository
;
this
.
reportperformancepersontagsRepository
=
reportperformancepersontagsRepository
;
this
.
perforPeremployeeRepository
=
perforPeremployeeRepository
;
this
.
perforUserhospitalRepository
=
perforUserhospitalRepository
;
this
.
perforUserRepository
=
perforUserRepository
;
this
.
personService
=
personService
;
}
#
region
Report_Global
...
...
@@ -545,6 +554,7 @@ select new
{
PersonnelNumber
=
t1
.
PersonnelNumber
,
DoctorName
=
t1
.
DoctorName
,
AccountingUnit
=
t1
.
AccountingUnit
,
JobCategory
=
t1
.
JobCategory
,
Duty
=
t1
.
Duty
,
JobTitle
=
t1
.
JobTitle
,
...
...
@@ -561,7 +571,12 @@ select new
if
(
data
==
null
||
!
data
.
Any
())
return
result
;
var
userhospitals
=
perforUserhospitalRepository
.
GetEntities
(
w
=>
w
.
HospitalID
==
hospitalId
);
var
users
=
new
List
<
sys_user
>();
if
(
userhospitals
!=
null
&&
userhospitals
.
Any
())
{
users
=
perforUserRepository
.
GetEntities
(
w
=>
userhospitals
.
Select
(
w
=>
w
.
UserID
).
Contains
(
w
.
ID
)
&&
w
.
IsDelete
==
1
)
??
new
List
<
sys_user
>();
}
List
<
HandsonRowData
>
rowDatas
=
new
List
<
HandsonRowData
>();
int
i
=
0
;
foreach
(
var
item
in
data
)
...
...
@@ -570,6 +585,11 @@ select new
var
firstDic
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
string
>>(
json
);
var
cells
=
(
from
conf
in
PersonTag
join
fst
in
firstDic
on
conf
.
Key
.
ToUpper
()
equals
fst
.
Key
.
ToUpper
()
select
new
HandsonCellData
(
conf
.
Value
,
fst
.
Value
)).
ToList
();
var
user
=
users
.
FirstOrDefault
(
w
=>
w
.
Login
==
item
.
PersonnelNumber
&&
w
.
Department
==
item
.
AccountingUnit
);
if
(
user
!=
null
)
{
cells
.
Add
(
new
HandsonCellData
(
PersonTag
[
nameof
(
PersonePassword
.
Password
)],
user
.
Password
));
}
rowDatas
.
Add
(
new
HandsonRowData
(
i
,
cells
));
i
++;
...
...
@@ -594,7 +614,13 @@ select new
result
.
SetRowData
(
rowDatas
,
rowDatas
!=
null
);
result
.
Columns
?.
ForEach
(
t
=>
t
.
Type
=
"text"
);
var
columns
=
new
string
[]
{
"员工工号"
,
"姓名"
,
"核算单元"
};
result
.
Columns
?.
ForEach
(
t
=>
{
t
.
Type
=
"text"
;
if
(
columns
.
Contains
(
t
.
Data
))
t
.
ReadOnly
=
true
;
});
return
result
;
}
...
...
@@ -665,12 +691,14 @@ public List<string> SaveReportPersonTag(int hospitalId, int allotId, SaveCollect
#
endregion
}
if
(
upEmployees
!=
null
&&
upEmployees
.
Any
())
if
(
upEmployees
!=
null
&&
upEmployees
.
Any
())
perforPeremployeeRepository
.
UpdateRange
(
upEmployees
.
ToArray
());
if
(
newTags
!=
null
&&
newTags
.
Any
())
reportperformancepersontagsRepository
.
AddRange
(
newTags
.
ToArray
());
if
(
upTags
!=
null
&&
upTags
.
Any
())
reportperformancepersontagsRepository
.
UpdateRange
(
upTags
.
ToArray
());
//个人绩效查询用户添加
personService
.
SaveQueryRole
(
hospitalId
,
request
);
return
new
List
<
string
>();
}
...
...
@@ -727,8 +755,10 @@ public void SaveReportTag(int hospitalId, SaveCollectData request)
//{nameof(report_performance_person_tags.AccountingUnit), "科室"},
//{nameof(per_employee.Id), "Id"},
{
nameof
(
per_employee
.
PersonnelNumber
),
"工号"
},
{
nameof
(
per_employee
.
PersonnelNumber
),
"
员工
工号"
},
{
nameof
(
per_employee
.
DoctorName
),
"姓名"
},
{
nameof
(
per_employee
.
AccountingUnit
),
"核算单元"
},
{
nameof
(
PersonePassword
.
Password
),
"密码"
},
{
nameof
(
per_employee
.
JobCategory
),
"正式/临聘"
},
{
nameof
(
per_employee
.
Duty
),
"职务"
},
{
nameof
(
per_employee
.
JobTitle
),
"职称"
},
...
...
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