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
09e2197e
Commit
09e2197e
authored
Jun 08, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提取其他工作量
parent
281905bd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
19 deletions
+53
-19
performance/Performance.Services/ExConfigService.cs
+1
-1
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
+51
-17
performance/Performance.Services/ExtractExcelService/ExtractHelper/WriteDataHelper.cs
+1
-1
No files found.
performance/Performance.Services/ExConfigService.cs
View file @
09e2197e
...
@@ -112,7 +112,7 @@ public void DefaultModules(int hospitalId)
...
@@ -112,7 +112,7 @@ public void DefaultModules(int hospitalId)
public
ex_module
AddModule
(
ModModuleRequest
request
)
public
ex_module
AddModule
(
ModModuleRequest
request
)
{
{
if
(!
new
int
[]
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherWorkload
,
(
int
)
SheetType
.
Assess
}.
Contains
(
request
.
SheetType
.
Value
))
if
(!
new
int
[]
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
Other
Income
,
(
int
)
SheetType
.
Other
Workload
,
(
int
)
SheetType
.
Assess
}.
Contains
(
request
.
SheetType
.
Value
))
throw
new
PerformanceException
(
"模块类型错误,只支持收入模板配置"
);
throw
new
PerformanceException
(
"模块类型错误,只支持收入模板配置"
);
string
addname
=
""
;
string
addname
=
""
;
...
...
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
View file @
09e2197e
...
@@ -54,29 +54,63 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
...
@@ -54,29 +54,63 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
try
try
{
{
foreach
(
var
module
in
modulesList
.
Where
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
Income
)?.
OrderBy
(
t
=>
t
.
ModuleName
))
//foreach (var module in modulesList.Where(t => t.SheetType == (int)SheetType.Income)?.OrderBy(t => t.ModuleName))
//{
// var sheet = workbook.GetSheet(module.ModuleName) ?? workbook.GetSheet(module.ModuleName.NoBlank());
// if (sheet == null)
// {
// string[] keyArray = new string[] { "开单", "就诊", "执行" };
// if (keyArray.Any(key => module.ModuleName.Contains(key)))
// {
// var item = pairs.Where(t => t.Key.ToString().NoBlank().StartsWith("1.")).OrderByDescending(t => t.Key).First();
// var copysheet = workbook.GetSheet(item.Key);
// if (copysheet == null) continue;
// try
// {
// var newSheet = copysheet.CopySheet(module.ModuleName, true);
// workbook.SetSheetOrder(newSheet.SheetName, workbook.NumberOfSheets - 1);
// }
// catch (Exception)
// {
// }
// }
// }
//}
foreach
(
var
module
in
modulesList
.
Where
(
t
=>
new
int
[]
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherIncome
}.
Contains
(
t
.
SheetType
.
Value
))?.
OrderBy
(
t
=>
t
.
ModuleName
))
{
{
var
sheet
=
workbook
.
GetSheet
(
module
.
ModuleName
)
??
workbook
.
GetSheet
(
module
.
ModuleName
.
NoBlank
());
var
sheet
=
workbook
.
GetSheet
(
module
.
ModuleName
)
??
workbook
.
GetSheet
(
module
.
ModuleName
.
NoBlank
());
if
(
sheet
==
null
)
if
(
sheet
==
null
)
{
{
string
[]
keyArray
=
new
string
[]
{
"开单"
,
"就诊"
,
"执行"
};
ExcelStyle
style
=
new
ExcelStyle
(
workbook
);
if
(
keyArray
.
Any
(
key
=>
module
.
ModuleName
.
Contains
(
key
)))
var
cellStyle
=
style
.
SetBgkColorAndFormat
(
style
.
GetCellStyle
(),
StyleType
.
列头
,
CellFormat
.
默认
);
{
var
item
=
pairs
.
Where
(
t
=>
t
.
Key
.
ToString
().
NoBlank
().
StartsWith
(
"1."
)).
OrderByDescending
(
t
=>
t
.
Key
).
First
();
var
item
=
pairs
.
Where
(
t
=>
t
.
Key
.
ToString
().
NoBlank
().
StartsWith
(
"1.0."
)).
OrderByDescending
(
t
=>
t
.
Key
).
First
();
var
copysheet
=
workbook
.
GetSheet
(
item
.
Key
);
var
newSheet
=
workbook
.
CreateSheet
(
module
.
ModuleName
);
if
(
copysheet
==
null
)
continue
;
newSheet
.
GetOrCreate
(
1
).
GetOrCreate
(
6
).
SetCellValue
(
"护理组分割比例:"
);
try
newSheet
.
GetOrCreate
(
1
).
GetOrCreate
(
6
).
CellStyle
=
cellStyle
;
{
newSheet
.
GetOrCreate
(
2
).
GetOrCreate
(
6
).
SetCellValue
(
"医生组分割比例:"
);
var
newSheet
=
copysheet
.
CopySheet
(
module
.
ModuleName
,
true
);
newSheet
.
GetOrCreate
(
2
).
GetOrCreate
(
6
).
CellStyle
=
cellStyle
;
newSheet
.
GetOrCreate
(
3
).
GetOrCreate
(
6
).
SetCellValue
(
"医技组分割比例:"
);
newSheet
.
GetOrCreate
(
3
).
GetOrCreate
(
6
).
CellStyle
=
cellStyle
;
var
r5
=
newSheet
.
GetOrCreate
(
4
);
r5
.
GetOrCreate
(
0
).
SetCellValue
(
"核算收入(医技组)"
);
r5
.
GetOrCreate
(
1
).
SetCellValue
(
"核算收入(医生组)"
);
r5
.
GetOrCreate
(
2
).
SetCellValue
(
"核算收入(护理组)"
);
r5
.
GetOrCreate
(
3
).
SetCellValue
(
"核算单元(医技组)"
);
r5
.
GetOrCreate
(
4
).
SetCellValue
(
"核算单元(医生组)"
);
r5
.
GetOrCreate
(
5
).
SetCellValue
(
"核算单元(护理组)"
);
r5
.
GetOrCreate
(
6
).
SetCellValue
(
"科室名称"
);
r5
.
GetOrCreate
(
0
).
CellStyle
=
cellStyle
;
r5
.
GetOrCreate
(
1
).
CellStyle
=
cellStyle
;
r5
.
GetOrCreate
(
2
).
CellStyle
=
cellStyle
;
r5
.
GetOrCreate
(
3
).
CellStyle
=
cellStyle
;
r5
.
GetOrCreate
(
4
).
CellStyle
=
cellStyle
;
r5
.
GetOrCreate
(
5
).
CellStyle
=
cellStyle
;
r5
.
GetOrCreate
(
6
).
CellStyle
=
cellStyle
;
workbook
.
SetSheetOrder
(
newSheet
.
SheetName
,
workbook
.
NumberOfSheets
-
1
);
workbook
.
SetSheetOrder
(
newSheet
.
SheetName
,
workbook
.
NumberOfSheets
-
1
);
}
}
catch
(
Exception
)
{
}
}
}
}
}
foreach
(
var
module
in
modulesList
.
Where
(
t
=>
new
int
[]
{
(
int
)
SheetType
.
OtherWorkload
,
(
int
)
SheetType
.
Assess
}.
Contains
(
t
.
SheetType
.
Value
))?.
OrderBy
(
t
=>
t
.
ModuleName
))
foreach
(
var
module
in
modulesList
.
Where
(
t
=>
new
int
[]
{
(
int
)
SheetType
.
OtherWorkload
,
(
int
)
SheetType
.
Assess
}.
Contains
(
t
.
SheetType
.
Value
))?.
OrderBy
(
t
=>
t
.
ModuleName
))
{
{
var
sheet
=
workbook
.
GetSheet
(
module
.
ModuleName
)
??
workbook
.
GetSheet
(
module
.
ModuleName
.
NoBlank
());
var
sheet
=
workbook
.
GetSheet
(
module
.
ModuleName
)
??
workbook
.
GetSheet
(
module
.
ModuleName
.
NoBlank
());
...
@@ -93,7 +127,7 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
...
@@ -93,7 +127,7 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
}
}
}
}
}
}
catch
catch
(
Exception
ex
)
{
{
}
}
}
}
...
...
performance/Performance.Services/ExtractExcelService/ExtractHelper/WriteDataHelper.cs
View file @
09e2197e
...
@@ -234,7 +234,7 @@ public static void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType s
...
@@ -234,7 +234,7 @@ public static void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType s
var
row
=
sheet
.
GetOrCreate
(
dataFirstRowNum
);
var
row
=
sheet
.
GetOrCreate
(
dataFirstRowNum
);
for
(
int
cellIndex
=
point
.
HeaderFirstCellNum
.
Value
;
cellIndex
<
columnHeader
.
LastCellNum
;
cellIndex
++)
for
(
int
cellIndex
=
point
.
HeaderFirstCellNum
.
Value
;
cellIndex
<
columnHeader
.
LastCellNum
;
cellIndex
++)
{
{
var
column
=
columnHeader
.
GetCell
(
cellIndex
).
GetDecodeEscapes
()?.
Replace
(
"("
,
"("
).
Replace
(
")"
,
")"
);
;
var
column
=
columnHeader
.
GetCell
(
cellIndex
).
GetDecodeEscapes
()?.
Replace
(
"("
,
"("
).
Replace
(
")"
,
")"
);
var
cell
=
row
.
CreateCell
(
cellIndex
);
var
cell
=
row
.
CreateCell
(
cellIndex
);
if
(
filed
.
ContainsKey
(
column
))
if
(
filed
.
ContainsKey
(
column
))
...
...
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