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
7198cd26
Commit
7198cd26
authored
Jun 30, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提取数据不写入excel
parent
2d14e9c6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
1 deletions
+52
-1
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+4
-0
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
+48
-1
No files found.
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
7198cd26
...
...
@@ -187,6 +187,10 @@ public enum SheetType
/// <summary> 考核 </summary>
[
Description
(
"考核"
)]
Assess
=
38
,
//该参数作用类似于 其他工作量
/// <summary> 抽取数据,不写入 </summary>
[
Description
(
"抽取数据,不写入"
)]
OnlyExtract
=
102
,
}
/// <summary>
...
...
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
View file @
7198cd26
...
...
@@ -20,6 +20,7 @@ public class DictionaryService : IAutoInjection
private
readonly
PerforHospitalconfigRepository
hospitalconfigRepository
;
private
readonly
PerforExtypeRepository
extypeRepository
;
private
readonly
PerforExscriptRepository
exscriptRepository
;
private
readonly
PerforExresultRepository
exresultRepository
;
private
readonly
PerforHisdataRepository
hisdataRepository
;
private
readonly
PerforHisscriptRepository
hisscriptRepository
;
...
...
@@ -31,6 +32,7 @@ public class DictionaryService : IAutoInjection
PerforHospitalconfigRepository
hospitalconfigRepository
,
PerforExtypeRepository
extypeRepository
,
PerforExscriptRepository
exscriptRepository
,
PerforExresultRepository
exresultRepository
,
PerforHisdataRepository
hisdataRepository
,
PerforHisscriptRepository
hisscriptRepository
)
...
...
@@ -42,6 +44,7 @@ PerforHisscriptRepository hisscriptRepository
this
.
hospitalconfigRepository
=
hospitalconfigRepository
;
this
.
extypeRepository
=
extypeRepository
;
this
.
exscriptRepository
=
exscriptRepository
;
this
.
exresultRepository
=
exresultRepository
;
this
.
hisdataRepository
=
hisdataRepository
;
this
.
hisscriptRepository
=
hisscriptRepository
;
}
...
...
@@ -53,7 +56,7 @@ public void Handler(int hospitalId, per_allot allot, string groupName, bool isSi
var
configs
=
hospitalconfigRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
if
(
configs
==
null
||
!
configs
.
Any
())
throw
new
Exception
(
"医院未配置绩效抽取信息"
);
var
types
=
extypeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
new
int
[]
{
2
}.
Contains
(
t
.
Source
));
var
types
=
extypeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
new
int
[]
{
(
int
)
SheetType
.
Employee
,
(
int
)
SheetType
.
OnlyExtract
}.
Contains
(
t
.
Source
));
if
(
types
!=
null
&&
types
.
Any
())
{
logService
.
ReturnTheLog
(
allot
.
ID
,
groupName
,
2
,
"提取数据"
,
$"提取人员信息数据"
,
isSingle
:
isSingle
);
...
...
@@ -67,6 +70,19 @@ public void Handler(int hospitalId, per_allot allot, string groupName, bool isSi
if
(
script
!=
null
)
Employee
(
allot
,
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
script
.
ConfigId
),
script
.
ExecScript
);
}
if
(
types
.
Any
(
t
=>
t
.
Source
==
(
int
)
SheetType
.
OnlyExtract
))
//不写入Excel的提取数据
{
foreach
(
var
type
in
types
.
Where
(
t
=>
t
.
Source
==
(
int
)
SheetType
.
OnlyExtract
))
{
var
thisTypeScripts
=
scripts
.
Where
(
t
=>
t
.
TypeId
==
type
.
Id
);
if
(
thisTypeScripts
==
null
||
!
thisTypeScripts
.
Any
())
continue
;
foreach
(
var
script
in
thisTypeScripts
)
{
ExResult
(
allot
,
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
script
.
ConfigId
),
script
.
ExecScript
,
type
.
EName
);
}
}
}
}
}
...
...
@@ -154,6 +170,37 @@ private void Department()
{
}
private
void
ExResult
(
per_allot
allot
,
sys_hospitalconfig
config
,
string
sql
,
string
enmae
)
{
try
{
if
(
config
==
null
||
string
.
IsNullOrEmpty
(
sql
))
return
;
var
data
=
queryService
.
QueryData
(
config
,
allot
,
sql
);
if
(
data
==
null
||
!
data
.
Any
())
return
;
var
createTime
=
DateTime
.
Now
;
var
result
=
data
.
Select
(
t
=>
new
ex_result
{
Department
=
t
.
Department
,
Category
=
t
.
Category
?.
Trim
(),
Fee
=
t
.
Value
,
DoctorName
=
t
.
DoctorName
,
PersonnelNumber
=
t
.
PersonnelNumber
,
Source
=
enmae
,
DatabaseType
=
config
.
DataBaseType
,
ConfigId
=
config
.
Id
,
AllotId
=
allot
.
ID
,
CreateTime
=
createTime
,
}).
ToList
();
exresultRepository
.
AddRange
(
result
.
ToArray
());
}
catch
(
Exception
ex
)
{
logger
.
LogError
(
"获取不写入Excel数据时发生异常:"
+
ex
.
ToString
());
}
}
private
string
GetSaveValue
(
params
string
[]
arr
)
{
string
value
=
string
.
Empty
;
...
...
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