[성현모] JsonConvertTool 추가, 서머리 수량 버그수정

This commit is contained in:
SHM
2024-10-25 13:40:03 +09:00
parent 3c8bece6b6
commit b76569d02f
52 changed files with 1148 additions and 547 deletions

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8" ?>
<DBConnInfo>
<UseVersion>CPXV2</UseVersion>
<MainConnInfo>
<Type>MS_SQL</Type>
<IP>192.168.0.23</IP>
<Port>1433</Port>
<ID>Alis</ID>
<PW>Kefico!@34</PW>
<SCHEMA>CPXV2</SCHEMA>
<SUMMARY_TABLE>HIST_TesterSummary</SUMMARY_TABLE>
<VERSION_TABLE>HIST_TestListFileLatestStepVersion</VERSION_TABLE>
<VRFY_TABLE>VRFY_TestListFileRelease</VRFY_TABLE>
<MAC_ADDR>-</MAC_ADDR>
<SSPI>True</SSPI>
</MainConnInfo>
<ShortTermInfo>
<Type>MS_SQL</Type>
<IP>192.168.0.23</IP>
<Port>1433</Port>
<ID>Alis</ID>
<PW>Kefico!@34</PW>
<SCHEMA>CPXV2ShortTermLogJson</SCHEMA>
<SUMMARY_TABLE>HIST_LogSummary_2024</SUMMARY_TABLE>
<LOG_TABLE>HIST_TestResult_2024</LOG_TABLE>
<MAC_ADDR>-</MAC_ADDR>
<SSPI>True</SSPI>
</ShortTermInfo>
<LongTermInfo>
<Type>MS_SQL</Type>
<IP>192.168.0.23</IP>
<Port>1433</Port>
<ID>Alis</ID>
<PW>Kefico!@34</PW>
<SCHEMA>CPXV2LongTermLogJson_2024</SCHEMA>
<SUMMARY_TABLE>HIST_LogSummary</SUMMARY_TABLE>
<LOG_TABLE>HIST_TestResult</LOG_TABLE>
<MAC_ADDR>-</MAC_ADDR>
<SSPI>True</SSPI>
</LongTermInfo>
</DBConnInfo>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<ROOT>
<Configure>
<Title>CP-Server X Log Process</Title>
<LogFileSavePos>D:\Middleware Data\LOG</LogFileSavePos>
<MESFileSavePos>D:\Middleware Data\MES</MESFileSavePos>
<UseFTP>False</UseFTP>
<IPAddressFTP>14.33.116.123</IPAddressFTP>
<PortFTP>2121</PortFTP>
<AccountFTP>ALISFTP</AccountFTP>
<PasswordFTP>Kefico!@34</PasswordFTP>
<ScanTimeFTPms>30000</ScanTimeFTPms>
<ScanTimeBULKms>15000</ScanTimeBULKms>
</Configure>
</ROOT>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<ROOT>
<Configure>
<MapLogEnterMutexName>SharedCPServerX_LogMutex_CPXV2</MapLogEnterMutexName>
<MapLogAccessMutexName>CpServerX_LogAccessMutex_CPXV2</MapLogAccessMutexName>
<MapLogFilePath>D:\CpServerXLogMappedFile_CPXV2\</MapLogFilePath>
<MapLogFileName>CpServerX_LogSharedMemoryMap_CPXV2</MapLogFileName>
<MapLogName>CpServerX_LogSharedData_CPXV2</MapLogName>
<MapInfoLogEnterMutexName>SharedCPServerX_InfoLogMutex_CPXV2</MapInfoLogEnterMutexName>
<MapInfoLogAccessMutexName>CpServerX_InfoLogAccessMutex_CPXV2</MapInfoLogAccessMutexName>
<MapInfoLogFilePath>D:\CpServerXLogMappedFile_CPXV2\</MapInfoLogFilePath>
<MapInfoLogFileName>CpServerX_InfoLogSharedMemoryMap_CPXV2</MapInfoLogFileName>
<MapInfoLogName>CpServerX_InfoLogSharedData_CPXV2</MapInfoLogName>
</Configure>
</ROOT>

View File

@ -63,6 +63,7 @@ namespace SystemX.Net.MiddlewareUI
this.labelDBMain = new System.Windows.Forms.Label();
this.progressBarProgram = new System.Windows.Forms.ProgressBar();
this.panelSubFunc = new System.Windows.Forms.Panel();
this.buttonManualLog = new System.Windows.Forms.Button();
this.buttonDbConnect = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
this.labelFTPTime = new System.Windows.Forms.Label();
@ -88,6 +89,7 @@ namespace SystemX.Net.MiddlewareUI
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItemExit = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripComboBox1 = new System.Windows.Forms.ToolStripComboBox();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.fluentDesignFormContainer1.SuspendLayout();
this.panel2.SuspendLayout();
this.panelMain.SuspendLayout();
@ -465,6 +467,7 @@ namespace SystemX.Net.MiddlewareUI
// panelSubFunc
//
this.panelSubFunc.BackColor = System.Drawing.Color.MidnightBlue;
this.panelSubFunc.Controls.Add(this.buttonManualLog);
this.panelSubFunc.Controls.Add(this.buttonDbConnect);
this.panelSubFunc.Controls.Add(this.panel3);
this.panelSubFunc.Controls.Add(this.buttonBulkInsertStart);
@ -475,6 +478,19 @@ namespace SystemX.Net.MiddlewareUI
this.panelSubFunc.Size = new System.Drawing.Size(1979, 58);
this.panelSubFunc.TabIndex = 17;
//
// buttonManualLog
//
this.buttonManualLog.BackColor = System.Drawing.SystemColors.Control;
this.buttonManualLog.Dock = System.Windows.Forms.DockStyle.Right;
this.buttonManualLog.Location = new System.Drawing.Point(467, 0);
this.buttonManualLog.Name = "buttonManualLog";
this.buttonManualLog.Size = new System.Drawing.Size(216, 58);
this.buttonManualLog.TabIndex = 3;
this.buttonManualLog.Text = "Manual Log File Select";
this.buttonManualLog.UseVisualStyleBackColor = false;
this.buttonManualLog.Visible = false;
this.buttonManualLog.Click += new System.EventHandler(this.buttonManualLog_Click);
//
// buttonDbConnect
//
this.buttonDbConnect.BackColor = System.Drawing.SystemColors.Control;
@ -739,6 +755,10 @@ namespace SystemX.Net.MiddlewareUI
this.toolStripComboBox1.Name = "toolStripComboBox1";
this.toolStripComboBox1.Size = new System.Drawing.Size(121, 23);
//
// openFileDialog
//
this.openFileDialog.FileName = "openFileDialog";
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F);
@ -752,7 +772,7 @@ namespace SystemX.Net.MiddlewareUI
this.IconOptions.Image = global::SystemX.Net.MiddlewareUI.Log.Properties.Resources.AppIcon1;
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SystemX.Net.Middleware.UI - Log CPX v240529";
this.Text = "SystemX.Net.Middleware.UI - Log CPXV2-JSON v240912";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed);
@ -844,6 +864,8 @@ namespace SystemX.Net.MiddlewareUI
private System.Windows.Forms.Label labelShortTermSummaryTableName;
private System.Windows.Forms.Button buttonDbConnect;
private System.Windows.Forms.Label labelFTPTime;
private System.Windows.Forms.Button buttonManualLog;
private System.Windows.Forms.OpenFileDialog openFileDialog;
}
}

View File

@ -141,7 +141,7 @@ namespace SystemX.Net.MiddlewareUI
/// <summary>
/// Base Variable
/// </summary>
private const int ALL_MANAGE_NUM = 110;
private const int ALL_MANAGE_NUM = 310;
private const int PORT_DISTRIBUTION_NUM = 10;
@ -265,7 +265,7 @@ namespace SystemX.Net.MiddlewareUI
InitializeComponent();
MessageOutput.ConsoleWrite(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss>>") +
@"Use CP-Server[X] Middleware [LOG] Version for [CPXV2][v240529] " +
@"Use CP-Server[X] Middleware [LOG] Version for [CPXV2][v240912] " +
"[SystemX.Net.Middleware.Log : MainForm]", ConsoleColor.Green, LogMessageLevel.FATAL);
//
EnableMenuItem(GetSystemMenu(this.Handle, false), SC_CLOSE, MF_GRAYED);
@ -600,5 +600,56 @@ namespace SystemX.Net.MiddlewareUI
{
bDatabaseConnResult = MngDBLogConn.CheckDatabaseConnection();
}
private void buttonManualLog_Click(object sender, EventArgs e)
{
switch(openFileDialog.ShowDialog())
{
case DialogResult.OK:
{
//Scan And Send File
string strGetRoot = Path.GetPathRoot(Environment.CurrentDirectory);
//오늘 포함 -6일전까지 검색
string[] strScanYYYY = new string[7];
string[] strScanMM = new string[7];
string[] strScandd = new string[7];
for (int n = 6; n >= 0; n--)
{
DateTime dtSet = DateTime.Today.AddDays(-n);
strScanYYYY[n] = dtSet.ToString("yyyy");
strScanMM[n] = dtSet.ToString("MM");
strScandd[n] = dtSet.ToString("dd");
}
//
// 7일치 위치 확인
//
for (int n = 0; n < 7; n++)
{
string DirPath = strGetRoot + $@"\XProc\FTP\CpLog\{strScanYYYY[n]}\{strScanMM[n]}\{strScandd[n]}\";
string DirMovePath = strGetRoot + $@"\XProc\FTP\CpLog\{strScanYYYY[n]}\{strScanMM[n]}\{strScandd[n]}\History\";
//생성 폴더가 없을경우 SKIP
if (Directory.Exists(DirPath) == false)
continue;
if (Directory.Exists(DirMovePath) == false)
Directory.CreateDirectory(DirMovePath);
string fileExtension = "zip";
string[] dirs = Directory.GetDirectories(DirPath);
string[] files = Directory.GetFiles(DirPath, $"*.{fileExtension}", SearchOption.TopDirectoryOnly);
if (files.Length <= 0)
continue;
ProcFTPLogFiles(files, DirPath, DirMovePath);
}
}
break;
}
}
}
}

View File

@ -970,4 +970,7 @@
rEEAAKxBAACsQQAArEEAAKxBAACsQQAArEE=
</value>
</data>
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>571, 28</value>
</metadata>
</root>

View File

@ -21,7 +21,7 @@ namespace SystemX.Net.MiddlewareUI
{
bool bCreateProgram = false;
Mutex SetMutex = new Mutex(true, "SystemX.Net.Middleware.UI.Log CPXV2", out bCreateProgram);
Mutex SetMutex = new Mutex(true, "SystemX.Net.Middleware.UI.Log CPXV2-JSON", out bCreateProgram);
if (bCreateProgram)
{

View File

@ -353,7 +353,125 @@ namespace SystemX.Net.MiddlewareUI
nProcPos += 1;
}
private void RegisterCpLogData(ref int nProcPos, DataTable SetCpLogTable, DataSet dsVRFYInfo, DataRow dr, DataRow[] SetMakeLogRows)
private void RegisterCpLogShortData(ref int nProcPos, DataTable SetCpLogTable, DataSet dsVRFYInfo, DataRow dr, DataRow[] SetMakeLogRows)
{
string strGetMeasure = string.Empty;
//CpLog 한행의 정보 획득
ShortLogParamInfo.STEP = dr["STEP"].ToString().Trim();
ShortLogParamInfo.POSITION = dr["POSITION"].ToString().Trim();
ShortLogParamInfo.MO = dr["MO"].ToString().Trim();
ShortLogParamInfo.FNC_NAME = dr["FNC_NAME"].ToString().Trim();
ShortLogParamInfo.MIN = dr["MIN"].ToString().Trim();
ShortLogParamInfo.MEASURE = dr["MEASURE"].ToString().Trim();
ShortLogParamInfo.MAX = dr["MAX"].ToString().Trim();
ShortLogParamInfo.DIM = dr["DIM"].ToString().Trim();
ShortLogParamInfo.CHECK = dr["CHECK"].ToString().Trim();
ShortLogParamInfo.SPENT_TIME = dr["SPENT_TIME"].ToString().Trim();
ShortLogParamInfo.INFO = dr["INFO"].ToString().Trim();
ShortLogParamInfo.GLOBAL_SPEC = false;
ShortLogParamInfo.VRFY_MIN = "";
ShortLogParamInfo.VRFY_MAX = "";
//VRFY 키 지정 검색 > 현재의 STEP 이 VRFY 에 존재하면 해당 STEP 의 정보 VRFY 에서 가져옴
DataRow getDr = dsVRFYInfo.Tables[0].Rows.Find(ShortLogParamInfo.STEP);
if (getDr != null)
{
ShortLogParamInfo.GLOBAL_SPEC = Convert.ToBoolean(getDr["IsGlobal"]);
ShortLogParamInfo.VRFY_MIN = getDr["SpecMin"].ToString().Trim();
ShortLogParamInfo.VRFY_MAX = getDr["SpecMax"].ToString().Trim();
}
//DataRow 를 설정된 DataTable Format으로 한행 생성
SetMakeLogRows[nProcPos] = SetCpLogTable.NewRow();
//CpLog 의 정보와 VRFY 정보를 조건에 따라 생성한 DataRow에 업데이트
SetMakeLogRows[nProcPos]["StepID"] = ShortLogParamInfo.STEP;
SetMakeLogRows[nProcPos]["MeasVal"] = Convert.ToDecimal(0);
SetMakeLogRows[nProcPos]["MeasValStr"] = "";
SetMakeLogRows[nProcPos]["Message"] = "";
if (ShortLogParamInfo.FNC_NAME.IndexOf("PRINTOUT") >= 0)
{
if (ShortLogParamInfo.MEASURE.Length > ShortLogParamInfo.MessageLength)
{
strGetMeasure = ShortLogParamInfo.MEASURE;
strGetMeasure = strGetMeasure.Substring(0, ShortLogParamInfo.MessageLength);
SetMakeLogRows[nProcPos]["Message"] = strGetMeasure;
}
else SetMakeLogRows[nProcPos]["Message"] = ShortLogParamInfo.MEASURE;
}
else if (ShortLogParamInfo.DIM.IndexOf("STR") >= 0 ||
ShortLogParamInfo.DIM.IndexOf("STRING") >= 0 ||
ShortLogParamInfo.DIM.IndexOf("HEX") >= 0 ||
ShortLogParamInfo.DIM.IndexOf("NONE") >= 0 ||
ShortLogParamInfo.DIM.IndexOf("BIN") >= 0 ||
ShortLogParamInfo.DIM == string.Empty)
{
if (ShortLogParamInfo.MEASURE.Length > ShortLogParamInfo.MessageValLength)
{
strGetMeasure = ShortLogParamInfo.MEASURE;
strGetMeasure = strGetMeasure.Substring(0, ShortLogParamInfo.MessageValLength);
SetMakeLogRows[nProcPos]["MeasValStr"] = strGetMeasure;
}
else SetMakeLogRows[nProcPos]["MeasValStr"] = ShortLogParamInfo.MEASURE;
}
else
{
//상기 케이스에 다 해당 안될때 Decimal 삽입 아무값이 없을 때 0 삽입
if (ShortLogParamInfo.MEASURE.Length <= 0)
SetMakeLogRows[nProcPos]["MeasVal"] = Convert.ToDecimal(0);
else
{
//Measure 존재에 대한 값변환 시도 및 실패시 String 항목으로 삽입
decimal getMeasValue = decimal.Zero;
if (Decimal.TryParse(ShortLogParamInfo.MEASURE, out getMeasValue))
SetMakeLogRows[nProcPos]["MeasVal"] = getMeasValue;
else
{
//0 삽입 및 Str 에 >> 표시 및 Message 에 데이터 표시
SetMakeLogRows[nProcPos]["MeasVal"] = Convert.ToDecimal(0);
SetMakeLogRows[nProcPos]["MeasValStr"] = ">>";
SetMakeLogRows[nProcPos]["Message"] = ShortLogParamInfo.MEASURE;
}
}
}
//IS GLOBAL 이면 CpLog 에서 읽은 정보 삽입 아니면 VRFY 에서 읽은 정보 삽입
if (ShortLogParamInfo.GLOBAL_SPEC)
{
SetMakeLogRows[nProcPos]["GlobalMin"] = ShortLogParamInfo.MIN;
SetMakeLogRows[nProcPos]["GlobalMax"] = ShortLogParamInfo.MAX;
}
else
{
SetMakeLogRows[nProcPos]["GlobalMin"] = ShortLogParamInfo.VRFY_MIN;
SetMakeLogRows[nProcPos]["GlobalMax"] = ShortLogParamInfo.VRFY_MAX;
if (ShortLogParamInfo.VRFY_MIN.Length <= 0 &&
ShortLogParamInfo.VRFY_MAX.Length <= 0)
{
if (ShortLogParamInfo.MIN.Length > 0 ||
ShortLogParamInfo.MAX.Length > 0)
{
SetMakeLogRows[nProcPos]["GlobalMin"] = ShortLogParamInfo.MIN;
SetMakeLogRows[nProcPos]["GlobalMax"] = ShortLogParamInfo.MAX;
}
}
}
SetMakeLogRows[nProcPos]["Result"] = ShortLogParamInfo.CHECK;
SetMakeLogRows[nProcPos]["SpentTime"] = ShortLogParamInfo.SPENT_TIME;
nProcPos += 1;
}
private void RegisterCpLogLongData(ref int nProcPos, DataTable SetCpLogTable, DataSet dsVRFYInfo, DataRow dr, DataRow[] SetMakeLogRows)
{
string strGetMeasure = string.Empty;
@ -515,7 +633,7 @@ namespace SystemX.Net.MiddlewareUI
{
try
{
RegisterCpLogData(ref nProcPos, SetCpLogTable, dsVRFYInfo, dr, SetMakeLogRows);
RegisterCpLogShortData(ref nProcPos, SetCpLogTable, dsVRFYInfo, dr, SetMakeLogRows);
}
catch (Exception ex)
{
@ -579,7 +697,7 @@ namespace SystemX.Net.MiddlewareUI
{
try
{
RegisterCpLogData(ref nProcPos, SetCpLogTable, dsVRFYInfo, dr, SetMakeLogRows);
RegisterCpLogLongData(ref nProcPos, SetCpLogTable, dsVRFYInfo, dr, SetMakeLogRows);
}
catch (Exception ex)
{
@ -871,6 +989,11 @@ namespace SystemX.Net.MiddlewareUI
MessageOutput.ConsoleWrite(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss>>") + CPXV2_CpLogProcessInfo.strProcessDebugInfo + @" CPXV2 CpLogProcess Log make information failed. [SystemX.Net.MiddlewareUI : MainForm.CPXV2_CpLogProcess]", ConsoleColor.Yellow, LogMessageLevel.DEBUG);
}
Task<DataRow> tskLongTerm = null;
Stopwatch stMeasTime = new Stopwatch();
stMeasTime.Start();
try
{
//CpLog 파일 읽은 여부 확인
@ -885,9 +1008,6 @@ namespace SystemX.Net.MiddlewareUI
CommonProtocol cp = new CommonProtocol();
//Summary 테이블 다중 접근 방지(인덱스)
Stopwatch stMeasTime = new Stopwatch();
stMeasTime.Start();
DataSet ds = null;
bool hasRows = false;
@ -1090,7 +1210,6 @@ namespace SystemX.Net.MiddlewareUI
CPXV2_CpLogProcessInfo.strSection,
ref summaryItem);
Task<DataRow> tskLongTerm = null;
//if (MngDBConn.InfoConnection.UTSI_STATE == false)
//tskLongTerm = Task.Run(async () => await CpLogProcessLongTerm(iPos, GetMappedInfo, getCpLogHeader, dtLogData, summaryItem[1]));
@ -1106,18 +1225,41 @@ namespace SystemX.Net.MiddlewareUI
bDupLogSkipState = true;
if (tskLongTerm != null)
lstBulkLongTermLog.Add(tskLongTerm.Result);
return false;
}
//Summary 객체를 이용해 DB 삽입할 SqlCommand 생성
SqlCommand cmd = cp.LogDataSummaryInsert(MngDBLogConn.GetDBConnectInfo().ConnShortTerm.SUMMARY_TABLE, summaryItem[0]);
SqlCommand cmd = null;
//
try
{
cmd = cp.LogDataSummaryInsert(MngDBLogConn.GetDBConnectInfo().ConnShortTerm.SUMMARY_TABLE, summaryItem[0]);
}
catch
{
Type type = typeof(HISTLogSummary);
FieldInfo[] f = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
//Summary 삽입 > 실패시 처리
bProcessResult = ExcuteNonQueryStreamProcess(eConnCategory.ShortTerm, cmd);
StringBuilder sb = new StringBuilder();
foreach (FieldInfo item in f)
{
sb.AppendLine(item.Name.Substring(item.Name.IndexOf("<") + 1, item.Name.IndexOf(">") - item.Name.IndexOf("<") - 1)
+ ">>>" + item.GetValue(summaryItem[0]).ToString().Trim());
}
MessageOutput.ConsoleWrite(sb.ToString());
throw new Exception("<Failed Make " + MngDBLogConn.GetDBConnectInfo().ConnShortTerm.SUMMARY_TABLE + " LogDataSummaryInsert eConnCategory.ShortTerm>");
}
//
try
{
//Summary 삽입 > 실패시 처리
bProcessResult = ExcuteNonQueryStreamProcess(eConnCategory.ShortTerm, cmd);
}
catch
{
throw new Exception("<Failed ExcuteNonQueryStreamProcess eConnCategory.ShortTerm - " + cmd.CommandText + ">");
}
// TODO : SHM JSON
/*
try
@ -1214,7 +1356,15 @@ namespace SystemX.Net.MiddlewareUI
lstBulkShortTermLog.Add(SetProcLogDr);
}
}
catch (Exception e)
{
bProcessResult = false;
MessageOutput.ConsoleWrite(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss>>") + strProcessDebugInfo + @" CPXV2 Make CpLogProcess fail.[SystemX.Net.MiddlewareUI : MainForm.CPXV2_CpLogProcess]\r\n" + e.Message, ConsoleColor.Yellow, LogMessageLevel.DEBUG);
}
finally
{
if (tskLongTerm != null)
lstBulkLongTermLog.Add(tskLongTerm.Result);
@ -1228,15 +1378,7 @@ namespace SystemX.Net.MiddlewareUI
}
LogDataProcessText.Enqueue(new StringBuilder(">>[MainTime(ShortTerm)-MakeLogData][" + CPXV2_CpLogProcessInfo.lMainMeasTime + "][Include SubTime(LongTerm)-MakeLogData][" + CPXV2_CpLogProcessInfo.lLongTermMeasTime + "]\r\n"));
}
catch (Exception e)
{
bProcessResult = false;
MessageOutput.ConsoleWrite(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss>>") + strProcessDebugInfo + @" CPXV2 Make CpLogProcess fail.[SystemX.Net.MiddlewareUI : MainForm.CPXV2_CpLogProcess]\r\n" + e.Message, ConsoleColor.Yellow, LogMessageLevel.DEBUG);
}
finally
{
if (bDupLogSkipState == false)
{
if (bProcessResult)
@ -1288,23 +1430,63 @@ namespace SystemX.Net.MiddlewareUI
CommonProtocol cp = new CommonProtocol();
//Summary 객체를 이용해 DB 삽입할 SqlCommand 생성
SqlCommand cmd = cp.LogDataSummaryInsert(MngDBLogConn.GetDBConnectInfo().ConnLongTerm.SUMMARY_TABLE, summaryItem);
/*
Type type = typeof(HISTLogSummary);
FieldInfo[] f = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
StringBuilder sb = new StringBuilder();
foreach (FieldInfo item in f)
{
sb.AppendLine(item.Name.Substring(item.Name.IndexOf("<") + 1, item.Name.IndexOf(">") - item.Name.IndexOf("<") - 1)
+ "-" + item.GetValue(summaryItem).ToString().Trim());
}
MessageOutput.ConsoleWrite(sb.ToString());
*/
SqlCommand cmd = null;
//
try
{
cmd = cp.LogDataSummaryInsert(MngDBLogConn.GetDBConnectInfo().ConnLongTerm.SUMMARY_TABLE, summaryItem);
}
catch
{
Type type = typeof(HISTLogSummary);
FieldInfo[] f = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
StringBuilder sb = new StringBuilder();
foreach (FieldInfo item in f)
{
sb.AppendLine(item.Name.Substring(item.Name.IndexOf("<") + 1, item.Name.IndexOf(">") - item.Name.IndexOf("<") - 1)
+ ">>>" + item.GetValue(summaryItem).ToString().Trim());
}
MessageOutput.ConsoleWrite(sb.ToString());
throw new Exception("<Failed Make " + MngDBLogConn.GetDBConnectInfo().ConnLongTerm.SUMMARY_TABLE + " LogDataSummaryInsert eConnCategory.LongTerm>");
}
//
if (chkDataTsk.Result)
{
MessageOutput.ConsoleWrite(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss>>") + CPXV2_CpLogProcessInfo.strProcessDebugInfo +
@" CPXV2 LongTerm-CpLogProcess fail. Reason : LongTerm Duplicated Before CpLog-File. [SystemX.Net.MiddlewareUI : MainForm.CpLogProcessShortTerm]\r\n", ConsoleColor.Yellow, LogMessageLevel.DEBUG);
@" CPXV2 LongTerm-CpLogProcess fail. Reason : LongTerm Duplicated Before CpLog-File. [SystemX.Net.MiddlewareUI : MainForm.CPXV2_CpLogProcessLongTerm]\r\n", ConsoleColor.Yellow, LogMessageLevel.DEBUG);
return SetProcLogDr;
}
//Summary 삽입 > 실패시 처리
bProcessResult = ExcuteNonQueryStreamProcess(eConnCategory.LongTerm, cmd);
//
try
{
//Summary 삽입 > 실패시 처리
bProcessResult = ExcuteNonQueryStreamProcess(eConnCategory.LongTerm, cmd);
}
catch
{
throw new Exception("<Failed ExcuteNonQueryStreamProcess eConnCategory.LongTerm - " + cmd.CommandText + ">");
}
if (bProcessResult == false)
{
MessageOutput.ConsoleWrite(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss>>") + CPXV2_CpLogProcessInfo.strProcessDebugInfo +
@" CPXV2 CpLogProcess HIST_LogSummary insert failed. [SystemX.Net.MiddlewareUI : MainForm.CpLogProcessLongTerm]", ConsoleColor.Red, LogMessageLevel.FATAL);
@" CPXV2 CpLogProcess HIST_LogSummary insert failed. [SystemX.Net.MiddlewareUI : MainForm.CPXV2_CpLogProcessLongTerm]", ConsoleColor.Red, LogMessageLevel.FATAL);
throw new Exception();
}

View File

@ -315,6 +315,9 @@
<ItemGroup>
<Content Include="ALIS ICON.ico" />
<Content Include="AppIcon.ico" />
<Content Include="Cfg\DBConnInfo.xml" />
<Content Include="Cfg\LogInformation.xml" />
<Content Include="Cfg\MapLogOption.xml" />
<None Include="Resources\AppIcon1.ico" />
<None Include="Resources\AppIcon.ico" />
<None Include="Resources\CI.png" />