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
891f1999
Commit
891f1999
authored
Sep 19, 2022
by
Licx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改Oracle连接字符串
2.提取数据创建sheet修改
parent
0a552956
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
25 deletions
+13
-25
performance/Performance.Repository/Common/ConnectionBuilder.cs
+1
-1
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
+12
-24
No files found.
performance/Performance.Repository/Common/ConnectionBuilder.cs
View file @
891f1999
...
...
@@ -58,7 +58,7 @@ public static string GetConnectionString(DatabaseType type, string ip, string da
break
;
case
DatabaseType
.
Oracle
:
connectionString
=
$"Password=
{
pwd
}
;User ID=
{
uid
}
;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=
{
ip
}
)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=
{
database
}
)));"
;
connectionString
=
$"Password=
{
pwd
}
;User ID=
{
uid
}
;
Connection Timeout=12000;Pooling=true;
Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=
{
ip
}
)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=
{
database
}
)));"
;
break
;
default
:
...
...
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
View file @
891f1999
...
...
@@ -53,30 +53,11 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
try
{
//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)
// {
// }
// }
// }
//}
var
sheetNames
=
workbook
.
GetAllNames
().
Select
(
w
=>
w
.
SheetName
);
var
sheetNames
=
pairs
.
Keys
;
#
region
收入、额外收入
foreach
(
var
module
in
modulesList
.
Where
(
t
=>
new
int
[]
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherIncome
}.
Contains
(
t
.
SheetType
.
Value
))?.
OrderBy
(
t
=>
t
.
ModuleName
))
{
var
no
=
module
.
ModuleName
.
GetNo
();
...
...
@@ -112,7 +93,12 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
r5
.
GetOrCreate
(
6
).
CellStyle
=
cellStyle
;
workbook
.
SetSheetOrder
(
newSheet
.
SheetName
,
workbook
.
NumberOfSheets
-
1
);
}
}
#
endregion
#
region
其他工作量、考核
foreach
(
var
module
in
modulesList
.
Where
(
t
=>
new
int
[]
{
(
int
)
SheetType
.
OtherWorkload
,
(
int
)
SheetType
.
Assess
}.
Contains
(
t
.
SheetType
.
Value
))?.
OrderBy
(
t
=>
t
.
ModuleName
))
{
var
no
=
module
.
ModuleName
.
GetNo
();
...
...
@@ -131,6 +117,8 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
ClearSheetTemplate
(
newSheet
,
point
,
(
SheetType
)
module
.
SheetType
);
}
}
#
endregion
}
catch
(
Exception
ex
)
{
...
...
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