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
af16f4d2
Commit
af16f4d2
authored
Apr 12, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效校验结果修改
parent
15893460
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
10 deletions
+40
-10
performance/Performance.DtoModels/Response/CheckLogResponse.cs
+12
-0
performance/Performance.EntityModels/Entity/im_employee.cs
+1
-1
performance/Performance.EntityModels/Entity/log_check.cs
+5
-0
performance/Performance.Services/AllotCompute/CheckDataService.cs
+6
-6
performance/Performance.Services/AllotService.cs
+16
-3
No files found.
performance/Performance.DtoModels/Response/CheckLogResponse.cs
0 → 100644
View file @
af16f4d2
using
Performance.EntityModels
;
using
System.Collections.Generic
;
namespace
Performance.DtoModels
{
public
class
CheckLogResponse
{
public
string
Level
{
get
;
set
;
}
public
List
<
log_check
>
Row
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/im_employee.cs
View file @
af16f4d2
...
...
@@ -30,7 +30,7 @@ public class im_employee
/// sheet页id
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
...
...
performance/Performance.EntityModels/Entity/log_check.cs
View file @
af16f4d2
...
...
@@ -37,6 +37,11 @@ public class log_check
public
Nullable
<
int
>
Type
{
get
;
set
;
}
/// <summary>
/// 1、信息(info)2、警告(warn)3、错误(error)
/// </summary>
public
Nullable
<
int
>
Level
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
Titile
{
get
;
set
;
}
...
...
performance/Performance.Services/AllotCompute/CheckDataService.cs
View file @
af16f4d2
...
...
@@ -35,8 +35,7 @@ internal bool Check(PerExcel excel, per_allot allot)
//匹配绩效参考标准
//空行数据警告
if
(!
CheckData
(
excel
,
allot
))
result
=
false
;
CheckData
(
excel
,
allot
);
//科室收入项 总费用相等 校验(暂不处理)
...
...
@@ -63,7 +62,7 @@ public PerExcel Classify(PerExcel excel, per_allot allot)
{
message
=
$"
{
sheet
.
SheetName
}
-- 未识别,请检测sheet页名称是否正确;"
;
}
InsertLog
(
allot
.
ID
,
(
int
)
sheetType
,
"sheet页名称分类"
,
message
);
InsertLog
(
allot
.
ID
,
(
int
)
sheetType
,
1
,
"sheet页名称分类"
,
message
);
}
return
excel
;
}
...
...
@@ -129,7 +128,7 @@ public bool Discern(PerExcel excel, per_allot allot)
if
(!
flag
)
result
=
false
;
}
InsertLog
(
allot
.
ID
,
(
int
)
sheet
.
SheetType
,
"列头识别"
,
message
);
InsertLog
(
allot
.
ID
,
(
int
)
sheet
.
SheetType
,
3
,
"列头识别"
,
message
);
}
return
result
;
}
...
...
@@ -229,7 +228,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
,
"空行数据警告"
,
message
.
ToString
());
InsertLog
(
allot
.
ID
,
(
int
)
sheet
.
SheetType
,
2
,
"空行数据警告"
,
message
.
ToString
());
}
return
result
;
}
...
...
@@ -243,13 +242,14 @@ public bool CheckData(PerExcel excel, per_allot allot)
/// <param name="type">1、通过验证,2、验证失败</param>
/// <param name="title"></param>
/// <param name="message">描述</param>
public
void
InsertLog
(
int
allotId
,
int
type
,
string
title
,
string
message
)
public
void
InsertLog
(
int
allotId
,
int
type
,
int
level
,
string
title
,
string
message
)
{
log_check
model
=
new
log_check
()
{
AllotID
=
allotId
,
CreateTime
=
DateTime
.
Now
,
Type
=
type
,
Level
=
level
,
Titile
=
title
,
Message
=
message
};
...
...
performance/Performance.Services/AllotService.cs
View file @
af16f4d2
...
...
@@ -284,12 +284,25 @@ public List<AgainAllotResponse> GetAgainAllotNotSucceed(per_allot allot)
/// </summary>
/// <param name="allot"></param>
/// <returns></returns>
public
List
<
log_check
>
AllotCheckResult
(
per_allot
allot
)
public
List
<
CheckLogResponse
>
AllotCheckResult
(
per_allot
allot
)
{
List
<
CheckLogResponse
>
result
=
new
List
<
CheckLogResponse
>();
var
list
=
perforLogcheckRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
list
!=
null
)
list
=
list
.
OrderBy
(
t
=>
t
.
Titile
).
ThenBy
(
t
=>
t
.
ID
).
ToList
();
return
list
;
{
//list = list.OrderBy(t => t.Type).ThenBy(t => t.ID).ToList();
Dictionary
<
int
,
string
>
keyValues
=
new
Dictionary
<
int
,
string
>
{
{
1
,
"info"
},
{
2
,
"warn"
},
{
3
,
"error"
}
};
foreach
(
var
item
in
keyValues
)
{
CheckLogResponse
data
=
new
CheckLogResponse
{
Level
=
item
.
Value
,
Row
=
list
.
Where
(
t
=>
t
.
Level
==
item
.
Key
).
OrderBy
(
t
=>
t
.
Type
).
ThenBy
(
t
=>
t
.
ID
).
ToList
()
};
result
.
Add
(
data
);
}
}
return
result
;
}
}
}
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