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
a8de2e6c
Commit
a8de2e6c
authored
Jan 29, 2023
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科主任/护士长管理绩效打印
parent
bb5ddeef
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
2 deletions
+90
-2
performance/Performance.Api/Controllers/SecondAllotController.cs
+14
-1
performance/Performance.Api/wwwroot/Performance.Api.xml
+7
-1
performance/Performance.Services/DapperService.cs
+27
-0
performance/Performance.Services/SecondAllotService.cs
+42
-0
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
a8de2e6c
...
@@ -518,7 +518,7 @@ public ApiResponse SecondNewPrint(int secondid)
...
@@ -518,7 +518,7 @@ public ApiResponse SecondNewPrint(int secondid)
}
}
/// <summary>
/// <summary>
/// 科主任/护士长
绩效发布
/// 科主任/护士长
管理绩效
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
Route
(
"api/second/deptcompute/{allotId}"
)]
[
Route
(
"api/second/deptcompute/{allotId}"
)]
...
@@ -532,6 +532,19 @@ public ApiResponse DeptComputeDetail(int allotId)
...
@@ -532,6 +532,19 @@ public ApiResponse DeptComputeDetail(int allotId)
}
}
/// <summary>
/// <summary>
/// 科主任/护士长管理绩效打印
/// </summary>
/// <returns></returns>
[
Route
(
"api/second/print/deptcompute/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
DeptComputePrint
(
int
allotId
)
{
var
userId
=
claimService
.
GetUserId
();
var
result
=
secondAllotService
.
DeptComputePrint
(
userId
,
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
/// <summary>
/// 获取二次绩效详情数据
/// 获取二次绩效详情数据
/// </summary>
/// </summary>
/// <param name="secondId"></param>
/// <param name="secondId"></param>
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
a8de2e6c
...
@@ -2324,7 +2324,13 @@
...
@@ -2324,7 +2324,13 @@
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.DeptComputeDetail(System.Int32)"
>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.DeptComputeDetail(System.Int32)"
>
<summary>
<summary>
科主任/护士长绩效发布
科主任/护士长管理绩效
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.DeptComputePrint(System.Int32)"
>
<summary>
科主任/护士长管理绩效打印
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</member>
...
...
performance/Performance.Services/DapperService.cs
View file @
a8de2e6c
...
@@ -326,6 +326,32 @@ public IEnumerable<dynamic> QuerySecondPrintRow(int allotId, string unitType, st
...
@@ -326,6 +326,32 @@ public IEnumerable<dynamic> QuerySecondPrintRow(int allotId, string unitType, st
throw
;
throw
;
}
}
}
}
/// <summary>
/// 管理绩效打印
/// </summary>
/// <param name="allotId"></param>
/// <param name="unitTypes"></param>
/// <param name="accountingUnit"></param>
/// <returns></returns>
public
IEnumerable
<
dynamic
>
QuerySecondPrintManagement
(
int
allotId
,
string
[]
unitTypes
,
string
accountingUnit
)
{
try
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
string
sql
=
$@"select * from view_second_print_management where AllotId = @allotId and UnitType in @unitTypes and AccountingUnit = @AccountingUnit"
;
return
connection
.
Query
(
sql
,
new
{
allotId
,
unitTypes
,
accountingUnit
},
commandTimeout
:
60
*
60
);
}
}
catch
(
Exception
ex
)
{
_logger
.
LogError
(
$"SQL执行异常:
{
ex
}
"
);
throw
;
}
}
public
IEnumerable
<
dynamic
>
QueryTableStructure
(
string
tableName
)
public
IEnumerable
<
dynamic
>
QueryTableStructure
(
string
tableName
)
{
{
try
try
...
@@ -344,6 +370,7 @@ public IEnumerable<dynamic> QueryTableStructure(string tableName)
...
@@ -344,6 +370,7 @@ public IEnumerable<dynamic> QueryTableStructure(string tableName)
throw
;
throw
;
}
}
}
}
public
IEnumerable
<
dynamic
>
QueryView
(
string
viewName
,
int
allotID
)
public
IEnumerable
<
dynamic
>
QueryView
(
string
viewName
,
int
allotID
)
{
{
try
try
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
a8de2e6c
...
@@ -2458,6 +2458,48 @@ public List<DeptDataDetails> DeptComputeDetailList(int userId, int allotId, out
...
@@ -2458,6 +2458,48 @@ public List<DeptDataDetails> DeptComputeDetailList(int userId, int allotId, out
}
}
/// <summary>
/// <summary>
/// 科主任/护士长管理绩效打印
/// </summary>
/// <param name="userId"></param>
/// <param name="allotId"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public
dynamic
DeptComputePrint
(
int
userId
,
int
allotId
)
{
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
allotId
);
if
(
allot
==
null
)
throw
new
NotImplementedException
(
"当前用户不存在"
);
var
userInfo
=
userRepository
.
GetUser
(
userId
);
if
(
userInfo
?.
User
==
null
)
throw
new
NotImplementedException
(
"当前用户不存在"
);
if
(
userInfo
.
URole
==
null
)
throw
new
NotImplementedException
(
"当前用户暂未分配角色"
);
if
(!
userInfo
.
Hospitals
.
NotNullOrEmpty
())
throw
new
NotImplementedException
(
"当前用户暂未分配医院"
);
// 未下发或未归档 则不可见
var
status
=
new
int
[]
{
(
int
)
AllotStates
.
绩效下发
,
(
int
)
AllotStates
.
归档
};
if
(!
status
.
Contains
(
allot
.
States
))
return
new
{
title
=
""
,
body
=
Array
.
Empty
<
dynamic
>(),
column
=
Array
.
Empty
<
dynamic
>()
};
Dictionary
<
int
,
string
[
]>
maps
=
new
Dictionary
<
int
,
string
[
]>
{
{
(
int
)
Role
.
科主任
,
new
string
[]{
UnitType
.
医生组
.
ToString
(),
UnitType
.
其他医生组
.
ToString
(),
UnitType
.
医技组
.
ToString
(),
UnitType
.
其他医技组
.
ToString
()
}
},
{
(
int
)
Role
.
护士长
,
new
string
[]{
UnitType
.
护理组
.
ToString
(),
UnitType
.
其他护理组
.
ToString
()
}
},
{
(
int
)
Role
.
特殊科室
,
new
string
[]{
UnitType
.
特殊核算组
.
ToString
(),
}
},
{
(
int
)
Role
.
行政科室
,
new
string
[]{
UnitType
.
行政中层
.
ToString
(),
}
},
};
// 查询当前角色下科室的绩效
var
accountingUnit
=
userInfo
.
User
.
Department
;
int
roleType
=
userInfo
?.
URole
.
Type
??
0
;
var
unitTypes
=
maps
.
ContainsKey
(
roleType
)
?
maps
[
roleType
]
:
Array
.
Empty
<
string
>();
if
(
unitTypes
?.
Any
()
!=
true
)
return
new
{
title
=
""
,
body
=
Array
.
Empty
<
dynamic
>(),
column
=
Array
.
Empty
<
dynamic
>()
};
var
body
=
_service
.
QuerySecondPrintManagement
(
allotId
,
unitTypes
,
accountingUnit
);
var
column
=
_service
.
QueryTableStructure
(
"view_second_print_management"
);
var
title
=
$"
{
allot
.
Year
}
年
{(
string
.
IsNullOrEmpty
(
allot
.
Name
)
?
$"
{
allot
.
Month
}
月"
:
allot
.
Name
)}
科主任/护士长管理绩效发放表"
;
return
new
{
title
,
body
,
column
};
}
/// <summary>
/// 获取一次次绩效结果
/// 获取一次次绩效结果
/// </summary>
/// </summary>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
...
...
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