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
57244c0c
Commit
57244c0c
authored
Aug 26, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开单医院读取、展示
parent
0e79b004
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
234 additions
and
48 deletions
+234
-48
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+6
-4
performance/Performance.EntityModels/Entity/cof_workitem.cs
+34
-0
performance/Performance.EntityModels/Entity/log_dbug.cs
+1
-1
performance/Performance.Repository/Repository/PerforCofworkitemRepository.cs
+20
-0
performance/Performance.Repository/Repository/PerforResaccountdoctorRepository.cs
+19
-19
performance/Performance.Repository/Repository/PerforResaccountnurseRepository.cs
+19
-19
performance/Performance.Services/AllotCompute/CheckDataService.cs
+1
-1
performance/Performance.Services/AllotCompute/ImportDataService.cs
+7
-1
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
+4
-1
performance/Performance.Services/PerExcelService/PerSheetService.cs
+2
-2
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadBillIncome.cs
+107
-0
performance/Performance.Services/SheetSevice.cs
+14
-0
No files found.
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
57244c0c
...
...
@@ -44,6 +44,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public
virtual
DbSet
<
cof_income
>
cof_income
{
get
;
set
;
}
/// <summary> 特殊绩效项指标 </summary>
public
virtual
DbSet
<
cof_singlefactor
>
cof_singlefactor
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
cof_workitem
>
cof_workitem
{
get
;
set
;
}
/// <summary> 工龄对应绩效系数配置 </summary>
public
virtual
DbSet
<
cof_workyear
>
cof_workyear
{
get
;
set
;
}
/// <summary> </summary>
...
...
@@ -80,10 +82,10 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public
virtual
DbSet
<
per_sheet
>
per_sheet
{
get
;
set
;
}
/// <summary> 科室核算结果 </summary>
public
virtual
DbSet
<
res_account
>
res_account
{
get
;
set
;
}
//
/// <summary> 医生科室核算结果 </summary>
//
public virtual DbSet<res_accountdoctor> res_accountdoctor { get; set; }
//
/// <summary> 护理科室核算结果 </summary>
//
public virtual DbSet<res_accountnurse> res_accountnurse { get; set; }
/// <summary> 医生科室核算结果 </summary>
public
virtual
DbSet
<
res_accountdoctor
>
res_accountdoctor
{
get
;
set
;
}
/// <summary> 护理科室核算结果 </summary>
public
virtual
DbSet
<
res_accountnurse
>
res_accountnurse
{
get
;
set
;
}
/// <summary> 核算基础标准 </summary>
public
virtual
DbSet
<
res_baiscnorm
>
res_baiscnorm
{
get
;
set
;
}
/// <summary> </summary>
...
...
performance/Performance.EntityModels/Entity/cof_workitem.cs
0 → 100644
View file @
57244c0c
//-----------------------------------------------------------------------
// <copyright file=" cof_workitem.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"cof_workitem"
)]
public
class
cof_workitem
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
/// 工作量中需做运算的项
/// </summary>
public
string
Item
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/log_dbug.cs
View file @
57244c0c
...
...
@@ -42,7 +42,7 @@ public class log_dbug
public
string
Message
{
get
;
set
;
}
/// <summary>
///
///
1、信息(info)2、警告(warn)3、错误(error)4、异常(exception)5、成功(success)
/// </summary>
public
Nullable
<
int
>
Level
{
get
;
set
;
}
}
...
...
performance/Performance.Repository/Repository/PerforCofworkitemRepository.cs
0 → 100644
View file @
57244c0c
//-----------------------------------------------------------------------
// <copyright file=" cof_workitem.cs">
// * FileName: cof_workitem.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// cof_workitem Repository
/// </summary>
public
partial
class
PerforCofworkitemRepository
:
PerforRepository
<
cof_workitem
>
{
public
PerforCofworkitemRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Repository/Repository/PerforResaccountdoctorRepository.cs
View file @
57244c0c
//
//
-----------------------------------------------------------------------
//
//
<copyright file=" res_accountdoctor.cs">
//
//
* FileName: res_accountdoctor.cs
//
//
</copyright>
//
//
-----------------------------------------------------------------------
//
using System;
//
using Performance.EntityModels;
//-----------------------------------------------------------------------
// <copyright file=" res_accountdoctor.cs">
// * FileName: res_accountdoctor.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
//
namespace Performance.Repository
//
{
//
/// <summary>
//
/// res_accountdoctor Repository
//
/// </summary>
//
public partial class PerforResaccountdoctorRepository : PerforRepository<res_accountdoctor>
//
{
//
public PerforResaccountdoctorRepository(PerformanceDbContext context) : base(context)
//
{
//
}
//
}
//
}
namespace
Performance.Repository
{
/// <summary>
/// res_accountdoctor Repository
/// </summary>
public
partial
class
PerforResaccountdoctorRepository
:
PerforRepository
<
res_accountdoctor
>
{
public
PerforResaccountdoctorRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Repository/Repository/PerforResaccountnurseRepository.cs
View file @
57244c0c
//
//
-----------------------------------------------------------------------
//
//
<copyright file=" res_accountnurse.cs">
//
//
* FileName: res_accountnurse.cs
//
//
</copyright>
//
//
-----------------------------------------------------------------------
//
using System;
//
using Performance.EntityModels;
//-----------------------------------------------------------------------
// <copyright file=" res_accountnurse.cs">
// * FileName: res_accountnurse.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
//
namespace Performance.Repository
//
{
//
/// <summary>
//
/// res_accountnurse Repository
//
/// </summary>
//
public partial class PerforResaccountnurseRepository : PerforRepository<res_accountnurse>
//
{
//
public PerforResaccountnurseRepository(PerformanceDbContext context) : base(context)
//
{
//
}
//
}
//
}
namespace
Performance.Repository
{
/// <summary>
/// res_accountnurse Repository
/// </summary>
public
partial
class
PerforResaccountnurseRepository
:
PerforRepository
<
res_accountnurse
>
{
public
PerforResaccountnurseRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/AllotCompute/CheckDataService.cs
View file @
57244c0c
...
...
@@ -97,7 +97,7 @@ public bool Discern(PerExcel excel, per_allot allot)
cellValue
=
cellValue
.
Union
(
item
.
Children
.
Select
(
t
=>
t
.
CellValue
)).
ToList
();
}
var
headerCheck
=
perforCofcheckRepository
.
GetEntities
(
t
=>
t
.
Type
==
(
int
)
sheet
.
SheetType
)
.
Select
(
t
=>
t
.
CellName
).
Distinct
().
ToList
();
?
.
Select
(
t
=>
t
.
CellName
).
Distinct
().
ToList
();
if
(
headerCheck
!=
null
)
{
var
list
=
cellValue
.
Intersect
(
headerCheck
).
ToList
();
//求交集,提交的列头和数据库中保存的列头
...
...
performance/Performance.Services/AllotCompute/ImportDataService.cs
View file @
57244c0c
...
...
@@ -84,6 +84,7 @@ private PerExcel Import(per_allot allot)
IWorkbook
workbook
=
(
excel
.
Version
==
ExcelVersion
.
xlsx
)
?
(
IWorkbook
)(
new
XSSFWorkbook
(
fs
))
:
(
IWorkbook
)(
new
HSSFWorkbook
(
fs
));
bool
isnew
=
false
;
for
(
int
i
=
0
;
i
<
workbook
.
NumberOfSheets
;
i
++)
{
var
sheet
=
workbook
.
GetSheetAt
(
i
);
...
...
@@ -92,9 +93,14 @@ private PerExcel Import(per_allot allot)
if
(
SheetType
.
Unidentifiable
!=
sheetType
)
{
logManageService
.
WriteMsg
(
"开始读取excel文件"
,
$"开始读取sheet --
{
sheet
.
SheetName
}
"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
st
=
perSheetService
.
Sheet
(
sheet
);
var
st
=
perSheetService
.
Sheet
(
sheet
,
isnew
);
excel
.
PerSheet
.
Add
(
st
);
}
else
{
if
(
sheet
.
SheetName
.
Contains
(
"开单医院"
))
isnew
=
true
;
}
}
logManageService
.
WriteMsg
(
"开始读取excel文件"
,
$"excel文件基础数据读取完成!"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
return
excel
;
...
...
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
View file @
57244c0c
...
...
@@ -15,7 +15,7 @@ public class PerSheetDataFactory
/// </summary>
/// <param name="sheetType"></param>
/// <returns></returns>
public
static
IPerSheetDataRead
GetDataRead
(
SheetType
sheetType
)
public
static
IPerSheetDataRead
GetDataRead
(
SheetType
sheetType
,
bool
isnew
=
false
)
{
IPerSheetDataRead
dataread
=
null
;
switch
(
sheetType
)
...
...
@@ -24,6 +24,9 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType)
dataread
=
new
PerSheetDataReadEmployee
();
break
;
case
SheetType
.
Income
:
if
(
isnew
)
dataread
=
new
PerSheetDataReadBillIncome
();
else
dataread
=
new
PerSheetDataReadIncome
();
break
;
case
SheetType
.
OtherIncome
:
...
...
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
57244c0c
...
...
@@ -33,7 +33,7 @@ public class PerSheetService : IAutoInjection
/// </summary>
/// <param name="sheet"></param>
/// <returns></returns>
public
PerSheet
Sheet
(
ISheet
sheet
)
public
PerSheet
Sheet
(
ISheet
sheet
,
bool
isnew
)
{
PerSheet
perSheet
=
new
PerSheet
();
perSheet
.
SheetName
=
sheet
.
SheetName
;
...
...
@@ -43,7 +43,7 @@ public PerSheet Sheet(ISheet sheet)
if
(
perSheet
.
SheetType
==
SheetType
.
Unidentifiable
)
return
null
;
var
sheetRead
=
PerSheetDataFactory
.
GetDataRead
(
perSheet
.
SheetType
);
var
sheetRead
=
PerSheetDataFactory
.
GetDataRead
(
perSheet
.
SheetType
,
isnew
);
var
perHeader
=
_perHeader
.
GetPerHeader
(
sheet
,
sheetRead
.
Point
);
var
headerReverse
=
_perHeader
.
GetPerHeaderReverse
(
perHeader
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadBillIncome.cs
0 → 100644
View file @
57244c0c
using
NPOI.SS.UserModel
;
using
Performance.DtoModels
;
using
Performance.Infrastructure
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Performance.Services
{
/// <summary>
/// 开单医院收入
/// </summary>
public
class
PerSheetDataReadBillIncome
:
IPerSheetDataRead
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
HeaderFirstRowNum
=
6
,
HeaderLastRowNum
=
6
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
7
,
AccountingUnit
=
new
List
<
AccountingUnit
>
{
//核算单元(医技组)
new
AccountingUnit
{
AccountingUnitCellNum
=
-
1
,
UnitType
=
"医技组"
,
DeptCellNum
=
2
,
FactorRow
=
3
,
},
//核算单元(医生组)
new
AccountingUnit
{
AccountingUnitCellNum
=
0
,
UnitType
=
"医生组"
,
DeptCellNum
=
2
,
FactorRow
=
2
,
},
//核算单元(护理组)
new
AccountingUnit
{
AccountingUnitCellNum
=
1
,
UnitType
=
"护理组"
,
DeptCellNum
=
2
,
FactorRow
=
1
,
}
}
};
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
var
prevRow
=
sheet
.
GetRow
(
5
);
//循环 当前有几个核算单元
foreach
(
var
unit
in
Point
.
AccountingUnit
)
{
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
AccountingUnitCellNum
).
Contains
(
t
.
PointCell
)
&&
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
DeptCellNum
).
Contains
(
t
.
PointCell
)).
OrderBy
(
t
=>
t
.
PointCell
);
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
string
accountingUnit
,
department
;
if
(
unit
.
AccountingUnitCellNum
.
Value
==
-
1
)
{
if
(
prevRow
==
null
)
continue
;
accountingUnit
=
prevRow
.
GetCell
(
athead
.
PointCell
).
StringCellValue
;
if
(
string
.
IsNullOrEmpty
(
accountingUnit
)
||
r
!=
Point
.
DataFirstRowNum
.
Value
)
continue
;
department
=
accountingUnit
;
}
else
{
accountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
();
department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
ToString
();
}
PerData
data
=
new
PerData
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
accountingUnit
,
Department
=
department
,
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
UnitType
=
unit
.
UnitType
,
//手动匹配
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)?.
ToString
()),
IsFactor
=
true
,
};
dataList
.
Add
(
data
);
}
}
}
return
dataList
;
}
}
}
performance/Performance.Services/SheetSevice.cs
View file @
57244c0c
...
...
@@ -167,6 +167,20 @@ private void CommonExport(int sheetID, SheetExportResponse response)
response
=
AddFactor
(
response
,
factorhead2
,
headList
.
ToList
(),
dataList
,
UnitType
.
医技组
);
}
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Income
&&
!
headList
.
Select
(
t
=>
t
.
CellValue
).
Contains
(
"医技组"
))
{
var
technicianvalue
=
new
Row
(
response
.
Header
.
Count
());
technicianvalue
.
Data
.
Add
(
new
Cell
(
0
,
"医技组核算收入"
,
1
,
4
,
false
,
false
));
response
.
Header
.
Add
(
technicianvalue
);
var
technicianhead
=
new
Row
(
response
.
Header
.
Count
());
technicianhead
.
Data
.
Add
(
new
Cell
(
0
,
"医技组核算单元"
,
1
,
4
,
false
,
false
));
response
.
Header
.
Add
(
technicianhead
);
foreach
(
var
technician
in
dataList
.
Where
(
t
=>
t
.
UnitType
==
3
))
{
var
header
=
headList
.
First
(
t
=>
t
.
CellValue
==
technician
.
TypeName
);
technicianvalue
.
Data
.
Add
(
new
Cell
(
header
.
PointCell
.
Value
,
technician
.
CellValue
,
header
.
MergeRow
.
Value
,
header
.
MergeCell
.
Value
,
header
.
IsTotal
==
1
,
false
));
technicianhead
.
Data
.
Add
(
new
Cell
(
header
.
PointCell
.
Value
,
technician
.
AccountingUnit
,
header
.
MergeRow
.
Value
,
header
.
MergeCell
.
Value
,
header
.
IsTotal
==
1
,
false
));
}
}
//创建列头行
var
rowhead
=
new
Row
(
response
.
Header
.
Count
());
response
.
Header
.
Add
(
rowhead
);
...
...
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