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
1d47df2a
Commit
1d47df2a
authored
Jun 01, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
返回数据增加id
parent
fe31cb71
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
122 additions
and
33 deletions
+122
-33
performance/Performance.Api/Controllers/OriginalController.cs
+9
-33
performance/Performance.DtoModels/PerExcel/PerSheetHeader.cs
+32
-0
performance/Performance.Services/OriginalService.cs
+81
-0
performance/Performance.Services/SheetSevice.cs
+0
-0
No files found.
performance/Performance.Api/Controllers/OriginalController.cs
View file @
1d47df2a
...
...
@@ -15,48 +15,24 @@ namespace Performance.Api.Controllers
public
class
OriginalController
:
Controller
{
/// <summary>
/// 修改数据
/// 修改
header
数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
""
)]
[
Route
(
"
header
"
)]
[
HttpPost
]
public
ApiResponse
Employee
Edit
([
FromBody
]
OriginalRequest
request
)
public
ApiResponse
Header
Edit
([
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
(
""
)]
/// <summary>
/// 修改sheet数据
/// </summary>
/// <returns></returns>
[
Route
(
"sheet"
)]
[
HttpPost
]
public
ApiResponse
HeaderEdit
(
)
public
ApiResponse
SheetEdit
([
FromBody
]
OriginalRequest
request
)
{
return
new
ApiResponse
(
ResponseType
.
OK
);
}
...
...
performance/Performance.DtoModels/PerExcel/PerSheetHeader.cs
0 → 100644
View file @
1d47df2a
using
Performance.EntityModels
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
PerSheetHeader
{
// Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有%
public
static
List
<(
string
,
Func
<
im_employee
,
object
>,
int
,
int
,
bool
,
bool
,
bool
)>
employeeHeaders
=
new
List
<(
string
,
Func
<
im_employee
,
object
>,
int
,
int
,
bool
,
bool
,
bool
)>
{
(
"核算单元类型"
,
(
t
)
=>
t
.
AccountType
,
1
,
1
,
false
,
false
,
false
),
(
"核算单元"
,
(
t
)
=>
t
.
AccountingUnit
,
1
,
1
,
false
,
false
,
false
),
(
"人员工号"
,
(
t
)
=>
t
.
PersonnelNumber
,
1
,
1
,
false
,
false
,
false
),
(
"医生姓名"
,
(
t
)
=>
t
.
DoctorName
,
1
,
1
,
false
,
false
,
false
),
(
"职称"
,
(
t
)
=>
t
.
JobTitle
,
1
,
1
,
false
,
true
,
false
),
(
"绩效基数核算参考对象"
,
(
t
)
=>
t
.
FitPeople
,
1
,
1
,
false
,
false
,
false
),
(
"岗位系数"
,
(
t
)
=>
t
.
PostCoefficient
,
1
,
1
,
false
,
true
,
false
),
(
"参加工作时间"
,
(
t
)
=>
t
.
WorkTime
,
1
,
1
,
false
,
false
,
false
),
(
"考核得分率"
,
(
t
)
=>
Math
.
Round
(
t
.
ScoreAverageRate
.
Value
*
100
,
2
)
,
1
,
1
,
false
,
true
,
true
),
(
"出勤率"
,
(
t
)
=>
Math
.
Round
(
t
.
Attendance
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
),
(
"核算单元医生数"
,
(
t
)
=>
t
.
PeopleNumber
,
1
,
1
,
false
,
true
,
false
),
(
"工作量绩效"
,
(
t
)
=>
t
.
Workload
,
1
,
1
,
false
,
true
,
false
),
(
"其他绩效"
,
(
t
)
=>
t
.
OtherPerfor
,
1
,
1
,
false
,
true
,
false
),
(
"医院奖罚"
,
(
t
)
=>
t
.
Punishment
,
1
,
1
,
false
,
true
,
false
),
(
"调节系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Adjust
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
),
(
"发放系数"
,
(
t
)
=>
t
.
Grant
,
1
,
1
,
false
,
true
,
false
),
};
}
}
performance/Performance.Services/OriginalService.cs
0 → 100644
View file @
1d47df2a
using
NPOI.HSSF.Record.Chart
;
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
Performance.Repository
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Performance.Services
{
public
class
OriginalService
:
IAutoInjection
{
private
readonly
PerforPersheetRepository
persheetRepository
;
private
readonly
PerforImheaderRepository
imheaderRepository
;
private
readonly
PerforImemployeeRepository
imemployeeRepository
;
private
readonly
PerforImemployeeclinicRepository
imemployeeclinicRepository
;
private
readonly
PerforImdataRepository
imdataRepository
;
private
readonly
PerforImspecialunitRepository
imspecialunitRepository
;
public
OriginalService
(
PerforPersheetRepository
persheetRepository
,
PerforImheaderRepository
imheaderRepository
,
PerforImemployeeRepository
imemployeeRepository
,
PerforImemployeeclinicRepository
imemployeeclinicRepository
,
PerforImdataRepository
imdataRepository
,
PerforImspecialunitRepository
imspecialunitRepository
)
{
this
.
persheetRepository
=
persheetRepository
;
this
.
imheaderRepository
=
imheaderRepository
;
this
.
imemployeeRepository
=
imemployeeRepository
;
this
.
imemployeeclinicRepository
=
imemployeeclinicRepository
;
this
.
imdataRepository
=
imdataRepository
;
this
.
imspecialunitRepository
=
imspecialunitRepository
;
}
public
bool
EditHeaderData
(
OriginalRequest
request
)
{
return
true
;
}
public
bool
EditSheetData
(
OriginalRequest
request
)
{
return
SheetCommonFactory
(
request
);
}
private
bool
SheetCommonFactory
(
OriginalRequest
request
)
{
var
sheet
=
persheetRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
SheetId
);
if
(
sheet
==
null
)
throw
new
PerformanceException
(
"参数sheetid无效"
);
switch
(
sheet
.
SheetType
)
{
case
(
int
)
SheetType
.
Employee
:
return
EditEmployee
(
request
);
case
(
int
)
SheetType
.
ClinicEmployee
:
return
true
;
case
(
int
)
SheetType
.
Workload
:
return
true
;
case
(
int
)
SheetType
.
AccountBasic
:
return
true
;
case
(
int
)
SheetType
.
SpecialUnit
:
return
true
;
case
(
int
)
SheetType
.
OtherIncome
:
case
(
int
)
SheetType
.
Income
:
case
(
int
)
SheetType
.
Expend
:
return
true
;
}
return
false
;
}
private
bool
EditEmployee
(
OriginalRequest
request
)
{
var
employees
=
imemployeeRepository
.
GetEntities
(
t
=>
request
.
Cells
.
Select
(
c
=>
c
.
Id
).
Contains
(
t
.
ID
));
if
(
employees
==
null
||
!
employees
.
Any
(
t
=>
t
.
SheetID
==
request
.
SheetId
))
throw
new
PerformanceException
(
"提交数据无效"
);
return
false
;
}
}
}
performance/Performance.Services/SheetSevice.cs
View file @
1d47df2a
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