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
801e9e54
Commit
801e9e54
authored
Mar 28, 2023
by
ruyun.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
何明清舟山医院,忽略收入表清楚历史数据 默认关闭
parent
ea5f8646
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
+9
-1
performance/Performance.Services/ExtractExcelService/ExtractService.cs
+7
-1
No files found.
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
View file @
801e9e54
...
@@ -125,7 +125,14 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
...
@@ -125,7 +125,14 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
}
}
}
}
public
static
void
ClearSheetPartialData
(
ISheet
sheet
,
PerSheetPoint
point
,
SheetType
sheetType
)
/// <summary>
/// 清理工作表历史数据
/// </summary>
/// <param name="sheet"></param>
/// <param name="point"></param>
/// <param name="sheetType"></param>
/// <param name="ignore">何明清舟山医院,忽略收入表清楚历史数据 默认关闭</param>
public
static
void
ClearSheetPartialData
(
ISheet
sheet
,
PerSheetPoint
point
,
SheetType
sheetType
,
bool
ignore
=
false
)
{
{
if
(
sheet
==
null
)
if
(
sheet
==
null
)
return
;
return
;
...
@@ -142,6 +149,7 @@ public static void ClearSheetPartialData(ISheet sheet, PerSheetPoint point, Shee
...
@@ -142,6 +149,7 @@ public static void ClearSheetPartialData(ISheet sheet, PerSheetPoint point, Shee
{
{
var
cell
=
row
.
GetCell
(
j
);
var
cell
=
row
.
GetCell
(
j
);
if
(
cell
==
null
)
continue
;
if
(
cell
==
null
)
continue
;
if
(
ignore
&&
sheetType
==
SheetType
.
Income
)
continue
;
if
(
cell
.
CellType
!=
CellType
.
Formula
||
sheetType
==
SheetType
.
Income
)
if
(
cell
.
CellType
!=
CellType
.
Formula
||
sheetType
==
SheetType
.
Income
)
{
{
...
...
performance/Performance.Services/ExtractExcelService/ExtractService.cs
View file @
801e9e54
using
Dapper
;
using
Dapper
;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Logging
;
using
NPOI.SS.UserModel
;
using
NPOI.SS.UserModel
;
using
Performance.DtoModels
;
using
Performance.DtoModels
;
...
@@ -17,6 +18,7 @@ namespace Performance.Services.ExtractExcelService
...
@@ -17,6 +18,7 @@ namespace Performance.Services.ExtractExcelService
public
class
ExtractService
:
IAutoInjection
public
class
ExtractService
:
IAutoInjection
{
{
private
readonly
ILogger
logger
;
private
readonly
ILogger
logger
;
private
readonly
IConfiguration
_configuration
;
private
readonly
DapperService
service
;
private
readonly
DapperService
service
;
private
readonly
LogManageService
logService
;
private
readonly
LogManageService
logService
;
private
readonly
QueryService
queryService
;
private
readonly
QueryService
queryService
;
...
@@ -37,6 +39,7 @@ public class ExtractService : IAutoInjection
...
@@ -37,6 +39,7 @@ public class ExtractService : IAutoInjection
public
ExtractService
(
public
ExtractService
(
ILogger
<
ExtractService
>
logger
,
ILogger
<
ExtractService
>
logger
,
IConfiguration
configuration
,
DapperService
service
,
DapperService
service
,
LogManageService
logService
,
LogManageService
logService
,
QueryService
queryService
,
QueryService
queryService
,
...
@@ -57,6 +60,7 @@ DapperService dapperService
...
@@ -57,6 +60,7 @@ DapperService dapperService
)
)
{
{
this
.
logger
=
logger
;
this
.
logger
=
logger
;
_configuration
=
configuration
;
this
.
service
=
service
;
this
.
service
=
service
;
this
.
logService
=
logService
;
this
.
logService
=
logService
;
this
.
queryService
=
queryService
;
this
.
queryService
=
queryService
;
...
@@ -235,7 +239,9 @@ private void WriteDataToFile(IWorkbook workbook, per_allot allot, Dictionary<ExD
...
@@ -235,7 +239,9 @@ private void WriteDataToFile(IWorkbook workbook, per_allot allot, Dictionary<ExD
if
(
types
.
Contains
(
sheetType
)
&&
point
!=
null
&&
point
.
DataFirstCellNum
.
HasValue
)
if
(
types
.
Contains
(
sheetType
)
&&
point
!=
null
&&
point
.
DataFirstCellNum
.
HasValue
)
{
{
logger
.
LogInformation
(
$"
{
sheetName
}
开始清除历史数据。point:
{
JsonHelper
.
Serialize
(
point
)}
"
);
logger
.
LogInformation
(
$"
{
sheetName
}
开始清除历史数据。point:
{
JsonHelper
.
Serialize
(
point
)}
"
);
ExtractHelper
.
ClearSheetPartialData
(
sheet
,
point
,
sheetType
);
// 何明清舟山医院,忽略收入表清楚历史数据 默认关闭
var
ignoreSheetTypeIncomeClear
=
_configuration
.
GetValue
<
bool
>(
"Application:IgnoreSheetTypeIncomeClear"
,
false
);
ExtractHelper
.
ClearSheetPartialData
(
sheet
,
point
,
sheetType
,
ignoreSheetTypeIncomeClear
);
}
}
var
customer
=
factory
.
GetWriteData
(
sheetType
,
logger
);
var
customer
=
factory
.
GetWriteData
(
sheetType
,
logger
);
...
...
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