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
34ffa4da
Commit
34ffa4da
authored
Feb 17, 2022
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
返回消息修改
parent
0de87fec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
performance/Performance.Services/ExtractExcelService/ExtractPreConfigService.cs
+5
-4
performance/Performance.Services/ExtractExcelService/QueryService.cs
+17
-3
No files found.
performance/Performance.Services/ExtractExcelService/ExtractPreConfigService.cs
View file @
34ffa4da
...
...
@@ -170,8 +170,6 @@ public List<ExtractConfigResponse> GetExtractTypeAndScript(int hospitalId)
}).
OrderBy
(
t
=>
t
.
Source
).
ToList
();
if
(
result
==
null
||
!
result
.
Any
())
return
new
List
<
ExtractConfigResponse
>();
if
(
result
.
Any
(
t
=>
t
.
Value
==
(
int
)
SheetType
.
Employee
))
result
.
First
(
w
=>
w
.
Value
==
(
int
)
SheetType
.
Employee
).
Title
=
"HRP人员"
;
var
list
=
mapper
.
Map
<
List
<
ExtractConfigResponse
>>(
data
);
var
scripts
=
exscriptRepository
.
GetEntities
(
w
=>
data
.
Select
(
x
=>
x
.
Id
).
Contains
(
w
.
TypeId
))
??
new
List
<
ex_script
>();
var
configs
=
hospitalconfigRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
)
??
new
List
<
sys_hospitalconfig
>();
...
...
@@ -362,7 +360,7 @@ public dynamic ExecsqlAndGetResult(ConsumeTimeRequest request)
script
.
Description
=
ex
.
Message
;
}
throw
new
PerformanceException
(
"查询语句时发生异常"
);
throw
new
PerformanceException
(
ex
.
Message
);
}
finally
{
...
...
@@ -405,11 +403,14 @@ public static List<TitleValue<int>> GetSheettypes()
(
int
)
SheetType
.
OnlyExtract
};
var
list
=
EnumHelper
.
GetItems
<
SheetType
>().
Where
(
w
=>
showItems
.
Contains
(
w
.
Value
));
return
list
.
Select
(
t
=>
new
TitleValue
<
int
>
var
data
=
list
.
Select
(
t
=>
new
TitleValue
<
int
>
{
Title
=
t
.
Description
,
Value
=
t
.
Value
}).
ToList
();
data
.
First
(
w
=>
w
.
Value
==
(
int
)
SheetType
.
Employee
).
Title
=
"HRP人员"
;
return
data
;
}
public
List
<
TitleValue
<
int
>>
GetExTypes
(
int
hospitalId
)
...
...
performance/Performance.Services/ExtractExcelService/QueryService.cs
View file @
34ffa4da
...
...
@@ -198,7 +198,11 @@ private List<ex_result> ExtractModuleData(per_allot allot, string groupName, boo
foreach
(
var
script
in
scripts
.
Where
(
t
=>
t
.
TypeId
==
typeId
))
{
var
config
=
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
script
.
ConfigId
);
if
(
config
==
null
)
continue
;
if
(
config
==
null
)
{
logService
.
ReturnTheLog
(
allot
.
ID
,
groupName
,
2
,
"提取数据"
,
$"未正确配置数据库连接"
,
2
,
isSingle
);
continue
;
}
try
{
...
...
@@ -272,7 +276,12 @@ private List<ex_result> ExtractItemData(per_allot allot, string groupName, bool
foreach
(
var
script
in
scripts
.
Where
(
t
=>
t
.
TypeId
==
typeId
))
{
var
config
=
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
script
.
ConfigId
);
if
(
config
==
null
)
continue
;
if
(
config
==
null
)
{
logService
.
ReturnTheLog
(
allot
.
ID
,
groupName
,
2
,
"提取数据"
,
$"未正确配置数据库连接"
,
2
,
isSingle
);
continue
;
}
try
{
var
querydata
=
QueryData
<
ExtractDto
>(
config
,
script
.
ExecScript
,
allot
,
isSingle
);
...
...
@@ -342,7 +351,12 @@ private List<ex_result> ExtractSpecialData(per_allot allot, string groupName, bo
foreach
(
var
script
in
scripts
.
Where
(
t
=>
t
.
TypeId
==
typeId
))
{
var
config
=
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
script
.
ConfigId
);
if
(
config
==
null
)
continue
;
if
(
config
==
null
)
{
logService
.
ReturnTheLog
(
allot
.
ID
,
groupName
,
2
,
"提取数据"
,
$"未正确配置数据库连接"
,
2
,
isSingle
);
continue
;
}
try
{
var
querydata
=
QueryData
<
ExtractDto
>(
config
,
script
.
ExecScript
,
allot
,
isSingle
);
...
...
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