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
cbddd50a
Commit
cbddd50a
authored
Feb 13, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临床科室绩效测试表显示读取
parent
b3f6e8c3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
169 additions
and
12 deletions
+169
-12
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+3
-0
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+4
-0
performance/Performance.Services/AllotCompute/ImportDataService.cs
+41
-5
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
+4
-1
performance/Performance.Services/PerExcelService/PerSheetService.cs
+22
-0
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
+1
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccountingSpecial.cs
+77
-0
performance/Performance.Services/SheetSevice.cs
+17
-5
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
cbddd50a
...
@@ -588,6 +588,9 @@
...
@@ -588,6 +588,9 @@
<member
name=
"F:Performance.DtoModels.SheetType.ClinicEmployee"
>
<member
name=
"F:Performance.DtoModels.SheetType.ClinicEmployee"
>
<summary>
临床人员名单
</summary>
<summary>
临床人员名单
</summary>
</member>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.AccountBasicSpecial"
>
<summary>
特殊临床科室医护绩效测算基础
</summary>
</member>
<member
name=
"T:Performance.DtoModels.AccountUnitType"
>
<member
name=
"T:Performance.DtoModels.AccountUnitType"
>
<summary>
<summary>
核算单元类型
核算单元类型
...
...
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
cbddd50a
...
@@ -78,6 +78,10 @@ public enum SheetType
...
@@ -78,6 +78,10 @@ public enum SheetType
/// <summary> 临床人员名单 </summary>
/// <summary> 临床人员名单 </summary>
[
Description
(
"临床人员名单"
)]
[
Description
(
"临床人员名单"
)]
ClinicEmployee
=
15
,
ClinicEmployee
=
15
,
/// <summary> 特殊临床科室医护绩效测算基础 </summary>
[
Description
(
"特殊临床科室医护绩效测算基础"
)]
AccountBasicSpecial
=
16
,
}
}
/// <summary>
/// <summary>
...
...
performance/Performance.Services/AllotCompute/ImportDataService.cs
View file @
cbddd50a
...
@@ -64,6 +64,9 @@ public PerExcel ReadDataAndSave(per_allot allot)
...
@@ -64,6 +64,9 @@ public PerExcel ReadDataAndSave(per_allot allot)
{
{
var
excel
=
Import
(
allot
);
var
excel
=
Import
(
allot
);
Save
(
excel
,
allot
.
ID
);
Save
(
excel
,
allot
.
ID
);
var
item
=
excel
.
PerSheet
.
FirstOrDefault
(
w
=>
w
.
SheetType
==
SheetType
.
AccountBasicSpecial
);
if
(
item
!=
null
)
excel
.
PerSheet
.
Remove
(
item
);
return
excel
;
return
excel
;
}
}
...
@@ -92,7 +95,12 @@ private PerExcel Import(per_allot allot)
...
@@ -92,7 +95,12 @@ private PerExcel Import(per_allot allot)
{
{
var
sheet
=
workbook
.
GetSheetAt
(
i
);
var
sheet
=
workbook
.
GetSheetAt
(
i
);
var
sheetType
=
perSheetService
.
GetSheetType
(
sheet
.
SheetName
);
var
sheetType
=
perSheetService
.
GetSheetType
(
sheet
.
SheetName
);
// 保留临床科室测算表全部结构,用作展示,不做其他用途
if
(
sheetType
==
SheetType
.
AccountBasic
)
{
var
st
=
perSheetService
.
SheetAccountBasicSpecial
(
sheet
,
isnew
);
excel
.
PerSheet
.
Add
(
st
);
}
if
(
SheetType
.
Unidentifiable
!=
sheetType
)
if
(
SheetType
.
Unidentifiable
!=
sheetType
)
{
{
logManageService
.
WriteMsg
(
"开始读取excel文件"
,
$"开始读取sheet --
{
sheet
.
SheetName
}
"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"开始读取excel文件"
,
$"开始读取sheet --
{
sheet
.
SheetName
}
"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
...
@@ -196,8 +204,21 @@ private void SaveClinicEmployee(PerSheet sheet, int allotId)
...
@@ -196,8 +204,21 @@ private void SaveClinicEmployee(PerSheet sheet, int allotId)
/// <returns></returns>
/// <returns></returns>
private
void
SaveAccountBasic
(
PerSheet
sheet
,
int
allotId
)
private
void
SaveAccountBasic
(
PerSheet
sheet
,
int
allotId
)
{
{
var
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
1
,
SheetType
=
(
int
)
sheet
.
SheetType
};
//var imsheet = new per_sheet { AllotID = allotId, SheetName = sheet.SheetName, Source = 1, SheetType = (int)sheet.SheetType };
perforPerSheetRepository
.
Add
(
imsheet
);
//perforPerSheetRepository.Add(imsheet);
List
<
int
>
types
=
new
List
<
int
>
{
(
int
)
SheetType
.
AccountBasicSpecial
,
(
int
)
SheetType
.
AccountBasic
};
var
sheets
=
perforPerSheetRepository
.
GetEntities
(
w
=>
w
.
AllotID
==
allotId
&&
w
.
SheetType
.
HasValue
&&
types
.
Contains
(
w
.
SheetType
.
Value
));
var
imsheet
=
sheets
?.
FirstOrDefault
();
if
(
imsheet
!=
null
)
{
imsheet
.
SheetType
=
(
int
)
SheetType
.
AccountBasic
;
perforPerSheetRepository
.
Update
(
imsheet
);
}
else
{
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
1
,
SheetType
=
(
int
)
sheet
.
SheetType
};
perforPerSheetRepository
.
Add
(
imsheet
);
}
var
dataList
=
sheet
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
dataList
=
sheet
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
List
<
im_accountbasic
>
addList
=
new
List
<
im_accountbasic
>();
List
<
im_accountbasic
>
addList
=
new
List
<
im_accountbasic
>();
...
@@ -242,8 +263,23 @@ private void SaveSpecialUnit(PerSheet sheet, int allotId)
...
@@ -242,8 +263,23 @@ private void SaveSpecialUnit(PerSheet sheet, int allotId)
/// <returns></returns>
/// <returns></returns>
private
void
SaveCommon
(
PerSheet
sheet
,
int
allotId
)
private
void
SaveCommon
(
PerSheet
sheet
,
int
allotId
)
{
{
var
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
1
,
SheetType
=
(
int
)
sheet
.
SheetType
};
per_sheet
imsheet
=
null
;
perforPerSheetRepository
.
Add
(
imsheet
);
List
<
int
>
types
=
new
List
<
int
>
{
(
int
)
SheetType
.
AccountBasicSpecial
,
(
int
)
SheetType
.
AccountBasic
};
if
(
types
.
Any
(
type
=>
type
==
(
int
)
sheet
.
SheetType
))
{
var
sheets
=
perforPerSheetRepository
.
GetEntities
(
w
=>
w
.
AllotID
==
allotId
&&
w
.
SheetType
.
HasValue
&&
types
.
Contains
(
w
.
SheetType
.
Value
));
imsheet
=
sheets
?.
FirstOrDefault
();
if
(
imsheet
!=
null
)
{
imsheet
.
SheetType
=
(
int
)
SheetType
.
AccountBasic
;
perforPerSheetRepository
.
Update
(
imsheet
);
}
}
if
(
imsheet
==
null
)
{
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
1
,
SheetType
=
(
int
)
sheet
.
SheetType
};
perforPerSheetRepository
.
Add
(
imsheet
);
}
List
<
im_header
>
addHeadList
=
new
List
<
im_header
>();
List
<
im_header
>
addHeadList
=
new
List
<
im_header
>();
foreach
(
var
header
in
sheet
.
PerHeader
)
foreach
(
var
header
in
sheet
.
PerHeader
)
...
...
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
View file @
cbddd50a
...
@@ -45,11 +45,14 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType, bool isnew = fa
...
@@ -45,11 +45,14 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType, bool isnew = fa
dataread
=
new
PerSheetDataReadWorkload
();
dataread
=
new
PerSheetDataReadWorkload
();
break
;
break
;
case
SheetType
.
AccountBasic
:
case
SheetType
.
AccountBasic
:
dataread
=
new
PerSheetDataReadDeptAccounting
t
();
dataread
=
new
PerSheetDataReadDeptAccounting
();
break
;
break
;
case
SheetType
.
SpecialUnit
:
case
SheetType
.
SpecialUnit
:
dataread
=
new
PerSheetDataReadSpecialUnit
();
dataread
=
new
PerSheetDataReadSpecialUnit
();
break
;
break
;
case
SheetType
.
AccountBasicSpecial
:
dataread
=
new
PerSheetDataReadDeptAccountingSpecial
();
break
;
}
}
return
dataread
;
return
dataread
;
}
}
...
...
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
cbddd50a
...
@@ -27,6 +27,28 @@ public class PerSheetService : IAutoInjection
...
@@ -27,6 +27,28 @@ public class PerSheetService : IAutoInjection
_perforCofdrugpropRepository
=
perforCofdrugpropRepository
;
_perforCofdrugpropRepository
=
perforCofdrugpropRepository
;
_perforCofdrugtypeRepository
=
perforCofdrugtypeRepository
;
_perforCofdrugtypeRepository
=
perforCofdrugtypeRepository
;
}
}
/// <summary>
/// 解析excel数据
/// </summary>
/// <param name="sheet"></param>
/// <returns></returns>
public
PerSheet
SheetAccountBasicSpecial
(
ISheet
sheet
,
bool
isnew
)
{
PerSheet
perSheet
=
new
PerSheet
{
SheetName
=
sheet
.
SheetName
,
SheetType
=
SheetType
.
AccountBasicSpecial
,
ModuleName
=
EnumHelper
.
GetDescription
(
SheetType
.
AccountBasicSpecial
),
};
var
sheetRead
=
PerSheetDataFactory
.
GetDataRead
(
perSheet
.
SheetType
,
isnew
);
var
perHeader
=
_perHeader
.
GetPerHeader
(
sheet
,
sheetRead
.
Point
);
var
headerReverse
=
_perHeader
.
GetPerHeaderReverse
(
perHeader
);
perSheet
.
PerHeader
=
perHeader
;
perSheet
.
PerData
=
sheetRead
.
ReadData
(
sheet
,
headerReverse
);
return
perSheet
;
}
/// <summary>
/// <summary>
/// 解析excel数据
/// 解析excel数据
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting
t
.cs
→
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
View file @
cbddd50a
...
@@ -11,7 +11,7 @@ namespace Performance.Services
...
@@ -11,7 +11,7 @@ namespace Performance.Services
/// <summary>
/// <summary>
/// 临床科室单元核算表
/// 临床科室单元核算表
/// </summary>
/// </summary>
public
class
PerSheetDataReadDeptAccounting
t
:
IPerSheetDataRead
public
class
PerSheetDataReadDeptAccounting
:
IPerSheetDataRead
{
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
{
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccountingSpecial.cs
0 → 100644
View file @
cbddd50a
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
PerSheetDataReadDeptAccountingSpecial
:
IPerSheetDataRead
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
HeaderFirstRowNum
=
1
,
HeaderLastRowNum
=
1
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
2
,
AccountingUnit
=
new
List
<
AccountingUnit
>
{
new
AccountingUnit
{
AccountingUnitCellNum
=
1
,
DeptCellNum
=
2
,
}
}
};
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
var
unit
=
Point
.
AccountingUnit
.
First
();
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
t
.
PointCell
>
unit
.
DeptCellNum
).
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
;
PerData
data
=
new
PerData
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
StringCellValue
,
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
StringCellValue
,
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
UnitType
=
row
.
GetCell
(
0
).
ToString
(),
FactorValue
=
0
,
IsFactor
=
false
,
};
if
(
sheet
.
SheetName
.
Contains
(
"医生组"
))
data
.
UnitType
=
"医生组"
;
else
if
(
sheet
.
SheetName
.
Contains
(
"护理组"
))
data
.
UnitType
=
"护理组"
;
dataList
.
Add
(
data
);
}
}
return
dataList
;
}
}
}
performance/Performance.Services/SheetSevice.cs
View file @
cbddd50a
...
@@ -91,10 +91,10 @@ public SheetExportResponse SheetExport(int sheetID)
...
@@ -91,10 +91,10 @@ public SheetExportResponse SheetExport(int sheetID)
{
{
SpecialUnitExport
(
sheetID
,
response
);
SpecialUnitExport
(
sheetID
,
response
);
}
}
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
AccountBasic
)
//
else if (sheet.SheetType == (int)SheetType.AccountBasic)
{
//
{
AccountBaiscExport
(
sheetID
,
response
);
//
AccountBaiscExport(sheetID, response);
}
//
}
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
ComputeDoctorAccount
)
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
ComputeDoctorAccount
)
{
{
AccountDoctorExport
(
sheetID
,
response
);
AccountDoctorExport
(
sheetID
,
response
);
...
@@ -235,7 +235,19 @@ private void CommonExport(int sheetID, SheetExportResponse response)
...
@@ -235,7 +235,19 @@ private void CommonExport(int sheetID, SheetExportResponse response)
rowbody
=
new
Row
(
rowNumber
??
0
);
rowbody
=
new
Row
(
rowNumber
??
0
);
response
.
Row
.
Add
(
rowbody
);
response
.
Row
.
Add
(
rowbody
);
}
}
if
(
head
.
CellValue
.
Contains
(
"核算单元"
))
if
(
head
.
CellValue
.
Contains
(
"核算单元类型"
))
{
var
value
=
dataList
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rowNumber
).
UnitType
;
rowbody
.
Data
.
Add
(
new
Cell
(
head
.
PointCell
.
Value
,
((
UnitType
)
value
).
ToString
(),
1
,
1
,
false
,
false
));
}
else
if
(
head
.
CellValue
.
Contains
(
"核算单元人员数量"
))
{
var
data
=
dataList
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rowNumber
&&
t
.
SignID
==
head
.
SignID
);
var
value
=
data
?.
CellValue
;
if
(
value
.
HasValue
&&
value
.
Value
>
0
)
rowbody
.
Data
.
Add
(
new
Cell
(
head
.
PointCell
.
Value
,
value
,
1
,
1
,
data
.
IsTotal
==
1
,
true
,
data
.
Annotation
));
}
else
if
(
head
.
CellValue
.
Contains
(
"核算单元"
))
{
{
if
(
head
.
CellValue
.
Contains
(
"医生组"
))
if
(
head
.
CellValue
.
Contains
(
"医生组"
))
{
{
...
...
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