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
9996b87d
Commit
9996b87d
authored
Nov 22, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载及个人绩效查询状态限制
parent
8dce0149
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
26 deletions
+12
-26
performance/Performance.Repository/PerforReportRepository .cs
+1
-1
performance/Performance.Services/DownloadService.cs
+11
-25
No files found.
performance/Performance.Repository/PerforReportRepository .cs
View file @
9996b87d
...
@@ -385,7 +385,7 @@ public List<EmployeeReservedDto> GetEmployeeReserved(int hospitalId, int year)
...
@@ -385,7 +385,7 @@ public List<EmployeeReservedDto> GetEmployeeReserved(int hospitalId, int year)
public
List
<
view_allot_result
>
GetOwnerPerformance
(
List
<
int
>
hospitalId
,
string
jobNumber
)
public
List
<
view_allot_result
>
GetOwnerPerformance
(
List
<
int
>
hospitalId
,
string
jobNumber
)
{
{
string
sql
=
"SELECT * FROM view_allot_result WHERE HospitalID IN @HospitalID AND JobNumber=@JobNumber"
;
string
sql
=
"SELECT * FROM view_allot_result WHERE
States = 8 AND
HospitalID IN @HospitalID AND JobNumber=@JobNumber"
;
return
DapperQuery
<
view_allot_result
>(
sql
,
new
{
HospitalID
=
hospitalId
,
JobNumber
=
jobNumber
})?.
ToList
();
return
DapperQuery
<
view_allot_result
>(
sql
,
new
{
HospitalID
=
hospitalId
,
JobNumber
=
jobNumber
})?.
ToList
();
}
}
...
...
performance/Performance.Services/DownloadService.cs
View file @
9996b87d
...
@@ -194,17 +194,13 @@ public string AllComputerViewReport(int allotId, List<dynamic> dynamics, string
...
@@ -194,17 +194,13 @@ public string AllComputerViewReport(int allotId, List<dynamic> dynamics, string
using
(
ExcelPackage
package
=
new
ExcelPackage
(
fs
))
using
(
ExcelPackage
package
=
new
ExcelPackage
(
fs
))
{
{
var
worksheet
=
package
.
Workbook
.
Worksheets
.
Add
(
name
);
var
worksheet
=
package
.
Workbook
.
Worksheets
.
Add
(
name
);
worksheet
.
View
.
FreezePanes
(
2
,
1
);
if
(
dynamics
!=
null
&&
dynamics
.
Count
()
>
0
)
if
(
dynamics
!=
null
&&
dynamics
.
Count
()
>
0
)
{
{
var
headers
=
((
IDictionary
<
string
,
object
>)
dynamics
.
ElementAt
(
0
)).
Keys
;
var
headers
=
((
IDictionary
<
string
,
object
>)
dynamics
.
ElementAt
(
0
)).
Keys
;
for
(
int
col
=
0
;
col
<
headList
.
Count
;
col
++)
for
(
int
col
=
0
;
col
<
headList
.
Count
;
col
++)
{
{
worksheet
.
SetValue
(
1
,
col
+
1
,
headList
[
col
].
Alias
);
worksheet
.
SetValue
(
1
,
col
+
1
,
headList
[
col
].
Alias
);
worksheet
.
Cells
[
1
,
col
+
1
].
Style
.
Border
.
Bottom
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
1
,
col
+
1
].
Style
.
Border
.
Top
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
1
,
col
+
1
].
Style
.
Border
.
Right
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
1
,
col
+
1
].
Style
.
Border
.
Left
.
Style
=
ExcelBorderStyle
.
Thin
;
}
}
for
(
int
col
=
0
;
col
<
headList
.
Count
;
col
++)
for
(
int
col
=
0
;
col
<
headList
.
Count
;
col
++)
...
@@ -216,33 +212,23 @@ public string AllComputerViewReport(int allotId, List<dynamic> dynamics, string
...
@@ -216,33 +212,23 @@ public string AllComputerViewReport(int allotId, List<dynamic> dynamics, string
var
value
=
temp
[
headList
[
col
].
Name
];
var
value
=
temp
[
headList
[
col
].
Name
];
worksheet
.
Cells
[
row
+
2
,
col
+
1
].
Value
=
value
;
worksheet
.
Cells
[
row
+
2
,
col
+
1
].
Value
=
value
;
worksheet
.
Cells
[
row
+
2
,
col
+
1
].
Style
.
Numberformat
.
Format
=
"#,##0.00"
;
//这是保留两位小数
worksheet
.
Cells
[
row
+
2
,
col
+
1
].
Style
.
Border
.
Bottom
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
row
+
2
,
col
+
1
].
Style
.
Border
.
Top
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
row
+
2
,
col
+
1
].
Style
.
Border
.
Right
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
row
+
2
,
col
+
1
].
Style
.
Border
.
Left
.
Style
=
ExcelBorderStyle
.
Thin
;
}
}
if
(
col
==
0
)
if
(
col
==
0
)
{
worksheet
.
SetValue
(
dynamics
.
Count
()
+
2
,
col
+
1
,
"合计"
);
worksheet
.
SetValue
(
dynamics
.
Count
()
+
2
,
col
+
1
,
"合计"
);
worksheet
.
Cells
[
dynamics
.
Count
()
+
2
,
col
+
1
].
Style
.
Border
.
Bottom
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
dynamics
.
Count
()
+
2
,
col
+
1
].
Style
.
Border
.
Top
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
dynamics
.
Count
()
+
2
,
col
+
1
].
Style
.
Border
.
Right
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
dynamics
.
Count
()
+
2
,
col
+
1
].
Style
.
Border
.
Left
.
Style
=
ExcelBorderStyle
.
Thin
;
}
else
else
{
worksheet
.
Cells
[
dynamics
.
Count
()
+
2
,
col
+
1
].
Formula
=
string
.
Format
(
"SUM({0})"
,
new
ExcelAddress
(
2
,
col
+
1
,
dynamics
.
Count
()
+
1
,
col
+
1
).
Address
);
string
address
=
new
ExcelAddress
(
2
,
col
+
1
,
dynamics
.
Count
()
+
1
,
col
+
1
).
Address
;
worksheet
.
Cells
[
dynamics
.
Count
()
+
2
,
col
+
1
].
Formula
=
string
.
Format
(
"SUM({0})"
,
address
);
worksheet
.
Cells
[
dynamics
.
Count
()
+
2
,
col
+
1
].
Style
.
Numberformat
.
Format
=
"#,##0.00"
;
//这是保留两位小数
worksheet
.
Cells
[
dynamics
.
Count
()
+
2
,
col
+
1
].
Style
.
Border
.
Bottom
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
dynamics
.
Count
()
+
2
,
col
+
1
].
Style
.
Border
.
Top
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
dynamics
.
Count
()
+
2
,
col
+
1
].
Style
.
Border
.
Right
.
Style
=
ExcelBorderStyle
.
Thin
;
worksheet
.
Cells
[
dynamics
.
Count
()
+
2
,
col
+
1
].
Style
.
Border
.
Left
.
Style
=
ExcelBorderStyle
.
Thin
;
}
}
}
}
}
worksheet
.
View
.
FreezePanes
(
2
,
1
);
for
(
int
row
=
worksheet
.
Dimension
.
Start
.
Row
;
row
<=
worksheet
.
Dimension
.
End
.
Row
;
row
++)
{
for
(
int
col
=
worksheet
.
Dimension
.
Start
.
Column
;
col
<=
worksheet
.
Dimension
.
End
.
Column
;
col
++)
{
worksheet
.
Cells
[
row
,
col
].
Style
.
Border
.
BorderAround
(
ExcelBorderStyle
.
Thin
);
worksheet
.
Cells
[
row
,
col
].
Style
.
Numberformat
.
Format
=
"#,##0.00"
;
}
}
package
.
Save
();
package
.
Save
();
}
}
return
filepath
;
return
filepath
;
...
...
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