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
1696ae7c
Commit
1696ae7c
authored
Dec 20, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加过滤条件
parent
c6cde0ed
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
16 deletions
+98
-16
performance/Performance.Api/Controllers/ReportController.cs
+0
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+13
-5
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+10
-0
performance/Performance.DtoModels/Request/ComputerRequest.cs
+11
-9
performance/Performance.Repository/PerforReportRepository .cs
+24
-1
performance/Performance.Services/ComputeService.cs
+40
-1
No files found.
performance/Performance.Api/Controllers/ReportController.cs
View file @
1696ae7c
This diff is collapsed.
Click to expand it.
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
1696ae7c
...
...
@@ -1199,7 +1199,7 @@
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGatherHands(System.Int32,Performance.DtoModels.GatherRequest)"
>
<summary>
手工录入
手工录入
- 录入界面
</summary>
<param
name=
"allotId"
></param>
<param
name=
"request"
></param>
...
...
@@ -1215,7 +1215,15 @@
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGather(System.Int32,Performance.DtoModels.PersonParamsRequest)"
>
<summary>
手工录入列表
手工录入列表 - 明细
</summary>
<param
name=
"allotId"
></param>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetGatherTotal(System.Int32,Performance.DtoModels.PersonParamsRequest)"
>
<summary>
手工录入列表 - 汇总
</summary>
<param
name=
"allotId"
></param>
<param
name=
"request"
></param>
...
...
@@ -1648,7 +1656,7 @@
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ReportController.AllComputeViewDownload(Performance.DtoModels.BeginEndTime
Down
)"
>
<member
name=
"M:Performance.Api.Controllers.ReportController.AllComputeViewDownload(Performance.DtoModels.BeginEndTime)"
>
<summary>
全院绩效发放(视图)下载
</summary>
...
...
@@ -1662,7 +1670,7 @@
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ReportController.GethosdataView
(Performance.DtoModels.BeginEndTimeDown
)"
>
<member
name=
"M:Performance.Api.Controllers.ReportController.GethosdataView
Down(Performance.DtoModels.BeginEndTime
)"
>
<summary>
全院核算绩效发放(视图) 下载
</summary>
...
...
@@ -1676,7 +1684,7 @@
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ReportController.AllComputeByPMViewDownLoad(Performance.DtoModels.BeginEndTime
Down
)"
>
<member
name=
"M:Performance.Api.Controllers.ReportController.AllComputeByPMViewDownLoad(Performance.DtoModels.BeginEndTime)"
>
<summary>
获取财务全院绩效列表(视图)下载
</summary>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
1696ae7c
...
...
@@ -3619,6 +3619,16 @@
创建时间
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ex_result_gather.Remark"
>
<summary>
备注
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ex_result_gather.States"
>
<summary>
1 未通过 2 通过
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ex_script"
>
<summary>
...
...
performance/Performance.DtoModels/Request/ComputerRequest.cs
View file @
1696ae7c
...
...
@@ -52,22 +52,24 @@ public class ComputerAliasRequest
public
string
Route
{
get
;
set
;
}
}
public
class
BeginEndTime
public
abstract
class
BeginEndTimeDown
{
public
string
BeginTime
{
get
;
set
;
}
// 2021-01
public
string
EndTime
{
get
;
set
;
}
// 2021-08
public
int
CurrentPage
{
get
;
set
;
}
public
int
PageSize
{
get
;
set
;
}
public
int
HospitalId
{
get
;
set
;
}
public
List
<
TitleValue
>
Search
{
get
;
set
;
}
public
string
SortBy
{
get
;
set
;
}
}
public
class
BeginEndTimeDown
public
class
BeginEndTime
:
BeginEndTimeDown
{
public
string
BeginTime
{
get
;
set
;
}
// 2021-01
public
string
EndTime
{
get
;
set
;
}
// 2021-08
public
int
HospitalId
{
get
;
set
;
}
public
int
CurrentPage
{
get
;
set
;
}
public
int
PageSize
{
get
;
set
;
}
}
public
class
QueryComputeByDateGetPage
public
class
QueryComputeByDateGetPage
{
public
List
<
dynamic
>
Data
{
get
;
set
;
}
public
Dictionary
<
string
,
decimal
>
TotalData
{
get
;
set
;
}
...
...
performance/Performance.Repository/PerforReportRepository .cs
View file @
1696ae7c
using
Microsoft.EntityFrameworkCore
;
using
Dapper
;
using
Microsoft.EntityFrameworkCore
;
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
System
;
using
System.Collections.Generic
;
using
System.Data
;
using
System.Linq
;
namespace
Performance.Repository
{
public
partial
class
PerforReportRepository
:
PerforRepository
<
PerReport
>
{
private
readonly
IDbConnection
connection
;
public
PerforReportRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
connection
=
context
?.
Database
.
GetDbConnection
()
??
throw
new
ArgumentNullException
(
nameof
(
context
));
}
/// <summary>
...
...
@@ -397,6 +402,7 @@ public List<dynamic> QueryCompute(int allotId, string viewName)
return
DapperQuery
<
dynamic
>(
sql
,
new
{
allotId
})?.
ToList
();
}
public
List
<
dynamic
>
QueryComputeByDate
(
string
viewName
,
DateTime
beginTime
,
DateTime
endTime
)
{
var
sql
=
$@"SELECT * FROM
{
viewName
}
...
...
@@ -406,6 +412,23 @@ public List<dynamic> QueryComputeByDate(string viewName, DateTime beginTime, Dat
return
DapperQuery
<
dynamic
>(
sql
,
new
{
beginTime
=
beginTime
.
ToString
(
"yyyy-MM-dd"
),
endTime
=
endTime
.
ToString
(
"yyyy-MM-dd"
)
}).
ToList
();
}
public
(
List
<
dynamic
>
list
,
int
count
)
QueryComputePageData
(
string
query
,
object
param
=
null
)
{
try
{
using
(
var
multi
=
connection
.
QueryMultiple
(
query
,
param
,
commandTimeout
:
1000
))
{
var
list
=
multi
.
Read
<
dynamic
>().
ToList
();
var
count
=
multi
.
Read
<
int
>().
FirstOrDefault
();
return
(
list
,
count
);
}
}
catch
{
return
(
new
List
<
dynamic
>(),
0
);
}
}
public
CustonPagingData
QueryCustom
(
CustomPagingRequest
request
,
bool
IsHead
)
{
var
result
=
new
CustonPagingData
();
...
...
performance/Performance.Services/ComputeService.cs
View file @
1696ae7c
...
...
@@ -2069,11 +2069,50 @@ public List<dynamic> GetAllComputeView(int hospitalId, int AllotId, string viewN
{
return
reportRepository
.
QueryCompute
(
AllotId
,
viewName
);
}
public
List
<
dynamic
>
GetAllComputeViewByDate
(
string
viewName
,
DateTime
beginTime
,
DateTime
endTime
)
{
return
reportRepository
.
QueryComputeByDate
(
viewName
,
beginTime
,
endTime
);
}
public
QueryComputeByDateGetPage
GetAllComputeViewByDate
(
string
viewName
,
BeginEndTime
request
)
{
var
sql
=
$@"select * from
{
viewName
}
where str_to_date(concat(year, '-', month, '-01'), '%Y-%m-%d') >= '
{
request
.
BeginTime
}
-01'
and str_to_date(concat(year, '-', month, '-01'), '%Y-%m-%d') < '
{
request
.
EndTime
}
-01'
and hospitalid =
{
request
.
HospitalId
}
"
;
if
(
request
.
Search
!=
null
&&
request
.
Search
.
Any
())
{
var
where
=
request
.
Search
.
Select
(
t
=>
$"
{
t
.
Title
}
like '%
{
t
.
Value
}
%'"
);
sql
+=
" and "
+
string
.
Join
(
" and "
,
where
);
}
if
(!
string
.
IsNullOrEmpty
(
request
.
SortBy
))
sql
+=
$" order by
{
request
.
SortBy
}
"
;
string
query
=
sql
+
@"; select 0 as total;"
;
if
(
request
.
PageSize
>
0
&&
request
.
CurrentPage
>
0
)
{
query
=
$@"
select * from (
{
sql
}
) tab limit
{
request
.
PageSize
}
offset
{(
request
.
CurrentPage
-
1
)
*
request
.
PageSize
}
;
select count(1) total from (
{
sql
}
) tab;"
;
}
var
(
list
,
count
)
=
reportRepository
.
QueryComputePageData
(
query
);
return
new
QueryComputeByDateGetPage
{
Data
=
list
,
TotalData
=
SumDatas
(
list
),
TotalCount
=
count
,
TotalPages
=
(
int
)
Math
.
Ceiling
((
double
)
list
.
Count
()
/
request
.
PageSize
),
CurrentPage
=
request
.
CurrentPage
,
PageSize
=
request
.
PageSize
};
}
/// <summary>
///
/// </summary>
...
...
@@ -2110,7 +2149,7 @@ public List<dynamic> GetAllComputeViewByDate(string viewName, DateTime beginTime
pairs
[
item
.
Key
]
=
Math
.
Round
(
item
.
Value
,
2
,
MidpointRounding
.
AwayFromZero
);
}
return
pairs
;
}
}
}
public
class
ComputeConfig
...
...
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