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
8adb1960
Commit
8adb1960
authored
Mar 05, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏数据导入
parent
eae556ea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
115 deletions
+17
-115
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+0
-38
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+0
-2
performance/Performance.EntityModels/Entity/report_performance_category.cs
+0
-49
performance/Performance.Repository/Repository/PerforReportperformancecategoryRepository.cs
+0
-20
performance/Performance.Services/ReportGlobalService.cs
+17
-6
No files found.
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
8adb1960
...
...
@@ -253,9 +253,6 @@
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.report_original_workload"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.report_performance_category"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.report_performance_person_tags"
>
<summary>
</summary>
</member>
...
...
@@ -5076,41 +5073,6 @@
预算
</summary>
</member>
<member
name=
"T:Performance.EntityModels.report_performance_category"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.report_performance_category.Category"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.report_performance_category.HospitalId"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.report_performance_category.Original"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.report_performance_category.ItemName"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.report_performance_category.Year"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.report_performance_category.Month"
>
<summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.report_performance_person_tags"
>
<summary>
...
...
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
8adb1960
...
...
@@ -179,8 +179,6 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
/// <summary> </summary>
public
virtual
DbSet
<
report_original_workload
>
report_original_workload
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
report_performance_category
>
report_performance_category
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
report_performance_person_tags
>
report_performance_person_tags
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
report_performance_tags
>
report_performance_tags
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/report_performance_category.cs
deleted
100644 → 0
View file @
eae556ea
//-----------------------------------------------------------------------
// <copyright file=" report_performance_category.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"report_performance_category"
)]
public
class
report_performance_category
{
/// <summary>
///
/// </summary>
public
string
Category
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
HospitalId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
Original
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
ItemName
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
Year
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
Month
{
get
;
set
;
}
}
}
performance/Performance.Repository/Repository/PerforReportperformancecategoryRepository.cs
deleted
100644 → 0
View file @
eae556ea
//-----------------------------------------------------------------------
// <copyright file=" report_performance_category.cs">
// * FileName: report_performance_category.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// report_performance_category Repository
/// </summary>
public
partial
class
PerforReportperformancecategoryRepository
:
PerforRepository
<
report_performance_category
>
{
public
PerforReportperformancecategoryRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/ReportGlobalService.cs
View file @
8adb1960
...
...
@@ -253,6 +253,7 @@ private void ImportBasicData(ISheet sheet, List<string> columns, int hospitalId,
};
data
.
Add
(
importdata
);
}
logger
.
LogInformation
(
$"
{
sheet
.
SheetName
}
共有
{
sheet
.
LastRowNum
}
行数据,读取到
{
data
.
Count
}
条记录"
);
if
(
data
==
null
||
!
data
.
Any
(
t
=>
t
.
Year
!=
0
&&
t
.
Month
!=
0
))
return
;
var
dateTime
=
DateTime
.
Now
;
...
...
@@ -267,7 +268,9 @@ private void ImportBasicData(ISheet sheet, List<string> columns, int hospitalId,
var
yearMonths
=
data
.
Select
(
t
=>
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
).
Distinct
();
hisimportdataRepository
.
DeleteFromQuery
(
t
=>
t
.
HospitalId
==
hospitalId
&&
yearMonths
.
Contains
(
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
)
&&
t
.
Category
==
sheetName
);
var
entities
=
hisimportdataRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
yearMonths
.
Contains
(
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
)
&&
t
.
Category
==
sheetName
);
if
(
entities
!=
null
&&
entities
.
Any
())
hisimportdataRepository
.
BulkDelete
(
entities
);
hisimportdataRepository
.
BulkInsert
(
data
.
Where
(
t
=>
t
.
Year
!=
0
&&
t
.
Month
!=
0
));
}
...
...
@@ -301,7 +304,9 @@ private void ImporSummaryData(ISheet sheet, List<string> columns, int hospitalId
var
yearMonths
=
data
.
Select
(
t
=>
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
).
Distinct
();
hisimportsummaryRepository
.
DeleteFromQuery
(
t
=>
t
.
HospitalId
==
hospitalId
&&
yearMonths
.
Contains
(
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
));
var
entities
=
hisimportsummaryRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
yearMonths
.
Contains
(
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
));
if
(
entities
!=
null
&&
entities
.
Any
())
hisimportsummaryRepository
.
BulkDelete
(
entities
);
hisimportsummaryRepository
.
BulkInsert
(
data
.
Where
(
t
=>
t
.
Year
!=
0
&&
t
.
Month
!=
0
));
}
...
...
@@ -337,7 +342,9 @@ private void ImporAccountData(ISheet sheet, List<string> columns, int hospitalId
var
yearMonths
=
data
.
Select
(
t
=>
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
).
Distinct
();
hisimportaccountRepository
.
DeleteFromQuery
(
t
=>
t
.
HospitalId
==
hospitalId
&&
yearMonths
.
Contains
(
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
));
var
entities
=
hisimportaccountRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
yearMonths
.
Contains
(
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
));
if
(
entities
!=
null
&&
entities
.
Any
())
hisimportaccountRepository
.
BulkDelete
(
entities
);
hisimportaccountRepository
.
BulkInsert
(
data
.
Where
(
t
=>
t
.
Year
!=
0
&&
t
.
Month
!=
0
));
}
...
...
@@ -410,7 +417,9 @@ private void ImporClinicData(ISheet sheet, List<string> columns, int hospitalId,
var
yearMonths
=
data
.
Select
(
t
=>
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
).
Distinct
();
hisimportclinicRepository
.
DeleteFromQuery
(
t
=>
t
.
HospitalId
==
hospitalId
&&
yearMonths
.
Contains
(
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
));
var
entities
=
hisimportclinicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
yearMonths
.
Contains
(
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
));
if
(
entities
!=
null
&&
entities
.
Any
())
hisimportclinicRepository
.
BulkDelete
(
entities
);
hisimportclinicRepository
.
BulkInsert
(
data
.
Where
(
t
=>
t
.
Year
!=
0
&&
t
.
Month
!=
0
));
}
...
...
@@ -482,7 +491,9 @@ private void ImporBasicnormData(ISheet sheet, List<string> columns, int hospital
var
yearMonths
=
data
.
Select
(
t
=>
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
).
Distinct
();
hisimportbaiscnormRepository
.
DeleteFromQuery
(
t
=>
t
.
HospitalId
==
hospitalId
&&
yearMonths
.
Contains
(
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
));
var
entities
=
hisimportbaiscnormRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
yearMonths
.
Contains
(
$"
{
t
.
Year
}
-
{
t
.
Month
}
"
));
if
(
entities
!=
null
&&
entities
.
Any
())
hisimportbaiscnormRepository
.
BulkDelete
(
entities
);
hisimportbaiscnormRepository
.
BulkInsert
(
data
.
Where
(
t
=>
t
.
Year
!=
0
&&
t
.
Month
!=
0
));
}
...
...
@@ -498,7 +509,7 @@ private List<string> GetColumns(ISheet sheet, string sheetName, out string sourc
}
}
if
(
string
.
IsNullOrEmpty
(
sourceType
))
return
new
List
<
string
>();
;
//
if (string.IsNullOrEmpty(sourceType)) return new List<string>(); ;
var
columnRow
=
sheet
.
GetOrCreate
(
0
);
return
columnRow
.
GetCellValues
();
...
...
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