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
68927268
Commit
68927268
authored
Dec 06, 2021
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手工录入汇总与详情
parent
53423ce3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
29 deletions
+101
-29
performance/Performance.Api/Controllers/EmployeeController.cs
+8
-3
performance/Performance.Api/wwwroot/Performance.Api.xml
+4
-2
performance/Performance.DtoModels/Response/GatherResponse.cs
+7
-3
performance/Performance.Services/EmployeeService.cs
+82
-21
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
68927268
...
@@ -320,6 +320,8 @@ public ApiResponse GetAprDetail([FromBody] per_apr_amount request)
...
@@ -320,6 +320,8 @@ public ApiResponse GetAprDetail([FromBody] per_apr_amount request)
if
(
employee
==
null
||
!
employee
.
Any
())
if
(
employee
==
null
||
!
employee
.
Any
())
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
var
result
=
employee
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
PersonnelNumber
,
t
.
DoctorName
}).
Select
(
t
=>
new
var
result
=
employee
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
PersonnelNumber
,
t
.
DoctorName
}).
Select
(
t
=>
new
{
{
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
...
@@ -797,18 +799,21 @@ public ApiResponse SaveGatherHands(int allotId, [FromBody] SaveGatherData reques
...
@@ -797,18 +799,21 @@ public ApiResponse SaveGatherHands(int allotId, [FromBody] SaveGatherData reques
/// 手工录入列表 - 明细
/// 手工录入列表 - 明细
/// </summary>
/// </summary>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
/// <param name="request"></param>
/// <param name="department">科室</param>
/// <param name="source">来源</param>
/// <param name="request">分页</param>
/// <returns></returns>
/// <returns></returns>
[
Route
(
"getgather/{allotId}"
)]
[
Route
(
"getgather/{allotId}"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
GetGather
([
FromRoute
]
int
allotId
,
[
FromBody
]
PersonParamsRequest
request
)
public
ApiResponse
GetGather
([
FromRoute
]
int
allotId
,
string
department
,
string
source
,
[
FromBody
]
PersonParamsRequest
request
)
{
{
if
(
allotId
<=
0
)
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
var
result
=
employeeService
.
GetGather
(
allotId
,
request
);
var
result
=
employeeService
.
GetGather
(
allotId
,
department
,
source
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
/// <summary>
/// <summary>
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
68927268
...
@@ -1216,12 +1216,14 @@
...
@@ -1216,12 +1216,14 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGather(System.Int32,Performance.DtoModels.PersonParamsRequest)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGather(System.Int32,
System.String,System.String,
Performance.DtoModels.PersonParamsRequest)"
>
<summary>
<summary>
手工录入列表 - 明细
手工录入列表 - 明细
</summary>
</summary>
<param
name=
"allotId"
></param>
<param
name=
"allotId"
></param>
<param
name=
"request"
></param>
<param
name=
"department"
>
科室
</param>
<param
name=
"source"
>
来源
</param>
<param
name=
"request"
>
分页
</param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGatherTotal(System.Int32,Performance.DtoModels.PersonParamsRequest)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGatherTotal(System.Int32,Performance.DtoModels.PersonParamsRequest)"
>
...
...
performance/Performance.DtoModels/Response/GatherResponse.cs
View file @
68927268
...
@@ -41,18 +41,22 @@ public class GatherRequest
...
@@ -41,18 +41,22 @@ public class GatherRequest
public
class
GatherTotalRequest
public
class
GatherTotalRequest
{
{
public
int
ID
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
public
string
Source
{
get
;
set
;
}
public
string
Source
{
get
;
set
;
}
public
decimal
Fee
{
get
;
set
;
}
public
decimal
Fee
{
get
;
set
;
}
}
}
public
class
GatherInfoRequest
public
class
GatherInfoRequest
{
{
public
int
ID
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
public
string
DoctorName
{
get
;
set
;
}
public
string
DoctorName
{
get
;
set
;
}
public
string
PersonnelNumber
{
get
;
set
;
}
public
string
PersonnelNumber
{
get
;
set
;
}
public
List
<
GatherInfoFee
>
Detail
{
get
;
set
;
}
}
public
class
GatherInfoFee
{
public
string
Category
{
get
;
set
;
}
public
string
Category
{
get
;
set
;
}
public
decimal
Fee
{
get
;
set
;
}
public
decimal
?
Value
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/EmployeeService.cs
View file @
68927268
...
@@ -1238,40 +1238,64 @@ public void SaveGatherHands(int allotId, SaveGatherData request)
...
@@ -1238,40 +1238,64 @@ public void SaveGatherHands(int allotId, SaveGatherData request)
exresultgatherRepository
.
AddRange
(
depts
.
ToArray
());
exresultgatherRepository
.
AddRange
(
depts
.
ToArray
());
}
}
public
GatherInfo
GetGather
(
int
allotId
,
PersonParamsRequest
request
)
public
GatherInfo
GetGather
(
int
allotId
,
string
department
,
string
source
,
PersonParamsRequest
request
)
{
{
var
head
=
ColumnHeadsConfig
.
GatherHeads
;
var
datas
=
exresultgatherRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Department
.
Contains
(
department
)
&&
t
.
Source
.
Contains
(
source
)
&&
(
t
.
PersonnelNumber
!=
""
||
t
.
DoctorName
!=
""
));
head
.
ForEach
(
t
=>
var
result
=
datas
.
GroupBy
(
a
=>
new
{
a
.
Department
,
a
.
DoctorName
,
a
.
PersonnelNumber
}).
Select
(
t
=>
new
{
{
t
.
Name
=
t
.
Name
.
ToLower
();
Department
=
t
.
Key
.
Department
,
DoctorName
=
t
.
Key
.
DoctorName
,
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
Detail
=
t
.
GroupBy
(
group
=>
group
.
Category
).
Select
(
s
=>
new
TitleValue
<
decimal
>
{
Title
=
string
.
IsNullOrEmpty
(
s
.
Key
)
?
"未知"
:
s
.
Key
,
Value
=
s
.
Sum
(
sum
=>
sum
.
Fee
)
})
});
});
Expression
<
Func
<
ex_result_gather
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
allotId
&&
t
.
DoctorName
!=
""
||
t
.
PersonnelNumber
!=
""
;
List
<
GatherInfoRequest
>
gatherInfoRequests
=
new
List
<
GatherInfoRequest
>();
foreach
(
var
item
in
result
.
ToList
())
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
));
GatherInfoRequest
gatherInfoRequest
=
new
GatherInfoRequest
()
{
var
data
=
exresultgatherRepository
.
GetGatherForPaging
(
request
.
PageNumber
,
request
.
PageSize
,
exp
);
Department
=
item
.
Department
,
DoctorName
=
item
.
DoctorName
,
List
<
GatherInfoRequest
>
Info
=
Mapper
.
Map
<
List
<
GatherInfoRequest
>>(
data
);
PersonnelNumber
=
item
.
PersonnelNumber
,
Detail
=
new
List
<
GatherInfoFee
>()
};
foreach
(
var
item2
in
item
.
Detail
)
{
GatherInfoFee
gatherInfoFee
=
new
GatherInfoFee
()
{
Category
=
item2
.
Title
,
Value
=
item2
.
Value
};
gatherInfoRequest
.
Detail
.
Add
(
gatherInfoFee
);
}
gatherInfoRequests
.
Add
(
gatherInfoRequest
);
}
GatherInfo
gatherInfo
=
new
GatherInfo
()
GatherInfo
gatherInfo
=
new
GatherInfo
()
{
{
Heads
=
head
,
Datas
=
gatherInfoRequests
.
Skip
((
request
.
PageNumber
-
1
)
*
request
.
PageSize
).
Take
(
request
.
PageSize
).
ToList
(),
Datas
=
Info
,
CurrentPage
=
request
.
PageNumber
,
CurrentPage
=
data
.
CurrentPage
,
TotalCount
=
gatherInfoRequests
.
Count
(),
TotalCount
=
data
.
TotalCount
,
PageSize
=
request
.
PageSize
,
PageSize
=
data
.
PageSize
,
TotalPages
=
(
int
)
Math
.
Ceiling
((
double
)
gatherInfoRequests
.
Count
()
/
request
.
PageSize
)
TotalPages
=
data
.
TotalPages
};
};
return
gatherInfo
;
return
gatherInfo
;
}
}
public
List
<
ex_result_gather
>
GetGatherCategory
(
int
allotId
,
string
department
,
string
source
)
{
return
exresultgatherRepository
.
GetEntities
(
a
=>
a
.
AllotId
==
allotId
&&
a
.
Department
==
department
&&
a
.
Source
==
source
).
ToList
();
}
public
GatherResponse
GetGatherTotal
(
int
allotId
,
PersonParamsRequest
request
)
public
GatherResponse
GetGatherTotal
(
int
allotId
,
PersonParamsRequest
request
)
{
{
var
head
=
ColumnHeadsConfig
.
GatherTotal
;
#
region
旧的
/*var head = ColumnHeadsConfig.GatherTotal;
head.ForEach(t =>
head.ForEach(t =>
{
{
t.Name = t.Name.ToLower();
t.Name = t.Name.ToLower();
...
@@ -1293,7 +1317,44 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
...
@@ -1293,7 +1317,44 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
TotalCount = data.TotalCount,
TotalCount = data.TotalCount,
PageSize = data.PageSize,
PageSize = data.PageSize,
TotalPages = data.TotalPages
TotalPages = data.TotalPages
};*/
#
endregion
Expression
<
Func
<
ex_result_gather
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
allotId
&&
t
.
DoctorName
!=
""
||
t
.
PersonnelNumber
!=
""
;
if
(
request
!=
null
&&
!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
exp
=
exp
.
And
(
t
=>
t
.
Department
.
Contains
(
request
.
SearchQuery
)
||
t
.
Source
.
Contains
(
request
.
SearchQuery
));
var
datas
=
exresultgatherRepository
.
GetEntities
(
exp
);
var
result
=
datas
.
GroupBy
(
a
=>
new
{
a
.
Department
,
a
.
Source
}).
Select
(
t
=>
new
{
Department
=
t
.
Key
.
Department
,
Source
=
t
.
Key
.
Source
,
Fee
=
t
.
Sum
(
a
=>
a
.
Fee
)
});
List
<
GatherTotalRequest
>
gatherTotalRequests
=
new
List
<
GatherTotalRequest
>();
foreach
(
var
item
in
result
.
ToList
())
{
GatherTotalRequest
gatherTotalRequest
=
new
GatherTotalRequest
()
{
Department
=
item
.
Department
,
Source
=
item
.
Source
,
Fee
=
item
.
Fee
};
gatherTotalRequests
.
Add
(
gatherTotalRequest
);
}
GatherResponse
gatherResponse
=
new
GatherResponse
()
{
Datas
=
gatherTotalRequests
.
Skip
((
request
.
PageNumber
-
1
)
*
request
.
PageSize
).
Take
(
request
.
PageSize
).
ToList
(),
CurrentPage
=
request
.
PageNumber
,
TotalCount
=
gatherTotalRequests
.
Count
(),
PageSize
=
request
.
PageSize
,
TotalPages
=
(
int
)
Math
.
Ceiling
((
double
)
gatherTotalRequests
.
Count
()
/
request
.
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