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
96f358ea
Commit
96f358ea
authored
May 14, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://192.168.0.110:8880/zry/performance
into develop
parents
6319b7a5
64628b3b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
12 deletions
+41
-12
performance/Performance.DtoModels/PerExcel/ComputeResult.cs
+10
-0
performance/Performance.EntityModels/Entity/log_check.cs
+5
-0
performance/Performance.Services/AllotCompute/CheckDataService.cs
+12
-7
performance/Performance.Services/AllotCompute/ImportDataService.cs
+1
-0
performance/Performance.Services/ExtractService.cs
+3
-2
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+10
-3
No files found.
performance/Performance.DtoModels/PerExcel/ComputeResult.cs
View file @
96f358ea
...
...
@@ -119,5 +119,15 @@ public class ComputeResult
/// 职称
/// </summary>
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 调节系数
/// </summary>
public
decimal
?
Adjust
{
get
;
set
;
}
/// <summary>
/// 工作量绩效
/// </summary>
public
decimal
?
Workload
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/log_check.cs
View file @
96f358ea
...
...
@@ -50,5 +50,10 @@ public class log_check
///
/// </summary>
public
string
Message
{
get
;
set
;
}
/// <summary>
/// 检验结果是否正确
/// </summary>
public
Nullable
<
int
>
IsTrue
{
get
;
set
;
}
}
}
performance/Performance.Services/AllotCompute/CheckDataService.cs
View file @
96f358ea
...
...
@@ -55,14 +55,16 @@ public PerExcel Classify(PerExcel excel, per_allot allot)
foreach
(
var
sheet
in
perSheet
)
{
string
message
;
bool
flag
=
true
;
SheetType
sheetType
=
perSheetService
.
GetSheetType
(
sheet
.
SheetName
);
if
(
sheetType
!=
SheetType
.
Unidentifiable
)
message
=
$"
{
sheet
.
SheetName
}
-- 已成功分类,类别为:
{
EnumHelper
.
GetDescription
(
sheetType
)}
;"
;
else
{
flag
=
false
;
message
=
$"
{
sheet
.
SheetName
}
-- 未识别,请检测sheet页名称是否正确;"
;
}
InsertLog
(
allot
.
ID
,
(
int
)
sheetType
,
1
,
"sheet页名称分类"
,
message
);
InsertLog
(
allot
.
ID
,
(
int
)
sheetType
,
1
,
"sheet页名称分类"
,
message
,
flag
);
}
return
excel
;
}
...
...
@@ -128,7 +130,7 @@ public bool Discern(PerExcel excel, per_allot allot)
if
(!
flag
)
result
=
false
;
}
InsertLog
(
allot
.
ID
,
(
int
)
sheet
.
SheetType
,
3
,
"列头识别"
,
message
);
InsertLog
(
allot
.
ID
,
(
int
)
sheet
.
SheetType
,
3
,
"列头识别"
,
message
,
flag
);
}
return
result
;
}
...
...
@@ -228,7 +230,7 @@ public bool CheckData(PerExcel excel, per_allot allot)
result
=
false
;
message
=
$"
{
sheet
.
SheetName
}
-- 有
{
count
}
行数据不合规范,行号是
{
String
.
Join
(
"、"
,
rowNumber
.
ToArray
())}
;"
;
}
InsertLog
(
allot
.
ID
,
(
int
)
sheet
.
SheetType
,
2
,
"空行数据警告"
,
message
.
ToString
());
InsertLog
(
allot
.
ID
,
(
int
)
sheet
.
SheetType
,
2
,
"空行数据警告"
,
message
.
ToString
()
,
flag
);
}
return
result
;
}
...
...
@@ -238,11 +240,13 @@ public bool CheckData(PerExcel excel, per_allot allot)
/// <summary>
/// 向log_check表中添加记录
/// </summary>
/// <param name="allotId">绩效id</param>
/// <param name="type">1、通过验证,2、验证失败</param>
/// <param name="allotId"></param>
/// <param name="type">sheet_type</param>
/// <param name="level">错误等级</param>
/// <param name="title"></param>
/// <param name="message">描述</param>
public
void
InsertLog
(
int
allotId
,
int
type
,
int
level
,
string
title
,
string
message
)
/// <param name="istrue">校验结果</param>
public
void
InsertLog
(
int
allotId
,
int
type
,
int
level
,
string
title
,
string
message
,
bool
istrue
)
{
log_check
model
=
new
log_check
()
{
...
...
@@ -251,7 +255,8 @@ public void InsertLog(int allotId, int type, int level, string title, string mes
Type
=
type
,
Level
=
level
,
Titile
=
title
,
Message
=
message
Message
=
message
,
IsTrue
=
istrue
?
1
:
0
};
perforLogcheckRepository
.
Add
(
model
);
}
...
...
performance/Performance.Services/AllotCompute/ImportDataService.cs
View file @
96f358ea
...
...
@@ -130,6 +130,7 @@ private void SaveEmployee(PerSheet sheet, int allotId)
var
imdata
=
Mapper
.
Map
<
im_employee
>(
data
);
imdata
.
SheetID
=
imsheet
.
ID
;
imdata
.
AllotID
=
allotId
;
imdata
.
OtherPerfor
=
data
.
OthePerfor
;
addList
.
Add
(
imdata
);
}
perforImEmployeeRepository
.
AddRange
(
addList
.
ToArray
());
...
...
performance/Performance.Services/ExtractService.cs
View file @
96f358ea
...
...
@@ -63,7 +63,7 @@ public string ExtractData(int hospitalId)
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
var
configList
=
perforHospitalconfigRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
var
first
=
perforPerfirstRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
hospitalId
);
var
first
List
=
perforPerfirstRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
if
(
configList
==
null
||
!
configList
.
Any
())
throw
new
PerformanceException
(
$"暂不支持自动提取绩效数据"
);
...
...
@@ -71,8 +71,9 @@ public string ExtractData(int hospitalId)
var
hospitalConfig
=
configList
.
First
();
string
originalPath
=
""
;
//判断是否是首次
if
((
allotList
==
null
||
!
allotList
.
Any
())
&&
first
!=
null
)
if
((
allotList
==
null
||
!
allotList
.
Any
())
&&
first
List
!=
null
)
{
var
first
=
firstList
.
OrderByDescending
(
t
=>
t
.
CreateDate
).
FirstOrDefault
();
//首次 从excel中获取人员信息,SHEET页信息,列头信息
sheetList
=
GetFileData
(
first
.
Path
);
originalPath
=
first
.
Path
;
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
96f358ea
...
...
@@ -60,7 +60,9 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<Comp
Grant
=
item
.
Grant
,
ScoreAverageRate
=
item
.
ScoreAverageRate
,
Punishment
=
item
.
Punishment
,
OtherPerfor
=
item
.
OtherPerfor
OtherPerfor
=
item
.
OtherPerfor
,
Adjust
=
item
.
Adjust
,
Workload
=
item
.
Workload
};
//应发管理绩效
compute
.
ShouldGiveFee
=
(
efficiency
?.
Value
*
resAccount
?.
Avg
+
scale
?.
Value
*
resAccount
?.
PerforTotal
)
*
item
.
Grant
;
...
...
@@ -156,7 +158,11 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<res_
Attendance
=
item
.
Attendance
,
ScoreAverageRate
=
item
.
ScoreAverageRate
,
Punishment
=
item
.
Punishment
,
OtherPerfor
=
item
.
OtherPerfor
OtherPerfor
=
item
.
OtherPerfor
,
JobTitle
=
item
.
JobTitle
,
Adjust
=
item
.
Adjust
,
Workload
=
item
.
Workload
};
//年资系数
if
(
yearTypes
.
Contains
(
type
)
&&
item
.
WorkTime
.
HasValue
&&
item
.
WorkTime
.
Value
>
new
DateTime
(
1970
,
1
,
1
))
...
...
@@ -168,7 +174,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<res_
//应发绩效
compute
.
GiveFee
=
baiscnorm
*
compute
.
PostCoefficient
*
compute
.
Attendance
*
compute
.
ScoreAverageRate
*
(
compute
.
WorkYear
??
1
)
+
(
compute
.
OtherPerfor
??
0
)
+
(
item
.
Workload
??
0
)
+
(
compute
.
Punishment
??
0
);
//实发绩效
compute
.
RealGiveFee
=
compute
.
GiveFee
*
item
.
Adjust
*
item
.
Grant
;
var
adjust
=
item
.
Adjust
??
1
m
;
compute
.
RealGiveFee
=
compute
.
GiveFee
*
adjust
*
item
.
Grant
;
computeList
.
Add
(
compute
);
}
}
...
...
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