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
6894dee7
Commit
6894dee7
authored
Apr 22, 2022
by
1391696987
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手工录入传入参数改实体类
parent
acfde9f7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
60 deletions
+59
-60
performance/Performance.Api/Controllers/EmployeeController.cs
+16
-22
performance/Performance.Api/wwwroot/Performance.Api.xml
+6
-12
performance/Performance.DtoModels/Response/GatherResponse.cs
+8
-0
performance/Performance.Services/EmployeeService.cs
+29
-26
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
6894dee7
...
...
@@ -854,16 +854,16 @@ public ApiResponse GetDeptComparisonTotal([FromRoute] int allotId)
/// <summary>
/// 手工录入 - 下拉列表
/// </summary>
/// <param name="
allotId
"></param>
/// <param name="
gather
"></param>
/// <returns></returns>
[
Route
(
"getgatherdrop
/{allotId}
"
)]
[
Route
(
"getgatherdrop"
)]
[
HttpPost
]
public
ApiResponse
GetGatherDrop
([
From
Route
]
int
allotId
,
int
userId
)
public
ApiResponse
GetGatherDrop
([
From
Body
]
Gather
gather
)
{
if
(
a
llotId
<=
0
)
if
(
gather
.
A
llotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
var
relust
=
employeeService
.
GetGatherDrop
(
allotId
,
userId
);
var
relust
=
employeeService
.
GetGatherDrop
(
gather
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
...
...
@@ -892,7 +892,7 @@ public ApiResponse GetGatherHands([FromRoute] int allotId, [FromBody] GatherRequ
/// <returns></returns>
[
Route
(
"savegatherhands/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
SaveGatherHands
([
From
Route
]
int
allotId
,
[
FromBody
]
SaveGatherData
request
)
public
ApiResponse
SaveGatherHands
([
From
Body
]
int
allotId
,
[
FromBody
]
SaveGatherData
request
)
{
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
...
...
@@ -911,20 +911,16 @@ public ApiResponse SaveGatherHands([FromRoute] int allotId, [FromBody] SaveGathe
/// <summary>
/// 手工录入列表 - 明细
/// </summary>
/// <param name="allotId"></param>
/// <param name="department">科室</param>
/// <param name="source">来源</param>
/// <param name="category">费用类型</param>
/// <param name="request">分页</param>
/// <param name="gather"></param>
/// <returns></returns>
[
Route
(
"getgather
/{allotId},{department},{source},{category}
"
)]
[
Route
(
"getgather"
)]
[
HttpPost
]
public
ApiResponse
GetGather
([
From
Route
]
int
allotId
,
string
department
,
string
source
,
string
category
,
[
FromBody
]
PersonParamsRequest
request
)
public
ApiResponse
GetGather
([
From
Body
]
Gather
gather
)
{
if
(
allotId
<=
0
||
string
.
IsNullOrEmpty
(
source
)
||
string
.
IsNullOrEmpty
(
category
)
||
string
.
IsNullOrEmpty
(
d
epartment
)
)
if
(
gather
.
AllotId
<=
0
||
string
.
IsNullOrEmpty
(
gather
.
Source
)
||
string
.
IsNullOrEmpty
(
gather
.
Category
)
||
string
.
IsNullOrEmpty
(
gather
.
D
epartment
)
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"请检查allotId,source,category,department是否正确"
);
var
result
=
employeeService
.
GetGather
(
allotId
,
department
,
source
,
category
,
request
);
var
result
=
employeeService
.
GetGather
(
gather
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
...
...
@@ -933,18 +929,16 @@ public ApiResponse GetGather([FromRoute] int allotId,string department, string s
/// <summary>
/// 手工录入列表 - 汇总
/// </summary>
/// <param name="allotId"></param>
/// <param name="userId"></param>
/// <param name="request">分页</param>
/// <param name="gather"></param>
/// <returns></returns>
[
Route
(
"getgathertotal
/{allotId}
"
)]
[
Route
(
"getgathertotal"
)]
[
HttpPost
]
public
ApiResponse
GetGatherTotal
([
From
Route
]
int
allotId
,
int
userId
,
[
FromBody
]
PersonParamsRequest
request
)
public
ApiResponse
GetGatherTotal
([
From
Body
]
Gather
gather
)
{
if
(
a
llotId
<=
0
)
if
(
gather
.
A
llotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
var
result
=
employeeService
.
GetGatherTotal
(
allotId
,
userId
,
request
);
var
result
=
employeeService
.
GetGatherTotal
(
gather
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
6894dee7
...
...
@@ -1356,11 +1356,11 @@
<param
name=
"allotId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGatherDrop(
System.Int32,System.Int32
)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGatherDrop(
Performance.DtoModels.Gather
)"
>
<summary>
手工录入 - 下拉列表
</summary>
<param
name=
"
allotId
"
></param>
<param
name=
"
gather
"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGatherHands(System.Int32,Performance.DtoModels.GatherRequest)"
>
...
...
@@ -1379,24 +1379,18 @@
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGather(
System.Int32,System.String,System.String,System.String,Performance.DtoModels.PersonParamsRequest
)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGather(
Performance.DtoModels.Gather
)"
>
<summary>
手工录入列表 - 明细
</summary>
<param
name=
"allotId"
></param>
<param
name=
"department"
>
科室
</param>
<param
name=
"source"
>
来源
</param>
<param
name=
"category"
>
费用类型
</param>
<param
name=
"request"
>
分页
</param>
<param
name=
"gather"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGatherTotal(
System.Int32,System.Int32,Performance.DtoModels.PersonParamsRequest
)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGatherTotal(
Performance.DtoModels.Gather
)"
>
<summary>
手工录入列表 - 汇总
</summary>
<param
name=
"allotId"
></param>
<param
name=
"userId"
></param>
<param
name=
"request"
>
分页
</param>
<param
name=
"gather"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ExConfigController.Extract(Performance.DtoModels.ModModuleRequest)"
>
...
...
performance/Performance.DtoModels/Response/GatherResponse.cs
View file @
6894dee7
...
...
@@ -50,6 +50,14 @@ public class GatherTotalRequest
public
string
States
{
get
;
set
;
}
public
string
Remark
{
get
;
set
;
}
}
public
class
Gather
:
PersonParamsRequest
{
public
int
AllotId
{
get
;
set
;
}
public
int
UserId
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
public
string
Source
{
get
;
set
;
}
public
string
Category
{
get
;
set
;
}
}
public
class
GatherInfoRequest
{
public
string
Source
{
get
;
set
;
}
...
...
performance/Performance.Services/EmployeeService.cs
View file @
6894dee7
...
...
@@ -1251,14 +1251,17 @@ public ComparisonResponse<DtoModels.Comparison<DeptComparisonTotal>> GetDeptComp
#
region
手工数据录入
public
List
<
GatherDropResponse
>
GetGatherDrop
(
int
allotId
,
int
userId
)
public
List
<
GatherDropResponse
>
GetGatherDrop
(
Gather
gather
)
{
var
collectPermission
=
perforcollectpermissionRepository
.
GetEntities
(
t
=>
t
.
UserId
==
u
serId
).
Select
(
t
=>
t
.
SheetName
).
Distinct
();
var
collectPermission
=
perforcollectpermissionRepository
.
GetEntities
(
t
=>
t
.
UserId
==
gather
.
U
serId
).
Select
(
t
=>
t
.
SheetName
).
Distinct
();
var
perSheets
=
perforPersheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
new
[]
{
3
,
4
,
7
}.
Contains
(
t
.
SheetType
.
Value
)
&&
collectPermission
.
Contains
(
t
.
SheetName
));
var
perSheets
=
perforPersheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
gather
.
AllotId
&&
new
[]
{
3
,
4
,
7
}.
Contains
(
t
.
SheetType
.
Value
)).
Select
(
s
=>
new
{
s
.
ID
,
SheetName
=
Regex
.
Replace
(
s
.
SheetName
.
Replace
(
" "
,
""
).
Replace
(
"."
,
""
),
"[0-9]"
,
""
)
});
if
(
perSheets
==
null
||
!
perSheets
.
Any
())
{
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
a
llotId
);
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
gather
.
A
llotId
);
var
list
=
perallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
);
if
(
list
==
null
||
!
list
.
Any
(
t
=>
t
.
ID
==
allot
.
ID
))
return
new
List
<
GatherDropResponse
>();
...
...
@@ -1268,17 +1271,17 @@ public List<GatherDropResponse> GetGatherDrop(int allotId,int userId)
var
index
=
list
.
IndexOf
(
list
.
First
(
t
=>
t
.
ID
==
allot
.
ID
));
// 先取上一个月的绩效Id,若没有取最后一个月的绩效Id,若都不存在则获取allotId为-1的数据
a
llotId
=
index
+
1
<
list
.
Count
?
list
[
index
+
1
].
ID
:
list
.
First
().
ID
;
if
(
a
llotId
==
allot
.
ID
)
return
new
List
<
GatherDropResponse
>();
gather
.
A
llotId
=
index
+
1
<
list
.
Count
?
list
[
index
+
1
].
ID
:
list
.
First
().
ID
;
if
(
gather
.
A
llotId
==
allot
.
ID
)
return
new
List
<
GatherDropResponse
>();
}
//var sheets = perSheets.Select(t => new GatherDropResponse() { Label = t.SheetName, Value = t.SheetName });
var
imHeaders
=
imheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
a
llotId
);
var
imHeaders
=
imheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
gather
.
A
llotId
);
var
exresultgather
=
exresultgatherRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
a
llotId
);
var
exresultgather
=
exresultgatherRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
gather
.
A
llotId
);
foreach
(
var
item
in
exresultgather
.
Select
(
t
=>
new
{
t
.
Category
,
t
.
Source
}).
Distinct
())
...
...
@@ -1380,12 +1383,12 @@ public void SaveGatherHands(int allotId, SaveGatherData request)
exresultgatherRepository
.
AddRange
(
depts
.
ToArray
());
}
public
GatherInfo
GetGather
(
int
allotId
,
string
department
,
string
source
,
string
category
,
PersonParamsRequest
request
)
public
GatherInfo
GetGather
(
Gather
gather
)
{
Expression
<
Func
<
ex_result_gather
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
allotId
&&
t
.
Department
==
department
&&
t
.
Source
.
Contains
(
source
)
&&
t
.
Category
.
Contains
(
c
ategory
);
Expression
<
Func
<
ex_result_gather
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
gather
.
AllotId
&&
t
.
Department
==
gather
.
Department
&&
t
.
Source
.
Contains
(
gather
.
Source
)
&&
t
.
Category
.
Contains
(
gather
.
C
ategory
);
if
(
request
!=
null
&&
!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
exp
=
exp
.
And
(
t
=>
t
.
DoctorName
.
Contains
(
request
.
SearchQuery
)
||
t
.
PersonnelNumber
.
Contains
(
request
.
SearchQuery
));
if
(
gather
!=
null
&&
!
string
.
IsNullOrEmpty
(
gather
.
SearchQuery
))
exp
=
exp
.
And
(
t
=>
t
.
DoctorName
.
Contains
(
gather
.
SearchQuery
)
||
t
.
PersonnelNumber
.
Contains
(
gather
.
SearchQuery
));
var
datas
=
exresultgatherRepository
.
GetEntities
(
exp
);
...
...
@@ -1398,7 +1401,7 @@ public GatherInfo GetGather(int allotId,string department, string source,string
DoctorName
=
t
.
DoctorName
,
Detail
=
new
GatherInfoFee
{
Category
=
c
ategory
,
Category
=
gather
.
C
ategory
,
Fee
=
t
.
Fee
},
});
...
...
@@ -1412,25 +1415,25 @@ public GatherInfo GetGather(int allotId,string department, string source,string
GatherInfo
gatherInfo
=
new
GatherInfo
()
{
Heads
=
head
,
Datas
=
result
.
Skip
((
request
.
PageNumber
-
1
)
*
request
.
PageSize
).
Take
(
request
.
PageSize
).
ToList
(),
CurrentPage
=
request
.
PageNumber
,
Datas
=
result
.
Skip
((
gather
.
PageNumber
-
1
)
*
gather
.
PageSize
).
Take
(
gather
.
PageSize
).
ToList
(),
CurrentPage
=
gather
.
PageNumber
,
TotalCount
=
result
.
Count
(),
PageSize
=
request
.
PageSize
,
TotalPages
=
(
int
)
Math
.
Ceiling
((
double
)
result
.
Count
()
/
request
.
PageSize
)
PageSize
=
gather
.
PageSize
,
TotalPages
=
(
int
)
Math
.
Ceiling
((
double
)
result
.
Count
()
/
gather
.
PageSize
)
};
return
gatherInfo
;
}
public
GatherResponse
GetGatherTotal
(
int
allotId
,
int
userId
,
PersonParamsRequest
request
)
public
GatherResponse
GetGatherTotal
(
Gather
gather
)
{
Expression
<
Func
<
ex_result_gather
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
a
llotId
;
Expression
<
Func
<
ex_result_gather
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
gather
.
A
llotId
;
if
(
request
!=
null
&&
!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
if
(
gather
!=
null
&&
!
string
.
IsNullOrEmpty
(
gather
.
SearchQuery
))
{
exp
=
exp
.
And
(
t
=>
t
.
Category
.
Contains
(
request
.
SearchQuery
));
exp
=
exp
.
And
(
t
=>
t
.
Category
.
Contains
(
gather
.
SearchQuery
));
}
var
userSource
=
perforcollectpermissionRepository
.
GetEntities
(
t
=>
t
.
UserId
==
u
serId
)
var
userSource
=
perforcollectpermissionRepository
.
GetEntities
(
t
=>
t
.
UserId
==
gather
.
U
serId
)
.
Select
(
s
=>
Regex
.
Replace
(
s
.
SheetName
.
Replace
(
" "
,
""
).
Replace
(
"."
,
""
),
"[0-9]"
,
""
))
.
Distinct
().
ToList
();
...
...
@@ -1474,11 +1477,11 @@ public GatherResponse GetGatherTotal(int allotId, int userId, PersonParamsReques
GatherResponse
gatherResponse
=
new
GatherResponse
()
{
Heads
=
head
,
Datas
=
data
.
Skip
((
request
.
PageNumber
-
1
)
*
request
.
PageSize
).
Take
(
request
.
PageSize
).
ToList
(),
CurrentPage
=
request
.
PageNumber
,
Datas
=
data
.
Skip
((
gather
.
PageNumber
-
1
)
*
gather
.
PageSize
).
Take
(
gather
.
PageSize
).
ToList
(),
CurrentPage
=
gather
.
PageNumber
,
TotalCount
=
data
.
Count
(),
PageSize
=
request
.
PageSize
,
TotalPages
=
(
int
)
Math
.
Ceiling
((
double
)
data
.
Count
()
/
request
.
PageSize
)
PageSize
=
gather
.
PageSize
,
TotalPages
=
(
int
)
Math
.
Ceiling
((
double
)
data
.
Count
()
/
gather
.
PageSize
)
};
return
gatherResponse
;
...
...
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