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
4c293338
Commit
4c293338
authored
May 18, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4.1未获取到科室信息时,读取Excel中的科室信息
parent
3e92581b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
12 deletions
+25
-12
performance/Performance.Services/ExtractExcelService/SheetDataWrite/AccountBasicDataWrite.cs
+25
-12
No files found.
performance/Performance.Services/ExtractExcelService/SheetDataWrite/AccountBasicDataWrite.cs
View file @
4c293338
...
@@ -25,25 +25,34 @@ public void WriteCollectData(ISheet sheet, PerSheetPoint point, SheetType sheetT
...
@@ -25,25 +25,34 @@ public void WriteCollectData(ISheet sheet, PerSheetPoint point, SheetType sheetT
public
void
WriteSheetData
(
ISheet
sheet
,
PerSheetPoint
point
,
SheetType
sheetType
,
ExcelStyle
style
,
object
data
,
Dictionary
<
ExDataDict
,
object
>
exdict
=
null
)
public
void
WriteSheetData
(
ISheet
sheet
,
PerSheetPoint
point
,
SheetType
sheetType
,
ExcelStyle
style
,
object
data
,
Dictionary
<
ExDataDict
,
object
>
exdict
=
null
)
{
{
if
(
data
!=
null
&&
data
is
List
<
per_dept_dic
>
departments
&&
departments
.
Any
())
try
{
{
int
dataFirstRowNum
=
point
.
DataFirstRowNum
.
Value
;
if
(!
exdict
.
ContainsKey
(
ExDataDict
.
AccountingBasic
))
exdict
.
Add
(
ExDataDict
.
AccountingBasic
,
new
List
<
Account
>());
var
accountingUnits
=
departments
.
Select
(
t
=>
new
Account
var
accountingUnits
=
new
List
<
Account
>();
if
(
data
!=
null
&&
data
is
List
<
per_dept_dic
>
departments
&&
departments
.
Any
())
{
{
UnitType
=
t
.
UnitType
.
NoBlank
(),
logger
.
LogInformation
(
"4.1所有系统科室: "
+
JsonHelper
.
Serialize
(
departments
));
AccountingUnit
=
t
.
AccountingUnit
.
NoBlank
()
}).
ToList
()
;
int
dataFirstRowNum
=
point
.
DataFirstRowNum
.
Value
;
var
tuples
=
GetAccountingUnitDataNonexistent
(
sheet
,
point
,
accountingUnits
);
accountingUnits
=
departments
.
Select
(
t
=>
new
Account
{
UnitType
=
t
.
UnitType
.
NoBlank
(),
AccountingUnit
=
t
.
AccountingUnit
.
NoBlank
()
}).
ToList
();
accountingUnits
=
accountingUnits
.
Where
(
t
=>
!
t
.
AccountingUnit
.
Contains
(
"非核算"
))?.
ToList
(
);
var
tuples
=
GetAccountingUnitDataNonexistent
(
sheet
,
point
,
accountingUnits
);
if
(
accountingUnits
==
null
||
!
accountingUnits
.
Any
())
return
;
accountingUnits
=
accountingUnits
.
Where
(
t
=>
!
t
.
AccountingUnit
.
Contains
(
"非核算"
))?.
ToList
()
;
logger
.
LogInformation
(
"4.1所有科室: "
+
JsonHelper
.
Serialize
(
accountingUnits
));
if
(
accountingUnits
!=
null
&&
accountingUnits
.
Any
())
WriteAccountingUnitDataNonexistent
(
sheet
,
point
,
style
,
accountingUnits
,
tuples
);
}
WriteAccountingUnitDataNonexistent
(
sheet
,
point
,
style
,
accountingUnits
,
tuples
);
logger
.
LogInformation
(
"4.1所有科室: "
+
JsonHelper
.
Serialize
(
accountingUnits
)
);
var
accountBasic
=
new
List
<
Account
>();
var
accountBasic
=
new
List
<
Account
>();
...
@@ -59,7 +68,11 @@ public void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType sheetTyp
...
@@ -59,7 +68,11 @@ public void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType sheetTyp
});
});
}
}
exdict
.
Add
(
ExDataDict
.
AccountingBasic
,
accountBasic
);
exdict
[
ExDataDict
.
AccountingBasic
]
=
accountBasic
;
}
catch
(
Exception
ex
)
{
logger
.
LogError
(
"4.1所有科室被获取时发生异常:"
+
ex
.
ToString
());
}
}
}
}
...
...
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