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
cf4715dd
Commit
cf4715dd
authored
Jan 19, 2022
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改人员标签配置返回的数量
parent
0a2ec297
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
24 deletions
+52
-24
performance/Performance.Api/Controllers/ReportGlobalController.cs
+3
-2
performance/Performance.Api/wwwroot/Performance.Api.xml
+2
-1
performance/Performance.Services/ReportGlobalService.cs
+47
-21
No files found.
performance/Performance.Api/Controllers/ReportGlobalController.cs
View file @
cf4715dd
...
...
@@ -128,16 +128,17 @@ public ApiResponse Import(int hospitalId, [FromForm] IFormCollection form)
/// 获取人员标签配置
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="allotId"></param>
/// <returns></returns>
[
Route
(
"ReportPersonTag"
)]
[
HttpPost
]
public
ApiResponse
ReportPersonTag
(
int
hospitalId
)
public
ApiResponse
ReportPersonTag
(
int
hospitalId
,
int
allotId
)
{
if
(
hospitalId
<=
0
)
{
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"hospitalId无效"
);
}
var
relust
=
reportGlobalService
.
GetReportPersonTag
(
hospitalId
);
var
relust
=
reportGlobalService
.
GetReportPersonTag
(
hospitalId
,
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
cf4715dd
...
...
@@ -1785,11 +1785,12 @@
<param
name=
"form"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ReportGlobalController.ReportPersonTag(System.Int32)"
>
<member
name=
"M:Performance.Api.Controllers.ReportGlobalController.ReportPersonTag(System.Int32
,System.Int32
)"
>
<summary>
获取人员标签配置
</summary>
<param
name=
"hospitalId"
></param>
<param
name=
"allotId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ReportGlobalController.SaveReportPersonTag(System.Int32,Performance.DtoModels.SaveCollectData)"
>
...
...
performance/Performance.Services/ReportGlobalService.cs
View file @
cf4715dd
...
...
@@ -24,6 +24,7 @@ public class ReportGlobalService : IAutoInjection
private
readonly
PerforHisimportbaiscnormRepository
hisimportbaiscnormRepository
;
private
readonly
PerforReportperformancetagsRepository
reportperformancetagsRepository
;
private
readonly
PerforReportperformancepersontagsRepository
reportperformancepersontagsRepository
;
private
readonly
PerforPeremployeeRepository
perforPeremployeeRepository
;
public
ReportGlobalService
(
ILogger
<
ReportGlobalService
>
logger
,
...
...
@@ -34,7 +35,8 @@ public class ReportGlobalService : IAutoInjection
PerforHisimportclinicRepository
hisimportclinicRepository
,
PerforHisimportbaiscnormRepository
hisimportbaiscnormRepository
,
PerforReportperformancetagsRepository
reportperformancetagsRepository
,
PerforReportperformancepersontagsRepository
reportperformancepersontagsRepository
PerforReportperformancepersontagsRepository
reportperformancepersontagsRepository
,
PerforPeremployeeRepository
perforPeremployeeRepository
)
{
this
.
logger
=
logger
;
...
...
@@ -46,6 +48,7 @@ PerforReportperformancepersontagsRepository reportperformancepersontagsRepositor
this
.
hisimportbaiscnormRepository
=
hisimportbaiscnormRepository
;
this
.
reportperformancetagsRepository
=
reportperformancetagsRepository
;
this
.
reportperformancepersontagsRepository
=
reportperformancepersontagsRepository
;
this
.
perforPeremployeeRepository
=
perforPeremployeeRepository
;
}
#
region
Report_Global
...
...
@@ -523,7 +526,7 @@ private T GetCellValue<T>(IRow row, List<string> columns, string key)
#
region
人员、科室标签配置
public
HandsonTable
GetReportPersonTag
(
int
hospitalId
)
public
HandsonTable
GetReportPersonTag
(
int
hospitalId
,
int
allotId
)
{
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
PersonTag
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
PersonTag
.
Select
(
t
=>
new
collect_permission
{
...
...
@@ -531,8 +534,28 @@ public HandsonTable GetReportPersonTag(int hospitalId)
Visible
=
1
}).
ToList
());
var
data
=
reportperformancepersontagsRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
)?.
OrderBy
(
t
=>
ConvertHelper
.
To
<
long
>(
t
.
PersonnelNumber
));
if
(
data
==
null
)
return
result
;
var
pdata
=
perforPeremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
AllotId
==
allotId
).
Select
(
t
=>
new
{
t
.
UnitType
,
t
.
AccountingUnit
,
t
.
PersonnelNumber
,
t
.
DoctorName
});
var
tdata
=
reportperformancepersontagsRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
)?.
OrderBy
(
t
=>
ConvertHelper
.
To
<
long
>(
t
.
PersonnelNumber
));
var
data
=
(
from
t1
in
pdata
join
t2
in
tdata
on
t1
.
PersonnelNumber
equals
t2
.
PersonnelNumber
into
temp
from
t
in
temp
.
DefaultIfEmpty
()
select
new
report_performance_person_tags
{
UnitType
=
t1
.
UnitType
,
AccountingUnit
=
t1
.
AccountingUnit
,
PersonnelNumber
=
t1
.
PersonnelNumber
,
PersonnelName
=
t1
.
DoctorName
,
Tag1
=
t
?.
Tag1
,
Tag2
=
t
?.
Tag2
,
Tag3
=
t
?.
Tag3
,
Tag4
=
t
?.
Tag4
,
Tag5
=
t
?.
Tag5
,
}).
Distinct
()?.
ToList
();
if
(
data
==
null
||
!
data
.
Any
())
return
result
;
List
<
HandsonRowData
>
rowDatas
=
new
List
<
HandsonRowData
>();
int
i
=
0
;
...
...
@@ -547,24 +570,27 @@ public HandsonTable GetReportPersonTag(int hospitalId)
i
++;
}
List
<
HandsonRowData
>
rowDatas2
=
new
List
<
HandsonRowData
>();
foreach
(
var
item
in
rowDatas
)
{
if
(
rowDatas2
.
Count
==
0
)
rowDatas2
.
Add
(
item
);
var
flag
=
true
;
foreach
(
var
item2
in
rowDatas2
)
{
if
(
item
.
CellData
.
ToList
()[
1
].
Value
.
Equals
(
item2
.
CellData
.
ToList
()[
1
].
Value
))
flag
=
false
;
}
if
(
flag
)
rowDatas2
.
Add
(
item
);
}
result
.
SetRowData
(
rowDatas2
,
rowDatas2
!=
null
);
//List<HandsonRowData> rowDatas2 = new List<HandsonRowData>();
//foreach (var item in rowDatas)
//{
// if (rowDatas2.Count == 0)
// rowDatas2.Add(item);
// var flag = true;
// foreach (var item2 in rowDatas2)
// {
// if (item.CellData.ToList()[1].Value.Equals(item2.CellData.ToList()[1].Value))
// flag = false;
// }
// if (flag)
// rowDatas2.Add(item);
//}
result
.
SetRowData
(
rowDatas
,
rowDatas
!=
null
);
return
result
;
}
...
...
@@ -637,8 +663,8 @@ public void SaveReportTag(int hospitalId, SaveCollectData request)
private
static
Dictionary
<
string
,
string
>
PersonTag
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
//
{nameof(report_performance_person_tags.UnitType), "核算单元类型"},
//
{nameof(report_performance_person_tags.AccountingUnit), "科室"},
{
nameof
(
report_performance_person_tags
.
UnitType
),
"核算单元类型"
},
{
nameof
(
report_performance_person_tags
.
AccountingUnit
),
"科室"
},
{
nameof
(
report_performance_person_tags
.
PersonnelNumber
),
"工号"
},
{
nameof
(
report_performance_person_tags
.
PersonnelName
),
"姓名"
},
{
nameof
(
report_performance_person_tags
.
Tag1
),
"绩效发放情况"
},
...
...
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