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
4029533d
Commit
4029533d
authored
Dec 02, 2021
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
2b16cb62
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
20 deletions
+58
-20
performance/Performance.Api/Controllers/EmployeeController.cs
+8
-9
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
+1
-1
performance/Performance.DtoModels/Response/GatherResponse.cs
+13
-2
performance/Performance.Services/EmployeeService.cs
+36
-8
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
4029533d
...
...
@@ -819,15 +819,14 @@ public ApiResponse GetGather([FromRoute] int allotId, [FromBody] PersonParamsReq
/// <returns></returns>
[
Route
(
"getgathertotal/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
<
List
<
GatherTotalRequest
>>
GetGatherTotal
([
FromRoute
]
int
allotId
,
[
FromBody
]
PersonParamsRequest
request
)
{
//var allot = allotService.GetAllot(allotId);
//if (null == allot)
// throw new PerformanceException("当前记录不存在");
var
list
=
employeeService
.
GetGatherTotal
(
allotId
,
request
);
if
(
null
==
list
)
throw
new
PerformanceException
(
"当前记录不存在"
);
return
new
ApiResponse
<
List
<
GatherTotalRequest
>>(
ResponseType
.
OK
,
"ok"
,
list
);
public
ApiResponse
GetGatherTotal
([
FromRoute
]
int
allotId
,
[
FromBody
]
PersonParamsRequest
request
)
{
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
var
result
=
employeeService
.
GetGather
(
allotId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
///// <summary>
///// 手工录入列表 - 汇总
...
...
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
View file @
4029533d
...
...
@@ -249,7 +249,7 @@ public AutoMapperConfigs()
.
ReverseMap
();
CreateMap
<
ag_secondallot
,
IssuedPromptResponse
>()
.
ReverseMap
();
.
ReverseMap
();
}
}
}
performance/Performance.DtoModels/Response/GatherResponse.cs
View file @
4029533d
using
Performance.EntityModels
;
using
Performance.DtoModels.Request
;
using
Performance.EntityModels
;
using
Performance.Infrastructure.Models
;
using
System.Collections.Generic
;
...
...
@@ -7,7 +8,17 @@ namespace Performance.DtoModels
public
class
GatherResponse
{
public
List
<
Heads
>
Heads
{
get
;
set
;
}
public
PageList
<
ex_result_gather
>
Datas
{
get
;
set
;
}
public
List
<
GatherTotalRequest
>
Datas
{
get
;
set
;
}
public
int
CurrentPage
{
get
;
set
;
}
public
int
TotalPages
{
get
;
set
;
}
public
int
PageSize
{
get
;
set
;
}
public
int
TotalCount
{
get
;
set
;
}
}
public
class
GatherInfo
{
public
List
<
Heads
>
Heads
{
get
;
set
;
}
public
List
<
ex_result_gather
>
Datas
{
get
;
set
;
}
public
List
<
GatherRequest
>
Children
{
get
;
set
;
}
public
int
CurrentPage
{
get
;
set
;
}
public
int
TotalPages
{
get
;
set
;
}
public
int
PageSize
{
get
;
set
;
}
...
...
performance/Performance.Services/EmployeeService.cs
View file @
4029533d
...
...
@@ -9,6 +9,7 @@
using
Performance.DtoModels.Request
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Infrastructure.Models
;
using
Performance.Repository
;
using
Performance.Services.AllotCompute
;
using
System
;
...
...
@@ -1237,7 +1238,7 @@ public void SaveGatherHands(int allotId, SaveGatherData request)
exresultgatherRepository
.
AddRange
(
depts
.
ToArray
());
}
public
Gather
Response
GetGather
(
int
allotId
,
PersonParamsRequest
request
)
public
Gather
Info
GetGather
(
int
allotId
,
PersonParamsRequest
request
)
{
var
head
=
ColumnHeadsConfig
.
GatherHeads
;
head
.
ForEach
(
t
=>
...
...
@@ -1252,31 +1253,58 @@ public GatherResponse GetGather(int allotId, PersonParamsRequest request)
var
data
=
exresultgatherRepository
.
GetGatherForPaging
(
request
.
PageNumber
,
request
.
PageSize
,
exp
);
List
<
ex_result_gather
>
Info
=
Mapper
.
Map
<
List
<
ex_result_gather
>>(
data
);
return
new
GatherResponse
()
GatherInfo
gatherInfo
=
new
GatherInfo
()
{
Heads
=
head
,
Datas
=
data
,
Datas
=
Info
,
CurrentPage
=
data
.
CurrentPage
,
TotalCount
=
data
.
TotalCount
,
PageSize
=
data
.
PageSize
,
TotalPages
=
data
.
TotalPages
};
List
<
GatherRequest
>
gatherRequest
=
new
List
<
GatherRequest
>();
foreach
(
var
item
in
exresultgatherRepository
.
GetEntities
(
a
=>
a
.
AllotId
==
allotId
))
{
GatherRequest
gatherRequest1
=
new
GatherRequest
()
{
Source
=
""
,
Category
=
item
.
Category
};
gatherRequest
.
Add
(
gatherRequest1
);
}
gatherInfo
.
Children
=
gatherRequest
;
return
gatherInfo
;
}
public
List
<
GatherTotalRequest
>
GetGatherTotal
(
int
allotId
,
PersonParamsRequest
request
)
public
GatherResponse
GetGatherTotal
(
int
allotId
,
PersonParamsRequest
request
)
{
var
head
=
ColumnHeadsConfig
.
GatherTotal
;
head
.
ForEach
(
t
=>
{
t
.
Name
=
t
.
Name
.
ToLower
();
});
Expression
<
Func
<
ex_result_gather
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
allotId
;
if
(
request
!=
null
&&
!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
exp
=
exp
.
And
(
t
=>
t
.
Department
.
Contains
(
request
.
SearchQuery
)
||
t
.
DoctorName
.
Contains
(
request
.
SearchQuery
)
||
t
.
PersonnelNumber
.
Contains
(
request
.
SearchQuery
)
||
t
.
Category
.
Contains
(
request
.
SearchQuery
)
||
t
.
Source
.
Contains
(
request
.
SearchQuery
));
var
data
=
exresultgatherRepository
.
GetGatherForPaging
(
request
.
PageNumber
,
request
.
PageSize
,
exp
);
var
list
=
exresultgatherRepository
.
GetGatherForPaging
(
request
.
PageNumber
,
request
.
PageSize
,
exp
);
List
<
GatherTotalRequest
>
deptTotal
=
Mapper
.
Map
<
List
<
GatherTotalRequest
>>(
list
);
return
deptTotal
;
List
<
GatherTotalRequest
>
deptTotal
=
Mapper
.
Map
<
List
<
GatherTotalRequest
>>(
data
);
return
new
GatherResponse
()
{
Heads
=
head
,
Datas
=
deptTotal
,
CurrentPage
=
data
.
CurrentPage
,
TotalCount
=
data
.
TotalCount
,
PageSize
=
data
.
PageSize
,
TotalPages
=
data
.
TotalPages
};
}
...
...
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