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
d1a3b266
Commit
d1a3b266
authored
Feb 25, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
his_data抽取数据时,数据实体修改
parent
7e47f334
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
11 deletions
+73
-11
performance/Performance.EntityModels/Entity/his_data.cs
+1
-1
performance/Performance.EntityModels/Other/HisData.cs
+49
-0
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
+23
-10
No files found.
performance/Performance.EntityModels/Entity/his_data.cs
View file @
d1a3b266
...
...
@@ -89,7 +89,7 @@ public class his_data
/// <summary>
/// 费用
/// </summary>
public
string
Value
{
get
;
set
;
}
public
Nullable
<
decimal
>
Value
{
get
;
set
;
}
/// <summary>
/// 创建时间
...
...
performance/Performance.EntityModels/Other/HisData.cs
0 → 100644
View file @
d1a3b266
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.EntityModels
{
public
class
HisData
{
/// <summary>
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 医生姓名
/// </summary>
public
string
DoctorName
{
get
;
set
;
}
/// <summary>
/// 医生姓名
/// </summary>
public
string
PersonnelName
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
PersonnelNumber
{
get
;
set
;
}
/// <summary>
/// 类别
/// </summary>
public
string
Category
{
get
;
set
;
}
/// <summary>
/// 类别
/// </summary>
public
string
ItemName
{
get
;
set
;
}
/// <summary>
/// 原始分类
/// </summary>
public
string
Original
{
get
;
set
;
}
/// <summary>
/// 费用
/// </summary>
public
Nullable
<
decimal
>
Value
{
get
;
set
;
}
}
}
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
View file @
d1a3b266
...
...
@@ -118,7 +118,7 @@ private void HisData(per_allot allot, sys_hospitalconfig config, his_script scri
{
if
(
config
==
null
||
string
.
IsNullOrEmpty
(
script
.
ExecScript
))
return
;
var
data
=
queryService
.
QueryData
<
his_d
ata
>(
config
,
allot
,
script
.
ExecScript
);
var
data
=
queryService
.
QueryData
<
HisD
ata
>(
config
,
allot
,
script
.
ExecScript
);
if
(
data
==
null
||
!
data
.
Any
())
return
;
var
hisdata
=
hisdataRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
&&
t
.
SourceType
==
script
.
SourceType
&&
t
.
Category
==
script
.
Category
);
...
...
@@ -127,17 +127,22 @@ private void HisData(per_allot allot, sys_hospitalconfig config, his_script scri
hisdataRepository
.
RemoveRange
(
hisdata
.
ToArray
());
}
data
.
ToList
().
ForEach
(
t
=>
var
insertData
=
data
.
Select
(
t
=>
new
his_data
{
t
.
HospitalId
=
allot
.
HospitalId
;
t
.
AllotId
=
allot
.
ID
;
t
.
Year
=
allot
.
Year
;
t
.
Month
=
allot
.
Month
;
t
.
SourceType
=
script
.
SourceType
;
t
.
Category
=
script
.
Category
;
t
.
CreateTime
=
DateTime
.
Now
;
HospitalId
=
allot
.
HospitalId
,
AllotId
=
allot
.
ID
,
Year
=
allot
.
Year
,
Month
=
allot
.
Month
,
Department
=
t
.
Department
,
PersonnelName
=
t
.
DoctorName
,
PersonnelNumber
=
GetSaveValue
(
t
.
PersonnelNumber
,
t
.
DoctorName
),
SourceType
=
script
.
SourceType
,
Category
=
script
.
Category
,
Original
=
GetSaveValue
(
t
.
Category
,
t
.
ItemName
,
t
.
Original
),
Value
=
t
.
Value
,
CreateTime
=
DateTime
.
Now
,
});
hisdataRepository
.
AddRange
(
d
ata
.
ToArray
());
hisdataRepository
.
AddRange
(
insertD
ata
.
ToArray
());
}
catch
(
Exception
ex
)
{
...
...
@@ -148,5 +153,13 @@ private void HisData(per_allot allot, sys_hospitalconfig config, his_script scri
private
void
Department
()
{
}
private
string
GetSaveValue
(
params
string
[]
arr
)
{
string
value
=
string
.
Empty
;
if
(
arr
==
null
||
!
arr
.
Any
())
return
value
;
return
arr
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
));
}
}
}
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