excel처리 최적화
This commit is contained in:
parent
63b86328bc
commit
a8ab7ae6c5
|
|
@ -44,9 +44,6 @@ namespace Server.Git
|
|||
query = "";
|
||||
for (int n = 0; n < sheets.Count; n++)
|
||||
{
|
||||
if (sheets[n].dataEnum[0] == "client")
|
||||
continue;
|
||||
|
||||
//초기화
|
||||
newTableQuery = "";
|
||||
tableDatas = "(";
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ namespace Server.Git
|
|||
List<string> fileList = GetFiles(repositoryPath, ".xlsx");
|
||||
|
||||
Dictionary<string, Dictionary<long, Dictionary<string, object>>> clientSheetList = new Dictionary<string, Dictionary<long, Dictionary<string, object>>>();
|
||||
List<sheet> serverSheetList = new List<sheet>();
|
||||
|
||||
for (int n = 0; n < fileList.Count; n++)
|
||||
{
|
||||
|
|
@ -21,25 +22,40 @@ namespace Server.Git
|
|||
for (int m = 0; m < sheets.Count; m++)
|
||||
{
|
||||
|
||||
if (sheets[m].dataEnum[0] == "server")
|
||||
continue;
|
||||
switch (sheets[m].dataEnum[0])
|
||||
{
|
||||
case "server":
|
||||
serverSheetList.Add(sheets[m]);
|
||||
break;
|
||||
case "client":
|
||||
clientSheetList.Add(sheets[m].name, sheets[m].dicViewer);
|
||||
break;
|
||||
case "all":
|
||||
string name = sheets[m].name;
|
||||
Dictionary<long, Dictionary<string, object>> sheet = sheets[m].dicViewer;
|
||||
|
||||
|
||||
for(int i = 1; i < sheets[m].dataEnum.Count; i++)
|
||||
Dictionary<long, Dictionary<string, object>> serverSheet = sheets[m].dicViewer;
|
||||
Dictionary<long, Dictionary<string, object>> clientSheet = sheets[m].dicViewer;
|
||||
for (int i = 1; i < sheets[m].dataEnum.Count; i++)
|
||||
{
|
||||
if(sheets[m].dataEnum[i] == "server")
|
||||
if (sheets[m].dataEnum[i] == "client")
|
||||
{
|
||||
foreach(var item in sheet)
|
||||
foreach (var item in serverSheet)
|
||||
{
|
||||
item.Value.Remove(sheets[m].variable[i]);
|
||||
}
|
||||
}
|
||||
if (sheets[m].dataEnum[i] == "server")
|
||||
{
|
||||
foreach (var item in clientSheet)
|
||||
{
|
||||
item.Value.Remove(sheets[m].variable[i]);
|
||||
}
|
||||
}
|
||||
|
||||
clientSheetList.Add(name, sheet);
|
||||
|
||||
}
|
||||
serverSheetList.Add(sheets[m]);
|
||||
clientSheetList.Add(name, clientSheet);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -50,9 +66,9 @@ namespace Server.Git
|
|||
}
|
||||
//현재 서버는 PostgreSQL기준으로 쿼리를 생성하는 코드와 패키지가 세팅되어 있습니다 이점 참고바랍니다
|
||||
//추가로 해당 기능을 사용하려면 서버에 excel이라는 스키마가 존재하여야 합니다.
|
||||
if (sheets != null)
|
||||
if (sheets != null && serverSheetList.Count != 0)
|
||||
{
|
||||
ExcelSQL sql = new ExcelSQL(sheets);
|
||||
ExcelSQL sql = new ExcelSQL(serverSheetList);
|
||||
sql.DataUpdate();
|
||||
}
|
||||
return JsonConvert.SerializeObject(clientSheetList);
|
||||
|
|
|
|||
|
|
@ -8,20 +8,20 @@ var app = builder.Build();
|
|||
//웹서버 초기화
|
||||
ProtocolProcessor.Init();
|
||||
//깃 웹훅 초기화
|
||||
GItWebhook.Init();
|
||||
//GItWebhook.Init();
|
||||
|
||||
//http용 데이터
|
||||
app.MapPost("/", ProtocolProcessor.Process);
|
||||
////http용 데이터
|
||||
//app.MapPost("/", ProtocolProcessor.Process);
|
||||
|
||||
//git 접근용 웹훅
|
||||
app.MapPost("/git", GItWebhook.Process);
|
||||
////git 접근용 웹훅
|
||||
//app.MapPost("/git", GItWebhook.Process);
|
||||
|
||||
//app.MapPost("/update", GItWebhook.Process);
|
||||
////app.MapPost("/update", GItWebhook.Process);
|
||||
|
||||
#if DEBUG
|
||||
app.MapGet("/spin", Spin.Main);
|
||||
//#if DEBUG
|
||||
//app.MapGet("/spin", Spin.Main);
|
||||
|
||||
app.MapPost("/spin/random", Spin.Random);
|
||||
#endif
|
||||
//app.MapPost("/spin/random", Spin.Random);
|
||||
//#endif
|
||||
|
||||
app.Run(Statics.URL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue