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
afbd0054
Commit
afbd0054
authored
Feb 24, 2020
by
zry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效提取模板修改及公共SQL表中读取
parent
e5f13cca
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
138 additions
and
24 deletions
+138
-24
performance/Performance.Api/Template/东方医院绩效模板.xlsx
+0
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+38
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+2
-0
performance/Performance.EntityModels/Entity/mod_dic.cs
+49
-0
performance/Performance.Extract.Api/Template/东方医院绩效模板.xlsx
+0
-0
performance/Performance.Repository/Repository/PerforModdicRepository.cs
+20
-0
performance/Performance.Services/ModExtractService.cs
+29
-24
No files found.
performance/Performance.Api/Template/东方医院绩效模板.xlsx
View file @
afbd0054
No preview for this file type
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
afbd0054
...
...
@@ -115,6 +115,9 @@
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.log_dbug"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.mod_dic"
>
<summary>
部分公共数据抽取SQL
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.mod_extract"
>
<summary>
医院数据提取脚本
</summary>
</member>
...
...
@@ -2040,6 +2043,41 @@
1、信息(info)2、警告(warn)3、错误(error)4、异常(exception)5、成功(success)
</summary>
</member>
<member
name=
"T:Performance.EntityModels.mod_dic"
>
<summary>
部分公共数据抽取SQL
</summary>
</member>
<member
name=
"P:Performance.EntityModels.mod_dic.Id"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.mod_dic.HospitalId"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.mod_dic.Type"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.mod_dic.Content"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.mod_dic.ConfigId"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.mod_dic.Remark"
>
<summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.mod_extract"
>
<summary>
医院数据提取脚本
...
...
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
afbd0054
...
...
@@ -86,6 +86,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public
virtual
DbSet
<
log_check
>
log_check
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
log_dbug
>
log_dbug
{
get
;
set
;
}
/// <summary> 部分公共数据抽取SQL </summary>
public
virtual
DbSet
<
mod_dic
>
mod_dic
{
get
;
set
;
}
/// <summary> 医院数据提取脚本 </summary>
public
virtual
DbSet
<
mod_extract
>
mod_extract
{
get
;
set
;
}
/// <summary> </summary>
...
...
performance/Performance.EntityModels/Entity/mod_dic.cs
0 → 100644
View file @
afbd0054
//-----------------------------------------------------------------------
// <copyright file=" mod_dic.cs">
// * FileName: 部分公共数据抽取SQL.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
/// 部分公共数据抽取SQL
/// </summary>
[
Table
(
"mod_dic"
)]
public
class
mod_dic
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
HospitalId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
Type
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
Content
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
ConfigId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
Remark
{
get
;
set
;
}
}
}
performance/Performance.Extract.Api/Template/东方医院绩效模板.xlsx
View file @
afbd0054
No preview for this file type
performance/Performance.Repository/Repository/PerforModdicRepository.cs
0 → 100644
View file @
afbd0054
//-----------------------------------------------------------------------
// <copyright file=" mod_extract.cs">
// * FileName: mod_extract.cs
// </copyright>
//-----------------------------------------------------------------------
using
Performance.EntityModels
;
using
System
;
namespace
Performance.Repository
{
/// <summary>
/// mod_extract Repository
/// </summary>
public
partial
class
PerforModdicRepository
:
PerforRepository
<
mod_dic
>
{
public
PerforModdicRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/ModExtractService.cs
View file @
afbd0054
...
...
@@ -18,13 +18,15 @@ public class ModExtractService : IAutoInjection
private
PerforModspecialRepository
perforModspecialRepository
;
private
PerforHospitalconfigRepository
perforHospitalconfigRepository
;
private
PerforExtractRepository
perforExtractRepository
;
private
PerforModdicRepository
moddicRepository
;
public
ModExtractService
(
PerforModextractRepository
perforModextractRepository
,
PerforModitemRepository
perforModitemRepository
,
PerforModmoduleRepository
perforModmoduleRepository
,
PerforModspecialRepository
perforModspecialRepository
,
PerforHospitalconfigRepository
perforHospitalconfigRepository
,
PerforExtractRepository
perforExtractRepository
)
PerforExtractRepository
perforExtractRepository
,
PerforModdicRepository
moddicRepository
)
{
this
.
perforModextractRepository
=
perforModextractRepository
;
this
.
perforModitemRepository
=
perforModitemRepository
;
...
...
@@ -32,6 +34,7 @@ public class ModExtractService : IAutoInjection
this
.
perforModspecialRepository
=
perforModspecialRepository
;
this
.
perforHospitalconfigRepository
=
perforHospitalconfigRepository
;
this
.
perforExtractRepository
=
perforExtractRepository
;
this
.
moddicRepository
=
moddicRepository
;
}
/// <summary>
...
...
@@ -419,36 +422,38 @@ public void AddItems(int moduleId)
//收入 默认添加收费项
if
((
int
)
SheetType
.
Income
==
module
.
SheetType
&&
module
.
IsGenerated
==
0
)
{
var
configList
=
perforHospitalconfigRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
module
.
HospitalId
);
if
(
configList
==
null
||
!
configList
.
Any
())
var
sqlconfig
=
moddicRepository
.
GetEntity
(
w
=>
w
.
HospitalId
==
module
.
HospitalId
&&
w
.
Type
.
Trim
().
ToLower
()
==
"itemsql"
);
if
(
sqlconfig
==
null
)
{
LogHelper
.
Information
(
"医院配置信息未设置"
,
"添加默认收费项"
);
throw
new
PerformanceException
(
$"医院配置信息未设置"
);
}
var
hospitalConfig
=
perforHospitalconfigRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
module
.
HospitalId
&&
t
.
Id
==
sqlconfig
.
ConfigId
);
if
(
hospitalConfig
==
null
)
{
LogHelper
.
Information
(
"医院配置信息未设置"
,
"添加默认收费项"
);
throw
new
PerformanceException
(
$"医院配置信息未设置"
);
}
if
(
configList
!=
null
&&
configList
.
Any
())
var
connection
=
ConnectionBuilder
.
Create
(
DatabaseType
.
SqlServer
,
hospitalConfig
.
DbSource
,
hospitalConfig
.
DbName
,
hospitalConfig
.
DbUser
,
hospitalConfig
.
DbPassword
);
string
sql
=
sqlconfig
.
Content
;
var
dataList
=
perforExtractRepository
.
ExecuteScript
(
connection
,
sql
,
null
);
if
(
dataList
!=
null
&&
dataList
.
Any
())
{
var
hospitalConfig
=
configList
.
First
();
var
connection
=
ConnectionBuilder
.
Create
(
DatabaseType
.
SqlServer
,
hospitalConfig
.
DbSource
,
hospitalConfig
.
DbName
,
hospitalConfig
.
DbUser
,
hospitalConfig
.
DbPassword
);
string
sql
=
"SELECT ITEM_TYPE FROM dbo.DIC_FEE GROUP BY ITEM_TYPE ORDER BY ITEM_TYPE;"
;
var
dataList
=
perforExtractRepository
.
ExecuteScript
(
connection
,
sql
,
null
);
if
(
dataList
!=
null
&&
dataList
.
Any
())
var
itemList
=
dataList
.
Select
(
t
=>
new
mod_item
{
var
itemList
=
dataList
.
Select
(
t
=>
new
mod_item
{
ItemName
=
t
.
Value
.
ToString
(),
FactorValue1
=
0
m
,
FactorValue2
=
0
m
,
FactorValue3
=
0
m
,
ModuleId
=
module
.
Id
,
ExtractId
=
module
.
ExtractId
,
ReadOnly
=
1
});
LogHelper
.
Information
(
$"受影响行数
{
itemList
.
Count
()}
"
,
"添加默认收费项"
);
perforModitemRepository
.
AddRange
(
itemList
.
ToArray
());
module
.
IsGenerated
=
1
;
perforModmoduleRepository
.
Update
(
module
);
}
ItemName
=
t
.
Value
.
ToString
(),
FactorValue1
=
0
m
,
FactorValue2
=
0
m
,
FactorValue3
=
0
m
,
ModuleId
=
module
.
Id
,
ExtractId
=
module
.
ExtractId
,
ReadOnly
=
1
});
LogHelper
.
Information
(
$"受影响行数
{
itemList
.
Count
()}
"
,
"添加默认收费项"
);
perforModitemRepository
.
AddRange
(
itemList
.
ToArray
());
module
.
IsGenerated
=
1
;
perforModmoduleRepository
.
Update
(
module
);
}
}
}
...
...
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