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
09d9cd4f
Commit
09d9cd4f
authored
Dec 21, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效结果打印(新版)
parent
d3f4eebe
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
0 deletions
+84
-0
performance/Performance.Api/Controllers/SecondAllotController.cs
+12
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+6
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+10
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+5
-0
performance/Performance.Services/DapperService.cs
+32
-0
performance/Performance.Services/SecondAllotService.cs
+19
-0
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
09d9cd4f
...
...
@@ -503,6 +503,18 @@ public ApiResponse SecondPrint(int secondid)
}
/// <summary>
/// 二次绩效结果打印(新版)
/// </summary>
/// <returns></returns>
[
Route
(
"api/second/newprint/{secondid}"
)]
[
HttpPost
]
public
ApiResponse
SecondNewPrint
(
int
secondid
)
{
var
result
=
secondAllotService
.
NewPrint
(
secondid
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
/// <summary>
/// 科主任/护士长绩效发布
/// </summary>
/// <returns></returns>
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
09d9cd4f
...
...
@@ -2309,6 +2309,12 @@
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.SecondNewPrint(System.Int32)"
>
<summary>
二次绩效结果打印(新版)
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.DeptComputeDetail(System.Int32)"
>
<summary>
科主任/护士长绩效发布
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
09d9cd4f
...
...
@@ -2657,6 +2657,11 @@
绩效发放月
</summary>
</member>
<member
name=
"P:Performance.DtoModels.AllotResponse.Name"
>
<summary>
绩效别名
</summary>
</member>
<member
name=
"P:Performance.DtoModels.AllotResponse.AllotFee"
>
<summary>
绩效发放总金额
...
...
@@ -3952,6 +3957,11 @@
行政后勤是否显示管理绩效按钮 1 是 2 否
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondListResponse.Name"
>
<summary>
绩效别名
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondPerforResponse.Efficiency"
>
<summary>
效率绩效
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
09d9cd4f
...
...
@@ -5938,6 +5938,11 @@
绩效发放月
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_allot.Name"
>
<summary>
绩效别名
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_allot.AllotFee"
>
<summary>
绩效发放总金额
...
...
performance/Performance.Services/DapperService.cs
View file @
09d9cd4f
using
Dapper
;
using
MassTransit
;
using
Microsoft.Extensions.Options
;
using
MySql.Data.MySqlClient
;
using
Performance.DtoModels
;
...
...
@@ -270,5 +271,36 @@ public Task RestoreSecondAllotAsync()
}
});
}
public
IEnumerable
<
dynamic
>
QuerySecondPrintHead
(
int
allotId
,
string
unitType
,
string
accountingUnit
)
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
string
sql
=
$@"select * from view_second_print_header where AllotId = @allotId AND UnitType = @UnitType AND AccountingUnit = @AccountingUnit"
;
return
connection
.
Query
(
sql
,
new
{
allotId
,
unitType
=
unitType
.
Replace
(
"行政后勤"
,
"行政工勤"
),
accountingUnit
},
commandTimeout
:
60
*
60
);
}
}
public
IEnumerable
<
dynamic
>
QuerySecondPrintRow
(
int
allotId
,
string
unitType
,
string
accountingUnit
)
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
string
sql
=
$@"select * from view_second_print_row where AllotId = @allotId AND UnitType = @UnitType AND AccountingUnit = @AccountingUnit"
;
return
connection
.
Query
(
sql
,
new
{
allotId
,
unitType
=
unitType
.
Replace
(
"行政后勤"
,
"行政工勤"
),
accountingUnit
},
commandTimeout
:
60
*
60
);
}
}
public
IEnumerable
<
dynamic
>
QueryTableStructure
(
string
tableName
)
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
string
sql
=
$@"select column_name,ordinal_position from information_schema.`columns` where table_schema= database() and table_name = @tableName"
;
return
connection
.
Query
(
sql
,
new
{
tableName
},
commandTimeout
:
60
*
60
);
}
}
}
}
performance/Performance.Services/SecondAllotService.cs
View file @
09d9cd4f
...
...
@@ -2385,6 +2385,25 @@ public dynamic Print(int secondId)
return
new
{
header
,
body
=
result
/*.OrderBy(t => t.JobNumber).ThenBy(t => t.PersonName).ToList()*/
};
}
public
dynamic
NewPrint
(
int
secondId
)
{
var
second
=
agsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
if
(
second
==
null
)
return
new
List
<
SecPrintResponse
>();
var
status
=
new
int
[]
{
(
int
)
SecondAllotStatus
.
WaitReview
,
(
int
)
SecondAllotStatus
.
PassAudit
};
if
(!
second
.
Status
.
HasValue
||
!
status
.
Contains
(
second
.
Status
.
Value
))
throw
new
PerformanceException
(
"当前科室分配结果未提交,无法打印!"
);
var
allotId
=
second
.
AllotId
??
0
;
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
allotId
);
var
header
=
_service
.
QuerySecondPrintHead
(
allotId
,
second
.
UnitType
,
second
.
Department
);
var
body
=
_service
.
QuerySecondPrintRow
(
allotId
,
second
.
UnitType
,
second
.
Department
);
var
column
=
_service
.
QueryTableStructure
(
"view_second_print_row"
);
var
title
=
$"
{
allot
.
Year
}
年
{(
string
.
IsNullOrEmpty
(
allot
.
Name
)
?
$"
{
allot
.
Month
}
月"
:
allot
.
Name
)}{
second
.
Department
}{
second
.
UnitType
}
绩效分配表"
;
return
new
{
title
,
body
,
header
,
column
};
}
#
endregion
打印
public
List
<
DeptDataDetails
>
DeptComputeDetailList
(
int
userId
,
int
allotId
,
out
int
isShowManage
)
...
...
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