Commit 891f1999 by Licx

1.修改Oracle连接字符串

2.提取数据创建sheet修改
parent 0a552956
......@@ -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:
......
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment