버그 1차 수정
This commit is contained in:
parent
584e47be4e
commit
82478fcf8b
|
|
@ -24,6 +24,17 @@ namespace Server.Git
|
|||
this._type = type;
|
||||
this._dicViewer = dicViewer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Sheet(Sheet sheet)
|
||||
{
|
||||
this._name = new string(sheet.name);
|
||||
this._variable = new List<string>(sheet.variable);
|
||||
this._dataEnum = new List<string>(sheet.dataEnum);
|
||||
this._type = new List<string>(type);
|
||||
this._dicViewer = new Dictionary<long, Dictionary<string, object>>(dicViewer);
|
||||
}
|
||||
}
|
||||
class ExcelManager
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,41 +21,31 @@ namespace Server.Git
|
|||
sheets = em.sheets;
|
||||
for (int m = 0; m < sheets.Count; m++)
|
||||
{
|
||||
Sheet sheet = sheets[m];
|
||||
switch (sheets[m].dataEnum[0])
|
||||
{
|
||||
case "server":
|
||||
serverSheetList.Add(sheet);
|
||||
serverSheetList.Add(new Sheet(sheets[m]));
|
||||
break;
|
||||
case "client":
|
||||
clientSheetList.Add(sheet.name, sheet.dicViewer);
|
||||
clientSheetList.Add(sheets[m].name, sheets[m].dicViewer);
|
||||
break;
|
||||
case "all":
|
||||
//수정할것 이렇게 작업되면 데이터가 2개로 나눠지는것이 아닌 한개의 데이터가 중복으로 제거됨.
|
||||
string name = sheets[m].name;
|
||||
Dictionary<long, Dictionary<string, object>> serverSheet = new Dictionary<long, Dictionary<string, object>>(sheets[m].dicViewer);
|
||||
Dictionary<long, Dictionary<string, object>> clientSheet = new Dictionary<long, Dictionary<string, object>>(sheets[m].dicViewer);
|
||||
for (int i = 1; i < sheets[m].dataEnum.Count; i++)
|
||||
Sheet sheet = new Sheet(sheets[m]);
|
||||
string name = sheet.name;
|
||||
//서버는 다른곳에서 처리를 하기때문에 여기서는 add만 시켜줌.
|
||||
serverSheetList.Add(new Sheet(sheets[m]));
|
||||
Dictionary<long, Dictionary<string, object>> clientSheet = sheet.dicViewer;
|
||||
for (int i = 1; i < sheet.dataEnum.Count; i++)
|
||||
{
|
||||
if (sheets[m].dataEnum[i] == "client")
|
||||
{
|
||||
foreach (var item in serverSheet)
|
||||
{
|
||||
item.Value.Remove(sheets[m].variable[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 1; i < sheets[m].dataEnum.Count; i++)
|
||||
{
|
||||
if (sheets[m].dataEnum[i] == "server")
|
||||
if (sheet.dataEnum[i] == "server")
|
||||
{
|
||||
foreach (var item in clientSheet)
|
||||
{
|
||||
item.Value.Remove(sheets[m].variable[i]);
|
||||
item.Value.Remove(sheet.variable[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
serverSheetList.Add(sheets[m]);
|
||||
clientSheetList.Add(name, clientSheet);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue