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
e6d1e7cf
Commit
e6d1e7cf
authored
Aug 08, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室字体
parent
b71df7c9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
performance/Performance.Services/NewExtractService.cs
+9
-12
No files found.
performance/Performance.Services/NewExtractService.cs
View file @
e6d1e7cf
...
@@ -315,20 +315,24 @@ private void WriteIncome(ISheet sheet, int hospitalId, List<AccountUnitEntity> u
...
@@ -315,20 +315,24 @@ private void WriteIncome(ISheet sheet, int hospitalId, List<AccountUnitEntity> u
{
{
var
dept
=
unitList
.
FirstOrDefault
(
t
=>
t
.
SheetName
==
sheet
.
SheetName
&&
t
.
Department
==
department
&&
t
.
UnitType
==
1
)?.
AccountingUnit
;
var
dept
=
unitList
.
FirstOrDefault
(
t
=>
t
.
SheetName
==
sheet
.
SheetName
&&
t
.
Department
==
department
&&
t
.
UnitType
==
1
)?.
AccountingUnit
;
newCell
.
SetCellValue
(
dept
??
""
);
newCell
.
SetCellValue
(
dept
??
""
);
newCell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
默认
);
}
}
else
if
(
headName
.
Replace
(
"\n"
,
""
)
==
"核算单元(护理组)"
)
else
if
(
headName
.
Replace
(
"\n"
,
""
)
==
"核算单元(护理组)"
)
{
{
var
dept
=
unitList
.
FirstOrDefault
(
t
=>
t
.
SheetName
==
sheet
.
SheetName
&&
t
.
Department
==
department
&&
t
.
UnitType
==
2
)?.
AccountingUnit
;
var
dept
=
unitList
.
FirstOrDefault
(
t
=>
t
.
SheetName
==
sheet
.
SheetName
&&
t
.
Department
==
department
&&
t
.
UnitType
==
2
)?.
AccountingUnit
;
newCell
.
SetCellValue
(
dept
??
""
);
newCell
.
SetCellValue
(
dept
??
""
);
newCell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
默认
);
}
}
else
if
(
headName
.
Replace
(
"\n"
,
""
)
==
"核算单元(医技组)"
)
else
if
(
headName
.
Replace
(
"\n"
,
""
)
==
"核算单元(医技组)"
)
{
{
var
dept
=
unitList
.
FirstOrDefault
(
t
=>
t
.
SheetName
==
sheet
.
SheetName
&&
t
.
Department
==
department
&&
t
.
UnitType
==
3
)?.
AccountingUnit
;
var
dept
=
unitList
.
FirstOrDefault
(
t
=>
t
.
SheetName
==
sheet
.
SheetName
&&
t
.
Department
==
department
&&
t
.
UnitType
==
3
)?.
AccountingUnit
;
newCell
.
SetCellValue
(
dept
??
""
);
newCell
.
SetCellValue
(
dept
??
""
);
newCell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
默认
);
}
}
else
if
(
headName
==
"科室名称"
)
else
if
(
headName
==
"科室名称"
)
{
{
newCell
.
SetCellValue
(
department
??
""
);
newCell
.
SetCellValue
(
department
??
""
);
newCell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
默认
);
}
}
else
else
{
{
...
@@ -435,17 +439,18 @@ private void WriteWorkload(ISheet sheet, int hospitalId, List<AccountUnitEntity>
...
@@ -435,17 +439,18 @@ private void WriteWorkload(ISheet sheet, int hospitalId, List<AccountUnitEntity>
{
{
var
dept
=
unitList
.
FirstOrDefault
(
t
=>
t
.
SheetName
==
sheet
.
SheetName
&&
t
.
Department
==
department
)?.
AccountingUnit
;
var
dept
=
unitList
.
FirstOrDefault
(
t
=>
t
.
SheetName
==
sheet
.
SheetName
&&
t
.
Department
==
department
)?.
AccountingUnit
;
newCell
.
SetCellValue
(
dept
??
""
);
newCell
.
SetCellValue
(
dept
??
""
);
newCell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
默认
);
}
}
else
if
(
headName
==
"科室名称"
)
else
if
(
headName
==
"科室名称"
)
{
{
newCell
.
SetCellValue
(
department
??
""
);
newCell
.
SetCellValue
(
department
??
""
);
newCell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
默认
);
}
}
else
else
{
{
var
extract
=
allExtract
.
FirstOrDefault
(
t
=>
t
.
Department
==
department
&&
t
.
Category
==
headName
);
var
extract
=
allExtract
.
FirstOrDefault
(
t
=>
t
.
Department
==
department
&&
t
.
Category
==
headName
);
var
value
=
extract
?.
Value
==
0
?
null
:
extract
?.
Value
;
var
value
=
extract
?.
Value
==
0
?
null
:
extract
?.
Value
;
OutToExcelCell
(
newCell
,
value
);
OutToExcelCell
(
newCell
,
value
);
//newCell.SetCellValue(value == null || value == 0 ? "" : value.ToString());
if
(
specialHead
!=
null
&&
specialHead
.
Contains
(
headName
))
if
(
specialHead
!=
null
&&
specialHead
.
Contains
(
headName
))
newCell
.
CellStyle
=
style
;
newCell
.
CellStyle
=
style
;
}
}
...
@@ -559,8 +564,9 @@ private void WriteEmployee(ISheet sheet, int allotLastId, IPerSheetDataRead shee
...
@@ -559,8 +564,9 @@ private void WriteEmployee(ISheet sheet, int allotLastId, IPerSheetDataRead shee
{
{
var
item
=
dictionary
.
FirstOrDefault
(
t
=>
t
.
Key
==
cell
.
StringCellValue
);
var
item
=
dictionary
.
FirstOrDefault
(
t
=>
t
.
Key
==
cell
.
StringCellValue
);
var
value
=
item
.
Value
.
Invoke
(
dataList
[
i
])
??
""
;
var
value
=
item
.
Value
.
Invoke
(
dataList
[
i
])
??
""
;
var
newCell
=
importRow
.
CreateCell
(
cell
.
ColumnIndex
);
//.SetCellValue(Verify(value));
var
newCell
=
importRow
.
CreateCell
(
cell
.
ColumnIndex
);
OutToExcelCell
(
newCell
,
value
);
OutToExcelCell
(
newCell
,
value
);
newCell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
默认
);
}
}
}
}
}
}
...
@@ -685,9 +691,8 @@ private void WriteAccountBasic(ISheet sheet, int allotLastId, IPerSheetDataRead
...
@@ -685,9 +691,8 @@ private void WriteAccountBasic(ISheet sheet, int allotLastId, IPerSheetDataRead
value
=
value
.
ToString
()
==
"1"
?
"医生组"
:
value
.
ToString
()
==
"2"
?
"护理组"
:
"医技组"
;
value
=
value
.
ToString
()
==
"1"
?
"医生组"
:
value
.
ToString
()
==
"2"
?
"护理组"
:
"医技组"
;
}
}
var
newCell
=
importRow
.
CreateCell
(
cell
.
ColumnIndex
);
var
newCell
=
importRow
.
CreateCell
(
cell
.
ColumnIndex
);
//newCell.SetCellValue(Verify(value));
//newCell.CellStyle = style;
OutToExcelCell
(
newCell
,
value
);
OutToExcelCell
(
newCell
,
value
);
newCell
.
CellStyle
=
CellStyle
.
CreateCellStyle
(
workbook
,
StyleType
.
默认
);
}
}
}
}
}
}
...
@@ -741,14 +746,6 @@ public void OutToExcelCell(ICell cell, object obj)
...
@@ -741,14 +746,6 @@ public void OutToExcelCell(ICell cell, object obj)
cell
.
SetCellValue
(
""
);
cell
.
SetCellValue
(
""
);
break
;
break
;
}
}
//判断值是否为double类型
//if (!string.IsNullOrEmpty(obj) && Regex.Match(obj.Trim(), @"([1-9]\d*\.?\d*)|(0\.\d*[1-9]?\d*)|0").ToString() == obj.Trim())
// return ConvertHelper.To<double>(obj);
////判断值是否为日期格式
//else if (!string.IsNullOrEmpty(obj) && Regex.Match(obj.Trim(), @"(19|20)\d{2}(-|/)[01]?\d(-|/)[0123]?\d( [012]?\d\:\d{2}\:\d{2})?").ToString() == obj.Trim())
// return ConvertHelper.To<DateTime>(obj).ToString("yyyy/M/d");
//else
// return obj;
}
}
catch
catch
{
{
...
...
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