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
9dc0c4ab
Commit
9dc0c4ab
authored
Jun 14, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通过开关控制是否使用HIS提取数据
parent
d7507cd9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
8 deletions
+24
-8
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+5
-0
performance/Performance.EntityModels/Entity/ex_script.cs
+5
-0
performance/Performance.Services/ExtractExcelService/ExtractJobService.cs
+2
-1
performance/Performance.Services/ExtractExcelService/ExtractService.cs
+9
-4
performance/Performance.Services/ExtractExcelService/QueryService.cs
+2
-2
performance/Performance.Services/PersonService.cs
+1
-1
No files found.
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
9dc0c4ab
...
@@ -3684,6 +3684,11 @@
...
@@ -3684,6 +3684,11 @@
语句执行完成所需时间
语句执行完成所需时间
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ex_script.IsOrgDepartment"
>
<summary>
是否使用原始科室 1 是 2 否
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ex_special"
>
<member
name=
"T:Performance.EntityModels.ex_special"
>
<summary>
<summary>
...
...
performance/Performance.EntityModels/Entity/ex_script.cs
View file @
9dc0c4ab
...
@@ -59,5 +59,10 @@ public class ex_script
...
@@ -59,5 +59,10 @@ public class ex_script
/// 语句执行完成所需时间
/// 语句执行完成所需时间
/// </summary>
/// </summary>
public
decimal
TimeConsuming
{
get
;
set
;
}
=
0
;
public
decimal
TimeConsuming
{
get
;
set
;
}
=
0
;
/// <summary>
/// 是否使用原始科室 1 是 2 否
/// </summary>
public
int
IsOrgDepartment
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/ExtractExcelService/ExtractJobService.cs
View file @
9dc0c4ab
...
@@ -79,10 +79,11 @@ public void Execute()
...
@@ -79,10 +79,11 @@ public void Execute()
if
(
allot
==
null
||
allot
.
ID
==
0
)
continue
;
if
(
allot
==
null
||
allot
.
ID
==
0
)
continue
;
var
dict
=
new
Dictionary
<
ExDataDict
,
object
>();
var
dict
=
new
Dictionary
<
ExDataDict
,
object
>();
var
scripts
=
new
List
<
ex_script
>();
var
isSingle
=
hospital
.
IsSingleProject
==
1
;
var
isSingle
=
hospital
.
IsSingleProject
==
1
;
dictionaryService
.
Handler
(
hospital
.
ID
,
allot
,
""
,
isSingle
);
dictionaryService
.
Handler
(
hospital
.
ID
,
allot
,
""
,
isSingle
);
var
data
=
queryService
.
Handler
(
hospital
.
ID
,
allot
,
""
,
isSingle
,
ref
dict
);
var
data
=
queryService
.
Handler
(
hospital
.
ID
,
allot
,
""
,
isSingle
,
ref
dict
,
ref
scripts
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
performance/Performance.Services/ExtractExcelService/ExtractService.cs
View file @
9dc0c4ab
...
@@ -97,6 +97,7 @@ public string Main(int allotId, int hospitalId, string email, string groupName,
...
@@ -97,6 +97,7 @@ public string Main(int allotId, int hospitalId, string email, string groupName,
allot
=
allots
.
First
(
t
=>
t
.
ID
==
allotId
);
allot
=
allots
.
First
(
t
=>
t
.
ID
==
allotId
);
var
dict
=
new
Dictionary
<
ExDataDict
,
object
>();
var
dict
=
new
Dictionary
<
ExDataDict
,
object
>();
var
scripts
=
new
List
<
ex_script
>();
logService
.
ReturnTheLog
(
allotId
,
groupName
,
3
,
""
,
5
,
1
,
isSingle
);
logService
.
ReturnTheLog
(
allotId
,
groupName
,
3
,
""
,
5
,
1
,
isSingle
);
...
@@ -106,8 +107,8 @@ public string Main(int allotId, int hospitalId, string email, string groupName,
...
@@ -106,8 +107,8 @@ public string Main(int allotId, int hospitalId, string email, string groupName,
employeeService
.
SyncDataToResult
(
allotId
);
employeeService
.
SyncDataToResult
(
allotId
);
var
data
=
exresultRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
var
data
=
exresultRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
data
.
AddRange
(
queryService
.
Handler
(
hospitalId
,
allot
,
groupName
,
isSingle
,
ref
dict
));
data
.
AddRange
(
queryService
.
Handler
(
hospitalId
,
allot
,
groupName
,
isSingle
,
ref
dict
,
ref
scripts
));
var
standData
=
StandDataFormat
(
hospitalId
,
data
);
var
standData
=
StandDataFormat
(
hospitalId
,
scripts
,
data
);
dictionaryService
.
Handler
(
hospitalId
,
allot
,
groupName
,
isSingle
);
dictionaryService
.
Handler
(
hospitalId
,
allot
,
groupName
,
isSingle
);
...
@@ -278,7 +279,7 @@ private object GetDataBySheetType(int hospitalId, SheetType sheetType, List<Extr
...
@@ -278,7 +279,7 @@ private object GetDataBySheetType(int hospitalId, SheetType sheetType, List<Extr
/// <param name="hospitalId"></param>
/// <param name="hospitalId"></param>
/// <param name="results"></param>
/// <param name="results"></param>
/// <returns></returns>
/// <returns></returns>
private
List
<
ExtractTransDto
>
StandDataFormat
(
int
hospitalId
,
List
<
ex_result
>
results
)
private
List
<
ExtractTransDto
>
StandDataFormat
(
int
hospitalId
,
List
<
ex_
script
>
scripts
,
List
<
ex_
result
>
results
)
{
{
if
(
results
==
null
||
!
results
.
Any
())
return
new
List
<
ExtractTransDto
>();
if
(
results
==
null
||
!
results
.
Any
())
return
new
List
<
ExtractTransDto
>();
...
@@ -308,10 +309,14 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
...
@@ -308,10 +309,14 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
t
.
Department
=
WriteDataHelper
.
HasValue
(
t
.
Department
,
t
.
HISDeptName
);
t
.
Department
=
WriteDataHelper
.
HasValue
(
t
.
Department
,
t
.
HISDeptName
);
});
});
var
data
=
results
.
GroupJoin
(
dict
,
outer
=>
new
{
Department
=
outer
.
Department
},
inner
=>
new
{
Department
=
inner
.
HISDeptName
},
(
outer
,
inner
)
=>
new
{
outer
,
inner
})
var
data
=
results
.
GroupJoin
(
dict
,
outer
=>
new
{
Department
=
outer
.
Department
},
inner
=>
new
{
Department
=
inner
.
HISDeptName
},
(
outer
,
inner
)
=>
new
{
outer
,
inner
})
.
Select
(
t
=>
.
Select
(
t
=>
{
{
var
dept
=
!
string
.
IsNullOrEmpty
(
t
.
inner
.
FirstOrDefault
()?.
Department
)
?
t
.
inner
.
FirstOrDefault
()?.
Department
:
t
.
outer
.
Department
;
var
dept
=
!
string
.
IsNullOrEmpty
(
t
.
inner
.
FirstOrDefault
()?.
Department
)
?
t
.
inner
.
FirstOrDefault
()?.
Department
:
t
.
outer
.
Department
;
if
(
scripts
.
Any
(
w
=>
w
.
TypeId
==
t
.
outer
.
TypeId
&&
w
.
IsOrgDepartment
==
1
))
dept
=
t
.
outer
.
Department
;
return
new
ExtractTransDto
return
new
ExtractTransDto
{
{
SheetName
=
t
.
outer
.
Source
,
SheetName
=
t
.
outer
.
Source
,
...
...
performance/Performance.Services/ExtractExcelService/QueryService.cs
View file @
9dc0c4ab
...
@@ -75,7 +75,7 @@ public void ClearConnectionPools()
...
@@ -75,7 +75,7 @@ public void ClearConnectionPools()
/// <param name="hospitalId"></param>
/// <param name="hospitalId"></param>
/// <param name="allot"></param>
/// <param name="allot"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
ex_result
>
Handler
(
int
hospitalId
,
per_allot
allot
,
string
groupName
,
bool
isSingle
,
ref
Dictionary
<
ExDataDict
,
object
>
dict
)
public
List
<
ex_result
>
Handler
(
int
hospitalId
,
per_allot
allot
,
string
groupName
,
bool
isSingle
,
ref
Dictionary
<
ExDataDict
,
object
>
dict
,
ref
List
<
ex_script
>
scripts
)
{
{
try
try
{
{
...
@@ -94,7 +94,7 @@ public List<ex_result> Handler(int hospitalId, per_allot allot, string groupName
...
@@ -94,7 +94,7 @@ public List<ex_result> Handler(int hospitalId, per_allot allot, string groupName
logService
.
ReturnTheLog
(
allot
.
ID
,
groupName
,
2
,
"提取数据"
,
$"开始提取数据"
,
isSingle
:
isSingle
);
logService
.
ReturnTheLog
(
allot
.
ID
,
groupName
,
2
,
"提取数据"
,
$"开始提取数据"
,
isSingle
:
isSingle
);
var
scripts
=
exscriptRepository
.
GetEntities
(
t
=>
extypeIds
.
Contains
(
t
.
TypeId
));
scripts
=
exscriptRepository
.
GetEntities
(
t
=>
extypeIds
.
Contains
(
t
.
TypeId
));
if
(
scripts
!=
null
&&
scripts
.
Any
())
if
(
scripts
!=
null
&&
scripts
.
Any
())
{
{
var
allmodules
=
dict
[
ExDataDict
.
ExModule
]
as
List
<
ex_module
>;
var
allmodules
=
dict
[
ExDataDict
.
ExModule
]
as
List
<
ex_module
>;
...
...
performance/Performance.Services/PersonService.cs
View file @
9dc0c4ab
...
@@ -453,7 +453,7 @@ Deptdic GetDeptdic(List<per_dept_dic> dics, string department, string hISDeptNam
...
@@ -453,7 +453,7 @@ Deptdic GetDeptdic(List<per_dept_dic> dics, string department, string hISDeptNam
CreateTime
=
t
.
Max
(
group
=>
group
.
CreateTime
),
CreateTime
=
t
.
Max
(
group
=>
group
.
CreateTime
),
IsVerify
=
t
.
Min
(
w
=>
w
.
IsVerify
)
??
1
,
IsVerify
=
t
.
Min
(
w
=>
w
.
IsVerify
)
??
1
,
});
});
return
result
.
OrderBy
(
w
=>
w
.
IsVerify
).
ThenByDescending
(
t
=>
t
.
CreateTime
).
ThenBy
(
t
=>
t
.
Department
);
return
result
.
OrderBy
(
w
=>
w
.
IsVerify
).
ThenByDescending
(
t
=>
t
.
CreateTime
).
ThenBy
(
t
=>
t
.
Department
);
}
}
...
...
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