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
c9cf2065
Commit
c9cf2065
authored
Mar 18, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug版
parent
7880990d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
16 deletions
+44
-16
performance/Performance.Api/Startup.cs
+7
-7
performance/Performance.Services/PerExcelService/NopiSevice.cs
+28
-0
performance/Performance.Services/PerExcelService/PerSheetService.cs
+2
-2
performance/Performance.Services/PerExcelService/SheetDataCompute/PerSheetDataComputeMerge.cs
+1
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadExpend.cs
+1
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadIncome.cs
+1
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOtherIncome.cs
+1
-1
performance/Performance.Services/SheetSevice.cs
+3
-3
No files found.
performance/Performance.Api/Startup.cs
View file @
c9cf2065
...
...
@@ -113,11 +113,11 @@ public void ConfigureServices(IServiceCollection services)
var
csredis
=
new
CSRedis
.
CSRedisClient
(
connection
.
Value
.
RedisConnectionString
);
RedisHelper
.
Initialization
(
csredis
);
//后台任务调度
services
.
AddHangfire
(
config
=>
{
config
.
UseRedisStorage
(
connection
.
Value
.
HangfireRedisConnectionString
);
});
//
//
后台任务调度
//
services.AddHangfire(config =>
//
{
//
config.UseRedisStorage(connection.Value.HangfireRedisConnectionString);
//
});
services
.
AddDbContext
<
PerformanceDbContext
>(
options
=>
{
...
...
@@ -148,8 +148,8 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
// c.RoutePrefix = string.Empty;
//});
app
.
UseHangfireServer
();
app
.
UseHangfireDashboard
();
//
app.UseHangfireServer();
//
app.UseHangfireDashboard();
loggerFactory
.
CreateLogger
<
Startup
>().
LogDebug
(
env
.
EnvironmentName
);
app
.
UseMvc
();
...
...
performance/Performance.Services/PerExcelService/NopiSevice.cs
0 → 100644
View file @
c9cf2065
using
NPOI.SS.UserModel
;
using
Performance.Infrastructure
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.Services
{
public
class
NopiSevice
{
public
static
decimal
?
GetCellValue
(
ICell
cell
)
{
if
(
cell
!=
null
)
{
switch
(
cell
.
CellType
)
{
case
CellType
.
Numeric
:
return
ConvertHelper
.
To
<
decimal
?>(
cell
.
NumericCellValue
);
case
CellType
.
String
:
return
ConvertHelper
.
To
<
decimal
?>(
cell
.
StringCellValue
);
case
CellType
.
Formula
:
return
ConvertHelper
.
To
<
decimal
?>(
cell
.
NumericCellValue
);
}
}
return
null
;
}
}
}
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
c9cf2065
...
...
@@ -50,8 +50,8 @@ public SheetType GetSheetType(string sheetName)
//else
if
(
sheetName
.
StartsWith
(
"1.0"
))
return
SheetType
.
OtherIncome
;
//
else if (sheetName.StartsWith("1.1"))
//
return SheetType.Income;
else
if
(
sheetName
.
StartsWith
(
"1.1"
))
return
SheetType
.
Income
;
else
if
(
sheetName
.
StartsWith
(
"2."
))
return
SheetType
.
Expend
;
else
if
(
sheetName
.
StartsWith
(
"3."
))
...
...
performance/Performance.Services/PerExcelService/SheetDataCompute/PerSheetDataComputeMerge.cs
View file @
c9cf2065
...
...
@@ -87,7 +87,7 @@ public PerSheet MergeCompute(PerExcel excel)
private
string
GetCleanSheetName
(
string
sheetName
)
{
sheetName
=
sheetName
sheetName
=
sheetName
.
Trim
()
.
Replace
(
"医生组"
,
""
)
.
Replace
(
"护理组"
,
""
)
.
Replace
(
"."
,
""
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadExpend.cs
View file @
c9cf2065
...
...
@@ -65,7 +65,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
continue
;
if
(!
string
.
IsNullOrEmpty
(
athead
?.
CellValue
)
&&
athead
.
CellValue
.
Contains
(
"备注"
))
continue
;
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
)?.
NumericCellValue
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
)
);
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadIncome.cs
View file @
c9cf2065
...
...
@@ -61,7 +61,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
continue
;
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
)?.
NumericCellValue
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
)
);
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
PerData
data
=
new
PerData
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOtherIncome.cs
View file @
c9cf2065
...
...
@@ -49,7 +49,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
continue
;
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
)?.
NumericCellValue
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
)
);
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
PerData
data
=
new
PerData
...
...
performance/Performance.Services/SheetSevice.cs
View file @
c9cf2065
...
...
@@ -151,17 +151,17 @@ public SheetExportResponse SheetExport(int sheetID)
{
if
(
head
.
CellValue
.
Contains
(
"医生组"
))
{
var
value
=
dataList
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rowNumber
&&
t
.
UnitType
==
1
).
AccountingUnit
;
var
value
=
dataList
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rowNumber
&&
t
.
UnitType
==
1
)
?
.
AccountingUnit
;
rowbody
.
Data
.
Add
(
new
Cell
(
head
.
PointCell
.
Value
,
value
,
1
,
1
));
}
else
if
(
head
.
CellValue
.
Contains
(
"护理组"
))
{
var
value
=
dataList
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rowNumber
&&
t
.
UnitType
==
2
).
AccountingUnit
;
var
value
=
dataList
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rowNumber
&&
t
.
UnitType
==
2
)
?
.
AccountingUnit
;
rowbody
.
Data
.
Add
(
new
Cell
(
head
.
PointCell
.
Value
,
value
,
1
,
1
));
}
else
{
var
value
=
dataList
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rowNumber
).
AccountingUnit
;
var
value
=
dataList
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rowNumber
)
?
.
AccountingUnit
;
rowbody
.
Data
.
Add
(
new
Cell
(
head
.
PointCell
.
Value
,
value
,
1
,
1
));
}
}
...
...
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