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
51f34449
Commit
51f34449
authored
Sep 17, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
抽取新增字段configid,决定script的抽取配置
parent
8a3157ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
+27
-9
performance/Performance.EntityModels/Entity/ex_script.cs
+5
-0
performance/Performance.Services/DFExtractService.cs
+22
-9
No files found.
performance/Performance.EntityModels/Entity/ex_script.cs
View file @
51f34449
...
...
@@ -37,6 +37,11 @@ public class ex_script
public
int
TypeId
{
get
;
set
;
}
/// <summary>
/// 配置Id
/// </summary>
public
int
ConfigId
{
get
;
set
;
}
/// <summary>
/// 是否可用 1 可用 2 不可用
/// </summary>
public
int
IsEnable
{
get
;
set
;
}
...
...
performance/Performance.Services/DFExtractService.cs
View file @
51f34449
...
...
@@ -203,10 +203,14 @@ private List<ex_result> ExtractIncome<TEntity>(List<TEntity> entities, List<ex_s
ratio
+=
15
m
/
incomemodules
.
Count
();
logManage
.
ReturnTheLog
(
Allot
.
ID
,
GroupName
,
3
,
""
,
ratio
>
20
?
20
:
ratio
);
logManage
.
ReturnTheLog
(
Allot
.
ID
,
GroupName
,
2
,
"提取数据"
,
$"开始提取模块“
{
module
.
ModuleName
}
”的数据"
);
foreach
(
var
config
in
configs
)
var
items
=
scripts
.
Where
(
t
=>
t
.
TypeId
==
module
.
TypeId
);
if
(
items
!=
null
&&
items
.
Any
())
{
var
item
=
scripts
.
FirstOrDefault
(
t
=>
t
.
TypeId
==
module
.
TypeId
&&
t
.
DatabaseType
==
config
.
DataBaseType
);
if
(
item
==
null
)
continue
;
foreach
(
var
item
in
items
)
{
var
config
=
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
item
.
ConfigId
);
if
(
config
==
null
)
continue
;
var
querydata
=
QueryData
(
config
,
allot
,
item
.
ExecScript
,
module
.
ModuleName
);
if
(
querydata
!=
null
&&
querydata
.
Any
())
{
...
...
@@ -214,6 +218,7 @@ private List<ex_result> ExtractIncome<TEntity>(List<TEntity> entities, List<ex_s
data
.
AddRange
(
querydata
);
}
}
}
logManage
.
ReturnTheLog
(
Allot
.
ID
,
GroupName
,
2
,
"提取数据"
,
$"模块“
{
module
.
ModuleName
}
”的数据已完成提取"
);
}
...
...
@@ -249,10 +254,13 @@ private List<ex_result> ExtractItems<TEntity>(List<TEntity> entities, List<ex_sc
logManage
.
ReturnTheLog
(
Allot
.
ID
,
GroupName
,
3
,
""
,
ratio
>
50
?
50
:
ratio
);
logManage
.
ReturnTheLog
(
Allot
.
ID
,
GroupName
,
2
,
"提取数据"
,
$"开始提取项目“
{
exitem
.
ItemName
}
”的数据"
);
var
module
=
modules
.
FirstOrDefault
(
t
=>
t
.
Id
==
exitem
.
ModuleId
);
foreach
(
var
config
in
configs
)
var
scritems
=
scripts
.
Where
(
t
=>
t
.
TypeId
==
exitem
.
TypeId
);
if
(
scritems
!=
null
&&
scritems
.
Any
())
{
foreach
(
var
item
in
scritems
)
{
var
item
=
scripts
.
FirstOrDefault
(
t
=>
t
.
TypeId
==
exitem
.
TypeId
&&
t
.
DatabaseType
==
config
.
DataBaseType
);
if
(
item
==
null
)
continue
;
var
config
=
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
item
.
ConfigId
);
if
(
config
==
null
)
continue
;
var
result
=
QueryData
(
config
,
allot
,
item
.
ExecScript
,
module
.
ModuleName
);
if
(
result
!=
null
&&
result
.
Any
())
...
...
@@ -266,6 +274,7 @@ private List<ex_result> ExtractItems<TEntity>(List<TEntity> entities, List<ex_sc
data
.
AddRange
(
result
);
}
}
}
logManage
.
ReturnTheLog
(
Allot
.
ID
,
GroupName
,
2
,
"提取数据"
,
$"项目“
{
exitem
.
ItemName
}
”的数据已完成提取"
);
}
...
...
@@ -299,10 +308,13 @@ private List<ex_result> ExtractSpcial<TEntity>(List<TEntity> entities, List<ex_s
ratio
+=
10
m
/
specials
.
Where
(
t
=>
t
.
TypeId
>
0
).
Count
();
logManage
.
ReturnTheLog
(
Allot
.
ID
,
GroupName
,
3
,
""
,
ratio
>
60
?
60
:
ratio
);
logManage
.
ReturnTheLog
(
Allot
.
ID
,
GroupName
,
2
,
"提取数据"
,
$"开始提取特殊核算项“
{
special
.
Target
}
”的数据"
);
foreach
(
var
config
in
configs
)
var
scritems
=
scripts
.
Where
(
t
=>
t
.
TypeId
==
special
.
TypeId
);
if
(
scritems
!=
null
&&
scritems
.
Any
())
{
foreach
(
var
item
in
scritems
)
{
var
item
=
scripts
.
FirstOrDefault
(
t
=>
t
.
TypeId
==
special
.
TypeId
&&
t
.
DatabaseType
==
config
.
DataBaseType
);
if
(
item
==
null
)
continue
;
var
config
=
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
item
.
ConfigId
);
if
(
config
==
null
)
continue
;
var
result
=
QueryData
(
config
,
allot
,
item
.
ExecScript
,
specialname
);
result
.
ForEach
(
t
=>
...
...
@@ -312,6 +324,7 @@ private List<ex_result> ExtractSpcial<TEntity>(List<TEntity> entities, List<ex_s
});
data
.
AddRange
(
result
);
}
}
logManage
.
ReturnTheLog
(
Allot
.
ID
,
GroupName
,
2
,
"提取数据"
,
$"特殊核算项“
{
special
.
Target
}
”的数据已完成提取"
);
}
if
(
data
!=
null
&&
data
.
Any
())
...
...
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