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
bfbab080
Commit
bfbab080
authored
Jun 01, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
原始数据返回
parent
81ded827
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
119 additions
and
31 deletions
+119
-31
performance/Performance.Api/Controllers/OriginalController.cs
+64
-0
performance/Performance.DtoModels/Request/OriginalRequest.cs
+13
-0
performance/Performance.DtoModels/Response/SheetExportResponse.cs
+4
-1
performance/Performance.Services/SheetSevice.cs
+38
-30
No files found.
performance/Performance.Api/Controllers/OriginalController.cs
0 → 100644
View file @
bfbab080
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Microsoft.AspNetCore.Mvc
;
using
Performance.DtoModels
;
namespace
Performance.Api.Controllers
{
/// <summary>
/// 原始数据修改
/// </summary>
[
Route
(
"api/[controller]"
)]
[
ApiController
]
public
class
OriginalController
:
Controller
{
/// <summary>
/// 修改数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
""
)]
[
HttpPost
]
public
ApiResponse
EmployeeEdit
([
FromBody
]
OriginalRequest
request
)
{
return
new
ApiResponse
(
ResponseType
.
OK
);
}
[
Route
(
""
)]
[
HttpPost
]
public
ApiResponse
ClinicEdit
()
{
return
new
ApiResponse
(
ResponseType
.
OK
);
}
[
Route
(
""
)]
[
HttpPost
]
public
ApiResponse
ImDataEdit
()
{
return
new
ApiResponse
(
ResponseType
.
OK
);
}
[
Route
(
""
)]
[
HttpPost
]
public
ApiResponse
AccontEdit
()
{
return
new
ApiResponse
(
ResponseType
.
OK
);
}
[
Route
(
""
)]
[
HttpPost
]
public
ApiResponse
SpecialEdit
()
{
return
new
ApiResponse
(
ResponseType
.
OK
);
}
[
Route
(
""
)]
[
HttpPost
]
public
ApiResponse
HeaderEdit
()
{
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
}
performance/Performance.DtoModels/Request/OriginalRequest.cs
0 → 100644
View file @
bfbab080
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
OriginalRequest
{
public
int
SheetId
{
get
;
set
;
}
public
List
<
Cell
>
Cells
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/Response/SheetExportResponse.cs
View file @
bfbab080
...
...
@@ -93,8 +93,10 @@ public object CellValue
/// </summary>
public
string
Annotation
{
get
;
set
;
}
public
int
Id
{
get
;
set
;
}
public
Cell
()
{
}
public
Cell
(
int
pointCell
,
object
cellValue
,
int
mergeRow
,
int
mergeCell
,
bool
isTotal
,
bool
isNumValue
,
string
annotation
=
""
)
public
Cell
(
int
pointCell
,
object
cellValue
,
int
mergeRow
,
int
mergeCell
,
bool
isTotal
,
bool
isNumValue
,
string
annotation
=
""
,
int
id
=
0
)
{
PointCell
=
pointCell
;
CellValue
=
cellValue
;
...
...
@@ -103,6 +105,7 @@ public Cell(int pointCell, object cellValue, int mergeRow, int mergeCell, bool i
IsTotal
=
isTotal
;
IsNumValue
=
isNumValue
;
Annotation
=
annotation
;
Id
=
id
;
}
}
}
performance/Performance.Services/SheetSevice.cs
View file @
bfbab080
...
...
@@ -109,6 +109,9 @@ public SheetExportResponse SheetExport(int sheetID)
CommonExport
(
sheetID
,
response
);
}
if
(
response
.
Header
!=
null
&&
response
.
Header
.
Any
())
response
.
Header
=
response
.
Header
.
OrderBy
(
t
=>
t
.
Rownumber
).
ToList
();
return
response
;
}
...
...
@@ -491,22 +494,22 @@ private void EmployeeExport(int sheetID, SheetExportResponse response)
var
item
=
employeeList
.
ElementAt
(
i
);
var
workTime
=
item
.
WorkTime
!=
null
?
((
DateTime
)
item
.
WorkTime
).
ToString
(
"yyyy-MM-dd"
)
:
""
;
var
rowbody
=
new
Row
(
i
);
rowbody
.
Data
.
Add
(
new
Cell
(
1
,
item
.
AccountType
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
2
,
item
.
AccountingUnit
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
3
,
item
.
PersonnelNumber
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
4
,
item
.
DoctorName
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
5
,
item
.
JobTitle
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
6
,
item
.
FitPeople
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
7
,
item
.
PostCoefficient
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
8
,
workTime
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
9
,
Math
.
Round
(
item
.
ScoreAverageRate
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
10
,
Math
.
Round
(
item
.
Attendance
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
11
,
item
.
PeopleNumber
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
12
,
item
.
Workload
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
13
,
item
.
OtherPerfor
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
14
,
item
.
Punishment
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
15
,
Math
.
Round
(
item
.
Adjust
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
16
,
item
.
Grant
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
1
,
item
.
AccountType
,
1
,
1
,
false
,
false
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
2
,
item
.
AccountingUnit
,
1
,
1
,
false
,
false
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
3
,
item
.
PersonnelNumber
,
1
,
1
,
false
,
false
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
4
,
item
.
DoctorName
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
5
,
item
.
JobTitle
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
6
,
item
.
FitPeople
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
7
,
item
.
PostCoefficient
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
8
,
workTime
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
9
,
Math
.
Round
(
item
.
ScoreAverageRate
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
10
,
Math
.
Round
(
item
.
Attendance
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
11
,
item
.
PeopleNumber
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
12
,
item
.
Workload
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
13
,
item
.
OtherPerfor
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
14
,
item
.
Punishment
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
15
,
Math
.
Round
(
item
.
Adjust
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
16
,
item
.
Grant
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
response
.
Row
.
Add
(
rowbody
);
}
}
...
...
@@ -520,6 +523,11 @@ private void ClinicEmployeeExport(int sheetID, SheetExportResponse response)
if
(
clinicemployeeList
!=
null
&&
clinicemployeeList
.
Count
()
>
0
)
{
List
<(
string
,
Func
<
im_employee_clinic
>,
int
,
int
,
bool
,
bool
)>
pairs
=
new
List
<(
string
,
Func
<
im_employee_clinic
>,
int
,
int
,
bool
,
bool
)>
{
};
var
row
=
new
Row
(
0
);
row
.
Data
.
Add
(
new
Cell
(
1
,
"核算单元分类"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
2
,
"核算单元"
,
1
,
1
,
false
,
false
));
...
...
@@ -546,21 +554,21 @@ private void ClinicEmployeeExport(int sheetID, SheetExportResponse response)
var
item
=
clinicemployeeList
.
ElementAt
(
i
);
//var workTime = item.WorkTime != null ? ((DateTime)item.WorkTime).ToString("yyyy-MM-dd") : "";
var
rowbody
=
new
Row
(
i
);
rowbody
.
Data
.
Add
(
new
Cell
(
1
,
item
.
UnitType
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
2
,
item
.
AccountingUnit
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
3
,
item
.
PersonnelNumber
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
4
,
item
.
DoctorName
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
5
,
item
.
JobTitle
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
1
,
item
.
UnitType
,
1
,
1
,
false
,
false
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
2
,
item
.
AccountingUnit
,
1
,
1
,
false
,
false
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
3
,
item
.
PersonnelNumber
,
1
,
1
,
false
,
false
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
4
,
item
.
DoctorName
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
5
,
item
.
JobTitle
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
//rowbody.Data.Add(new Cell(6, item.FitPeople, 1, 1, false, true));
rowbody
.
Data
.
Add
(
new
Cell
(
6
,
item
.
PostCoefficient
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
7
,
Math
.
Round
(
item
.
Efficiency
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
8
,
Math
.
Round
(
item
.
Scale
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
9
,
Math
.
Round
(
item
.
Management
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
10
,
Math
.
Round
(
item
.
ScoreAverageRate
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
11
,
Math
.
Round
(
item
.
Attendance
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
12
,
item
.
OtherPerfor
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
13
,
item
.
Punishment
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
14
,
Math
.
Round
(
item
.
Adjust
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
6
,
item
.
PostCoefficient
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
7
,
Math
.
Round
(
item
.
Efficiency
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
8
,
Math
.
Round
(
item
.
Scale
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
9
,
Math
.
Round
(
item
.
Management
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
10
,
Math
.
Round
(
item
.
ScoreAverageRate
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
11
,
Math
.
Round
(
item
.
Attendance
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
12
,
item
.
OtherPerfor
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
13
,
item
.
Punishment
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
rowbody
.
Data
.
Add
(
new
Cell
(
14
,
Math
.
Round
(
item
.
Adjust
.
Value
*
100
,
2
)
+
"%"
,
1
,
1
,
false
,
true
,
id
:
item
.
ID
));
//rowbody.Data.Add(new Cell(16, item.Grant, 1, 1, false, true));
response
.
Row
.
Add
(
rowbody
);
}
...
...
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