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
90d98c16
Commit
90d98c16
authored
Oct 28, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效发放表 改为视图
parent
5143bb0a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
257 additions
and
60 deletions
+257
-60
performance/Performance.Api/Controllers/ComputeController.cs
+65
-20
performance/Performance.Api/wwwroot/Performance.Api.xml
+19
-5
performance/Performance.EntityModels/Other/view_allot_result.cs
+1
-1
performance/Performance.EntityModels/Other/view_allot_sign_dept.cs
+28
-0
performance/Performance.EntityModels/Other/view_allot_sign_emp.cs
+35
-0
performance/Performance.Repository/PerforReportRepository .cs
+3
-10
performance/Performance.Services/ComputeService.cs
+106
-24
performance/Performance.Services/DownloadService.cs
+0
-0
No files found.
performance/Performance.Api/Controllers/ComputeController.cs
View file @
90d98c16
...
@@ -386,7 +386,7 @@ public ApiResponse<res_baiscnorm> EditHospitalAvg([FromBody] ComputerAvgRequest
...
@@ -386,7 +386,7 @@ public ApiResponse<res_baiscnorm> EditHospitalAvg([FromBody] ComputerAvgRequest
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
CustomColumnHeaders
([
FromBody
]
ComputerAliasRequest
request
)
public
ApiResponse
CustomColumnHeaders
([
FromBody
]
ComputerAliasRequest
request
)
{
{
var
result
=
_computeService
.
CustomColumnHeaders
(
request
);
var
result
=
_computeService
.
CustomColumnHeaders
(
request
.
HospitalId
,
request
.
Route
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
...
@@ -498,43 +498,68 @@ public IActionResult AllComputeByPMDownLoad(int allotId)
...
@@ -498,43 +498,68 @@ public IActionResult AllComputeByPMDownLoad(int allotId)
#
region
发放表视图、下载
#
region
发放表视图、下载
/// <summary>
/// <summary>
///
获取全院绩效列表
(视图)
///
全院核算绩效发放
(视图)
/// </summary>
/// </summary>
/// <param name="request"></param>
/// <param name="request"></param>
/// <returns></returns>
/// <returns></returns>
[
Route
(
"
allcompute
View"
)]
[
Route
(
"
gethosdata
View"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
AllCompute
View
([
FromBody
]
ComputerRequest
request
)
public
ApiResponse
Gethosdata
View
([
FromBody
]
ComputerRequest
request
)
{
{
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
list
=
_computeService
.
GetAllComputeView
(
allot
.
HospitalId
,
request
.
AllotId
,
true
);
var
list
=
_computeService
.
GetAllComputeView
(
allot
.
HospitalId
,
request
.
AllotId
,
"view_allot_sign_dept"
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
}
/// <summary>
/// <summary>
///
获取全院绩效列表(人事科)
///
全院核算绩效发放(视图) 下载
/// </summary>
/// </summary>
/// <param name="
request
"></param>
/// <param name="
allotId
"></param>
/// <returns></returns>
/// <returns></returns>
[
Route
(
"
allcomputeView/personnel
"
)]
[
Route
(
"
gethosdataView/download/{allotId}
"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
AllComputeViewByPM
([
FromBody
]
ComputerRequest
request
)
public
IActionResult
GethosdataView
(
int
allotId
)
{
{
var
allot
=
_allotService
.
GetAllot
(
request
.
A
llotId
);
var
allot
=
_allotService
.
GetAllot
(
a
llotId
);
if
(
null
==
allot
)
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
result
=
_computeService
.
GetAllComputeView
(
allot
.
HospitalId
,
request
.
AllotId
,
false
);
var
list
=
_computeService
.
GetAllComputeView
(
allot
.
HospitalId
,
allotId
,
"view_allot_sign_dept"
);
var
filepath
=
downloadService
.
AllComputerViewReport
(
allotId
,
list
,
"/result/print/compute"
,
"全院核算绩效发放"
);
//var result = _computeService.ComputerGroupBy(list);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
var
memoryStream
=
new
MemoryStream
();
using
(
var
stream
=
new
FileStream
(
filepath
,
FileMode
.
Open
))
{
stream
.
CopyToAsync
(
memoryStream
).
Wait
();
}
memoryStream
.
Seek
(
0
,
SeekOrigin
.
Begin
);
var
provider
=
new
FileExtensionContentTypeProvider
();
FileInfo
fileInfo
=
new
FileInfo
(
filepath
);
var
memi
=
provider
.
Mappings
[
".xlsx"
];
return
File
(
memoryStream
,
memi
,
Path
.
GetFileName
(
fileInfo
.
Name
));
}
}
/// <summary>
/// 获取全院绩效列表(视图)
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"allcomputeView"
)]
[
HttpPost
]
public
ApiResponse
AllComputeView
([
FromBody
]
ComputerRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
list
=
_computeService
.
GetAllComputeView
(
allot
.
HospitalId
,
request
.
AllotId
,
"view_allot_sign_emp"
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// <summary>
/// 下载全院绩效列表
/// 下载全院绩效列表
...
@@ -549,8 +574,8 @@ public IActionResult AllComputeViewDownload(int allotId)
...
@@ -549,8 +574,8 @@ public IActionResult AllComputeViewDownload(int allotId)
if
(
null
==
allot
)
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
list
=
_computeService
.
GetAllComputeView
(
allot
.
HospitalId
,
allotId
,
true
);
var
list
=
_computeService
.
GetAllComputeView
(
allot
.
HospitalId
,
allotId
,
"view_allot_sign_emp"
);
var
filepath
=
downloadService
.
AllComputerViewReport
(
allotId
,
list
,
true
,
"全院绩效发放"
);
var
filepath
=
downloadService
.
AllComputerViewReport
(
allotId
,
list
,
"/result/compute"
,
"全院绩效发放"
);
var
memoryStream
=
new
MemoryStream
();
var
memoryStream
=
new
MemoryStream
();
using
(
var
stream
=
new
FileStream
(
filepath
,
FileMode
.
Open
))
using
(
var
stream
=
new
FileStream
(
filepath
,
FileMode
.
Open
))
...
@@ -564,8 +589,28 @@ public IActionResult AllComputeViewDownload(int allotId)
...
@@ -564,8 +589,28 @@ public IActionResult AllComputeViewDownload(int allotId)
return
File
(
memoryStream
,
memi
,
Path
.
GetFileName
(
fileInfo
.
Name
));
return
File
(
memoryStream
,
memi
,
Path
.
GetFileName
(
fileInfo
.
Name
));
}
}
/// <summary>
/// <summary>
/// 下载全院绩效列表(人事科/视图)
/// 获取全院绩效列表(人事科)
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"allcomputeView/personnel"
)]
[
HttpPost
]
public
ApiResponse
AllComputeViewByPM
([
FromBody
]
ComputerRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
result
=
_computeService
.
GetAllComputeView
(
allot
.
HospitalId
,
request
.
AllotId
,
"view_allot_sign_emp_finance"
);
//var result = _computeService.ComputerGroupBy(list);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
}
/// <summary>
/// 下载全院绩效列表(人事科)
/// </summary>
/// </summary>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
/// <returns></returns>
/// <returns></returns>
...
@@ -576,9 +621,9 @@ public IActionResult AllComputeByPMViewDownLoad(int allotId)
...
@@ -576,9 +621,9 @@ public IActionResult AllComputeByPMViewDownLoad(int allotId)
var
allot
=
_allotService
.
GetAllot
(
allotId
);
var
allot
=
_allotService
.
GetAllot
(
allotId
);
if
(
null
==
allot
)
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
result
=
_computeService
.
GetAllComputeView
(
allot
.
HospitalId
,
allotId
,
false
);
var
result
=
_computeService
.
GetAllComputeView
(
allot
.
HospitalId
,
allotId
,
"view_allot_sign_emp_finance"
);
var
filepath
=
downloadService
.
AllComputerViewReport
(
allotId
,
result
,
false
,
"财务全院绩效
"
);
var
filepath
=
downloadService
.
AllComputerViewReport
(
allotId
,
result
,
"/result/wholehospital"
,
"财务全院绩效发放
"
);
var
memoryStream
=
new
MemoryStream
();
var
memoryStream
=
new
MemoryStream
();
using
(
var
stream
=
new
FileStream
(
filepath
,
FileMode
.
Open
))
using
(
var
stream
=
new
FileStream
(
filepath
,
FileMode
.
Open
))
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
90d98c16
...
@@ -575,16 +575,23 @@
...
@@ -575,16 +575,23 @@
<param
name=
"allotId"
></param>
<param
name=
"allotId"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.
AllCompute
View(Performance.DtoModels.ComputerRequest)"
>
<member
name=
"M:Performance.Api.Controllers.ComputeController.
Gethosdata
View(Performance.DtoModels.ComputerRequest)"
>
<summary>
<summary>
获取全院绩效列表
(视图)
全院核算绩效发放
(视图)
</summary>
</summary>
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.AllManageComputeView(Performance.DtoModels.ComputerRequest)"
>
<member
name=
"M:Performance.Api.Controllers.ComputeController.GethosdataView(System.Int32)"
>
<summary>
全院核算绩效发放(视图) 下载
</summary>
<param
name=
"allotId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.AllComputeView(Performance.DtoModels.ComputerRequest)"
>
<summary>
<summary>
获取全院
管理绩效列表(视图)
获取全院
绩效列表(视图)
</summary>
</summary>
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
...
@@ -596,9 +603,16 @@
...
@@ -596,9 +603,16 @@
<param
name=
"allotId"
></param>
<param
name=
"allotId"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.AllComputeViewByPM(Performance.DtoModels.ComputerRequest)"
>
<summary>
获取全院绩效列表(人事科)
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.AllComputeByPMViewDownLoad(System.Int32)"
>
<member
name=
"M:Performance.Api.Controllers.ComputeController.AllComputeByPMViewDownLoad(System.Int32)"
>
<summary>
<summary>
下载全院绩效列表(人事科
/视图
)
下载全院绩效列表(人事科)
</summary>
</summary>
<param
name=
"allotId"
></param>
<param
name=
"allotId"
></param>
<returns></returns>
<returns></returns>
...
...
performance/Performance.EntityModels/Other/view_allot_result.cs
View file @
90d98c16
...
@@ -61,6 +61,6 @@ public class view_allot_result
...
@@ -61,6 +61,6 @@ public class view_allot_result
public
string
JobCategory
{
get
;
set
;
}
public
string
JobCategory
{
get
;
set
;
}
public
string
Duty
{
get
;
set
;
}
public
string
Duty
{
get
;
set
;
}
public
string
TitlePosition
{
get
;
set
;
}
public
string
TitlePosition
{
get
;
set
;
}
}
}
}
}
performance/Performance.EntityModels/Other/view_allot_sign_dept.cs
0 → 100644
View file @
90d98c16
namespace
Performance.DtoModels
{
public
class
view_allot_sign_dept
{
public
int
HospitalId
{
get
;
set
;
}
public
int
AllotID
{
get
;
set
;
}
public
int
Year
{
get
;
set
;
}
public
int
Month
{
get
;
set
;
}
public
int
UnitName
{
get
;
set
;
}
public
int
AccountingUnit
{
get
;
set
;
}
public
int
PerforFee
{
get
;
set
;
}
public
int
WorkloadFee
{
get
;
set
;
}
public
int
AssessBeforeOtherFee
{
get
;
set
;
}
public
int
PerforTotal
{
get
;
set
;
}
public
int
ScoringAverage
{
get
;
set
;
}
public
int
Extra
{
get
;
set
;
}
public
int
MedicineExtra
{
get
;
set
;
}
public
int
MaterialsExtra
{
get
;
set
;
}
public
int
AssessLaterOtherFee
{
get
;
set
;
}
public
int
AssessLaterPerforTotal
{
get
;
set
;
}
public
int
AdjustFactor
{
get
;
set
;
}
public
int
AdjustLaterOtherFee
{
get
;
set
;
}
public
int
AprPerforAmount
{
get
;
set
;
}
public
int
HideAprOtherPerforAmount
{
get
;
set
;
}
public
int
AssessLaterManagementFee
{
get
;
set
;
}
public
int
RealGiveFee
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Other/view_allot_sign_emp.cs
0 → 100644
View file @
90d98c16
namespace
Performance.DtoModels
{
public
class
view_allot_sign_emp
{
public
int
HospitalID
{
get
;
set
;
}
public
int
Year
{
get
;
set
;
}
public
int
Month
{
get
;
set
;
}
public
int
Source
{
get
;
set
;
}
public
int
AllotId
{
get
;
set
;
}
public
int
SecondId
{
get
;
set
;
}
public
int
States
{
get
;
set
;
}
public
string
UnitType
{
get
;
set
;
}
public
string
AccountingUnit
{
get
;
set
;
}
public
string
IsShowManage
{
get
;
set
;
}
public
string
EmployeeName
{
get
;
set
;
}
public
string
JobNumber
{
get
;
set
;
}
public
string
JobTitle
{
get
;
set
;
}
public
string
Emp_UnitType
{
get
;
set
;
}
public
string
Emp_AccountingUnit
{
get
;
set
;
}
public
string
BankCard
{
get
;
set
;
}
public
string
Batch
{
get
;
set
;
}
public
string
JobCategory
{
get
;
set
;
}
public
string
Duty
{
get
;
set
;
}
public
string
TitlePosition
{
get
;
set
;
}
public
string
PerforSumFee
{
get
;
set
;
}
public
decimal
PerforManagementFee
{
get
;
set
;
}
public
decimal
NightWorkPerfor
{
get
;
set
;
}
public
decimal
AdjustLaterOtherFee
{
get
;
set
;
}
public
decimal
OtherPerfor
{
get
;
set
;
}
public
decimal
HideOtherPerfor
{
get
;
set
;
}
public
decimal
ShouldGiveFee
{
get
;
set
;
}
public
decimal
ReservedRatioFee
{
get
;
set
;
}
public
decimal
RealGiveFee
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforReportRepository .cs
View file @
90d98c16
...
@@ -389,18 +389,11 @@ public List<view_allot_result> GetOwnerPerformance(List<int> hospitalId, string
...
@@ -389,18 +389,11 @@ public List<view_allot_result> GetOwnerPerformance(List<int> hospitalId, string
return
DapperQuery
<
view_allot_result
>(
sql
,
new
{
HospitalID
=
hospitalId
,
JobNumber
=
jobNumber
})?.
ToList
();
return
DapperQuery
<
view_allot_result
>(
sql
,
new
{
HospitalID
=
hospitalId
,
JobNumber
=
jobNumber
})?.
ToList
();
}
}
public
List
<
dynamic
>
Query
AllCompute
(
int
hospitalId
,
int
allotId
)
public
List
<
dynamic
>
Query
Compute
(
int
allotId
,
string
viewName
)
{
{
var
sql
=
$@"SELECT * FROM
view_allot_result WHERE hospitalId = @hospitalId AND AllotId = @AllotId ORDER BY UnitType,AccountingUnit
; "
;
var
sql
=
$@"SELECT * FROM
{
viewName
}
WHERE AllotId = @AllotId
; "
;
return
DapperQuery
<
dynamic
>(
sql
,
new
{
hospitalId
,
allotId
})?.
ToList
();
return
DapperQuery
<
dynamic
>(
sql
,
new
{
allotId
})?.
ToList
();
}
public
List
<
dynamic
>
QueryAdminCompute
(
int
hospitalId
,
int
allotId
)
{
var
sql
=
$@"SELECT * FROM view_allot_result_finance WHERE hospitalId=@hospitalId AND allotId=@allotId ORDER BY UnitType,AccountingUnit;"
;
return
DapperQuery
<
dynamic
>(
sql
,
new
{
hospitalId
,
allotId
})?.
ToList
();
}
}
}
}
}
}
performance/Performance.Services/ComputeService.cs
View file @
90d98c16
This diff is collapsed.
Click to expand it.
performance/Performance.Services/DownloadService.cs
View file @
90d98c16
This diff is collapsed.
Click to expand it.
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