LogViewer B2 CEID=308,309 Name to ModelID

ServerLog ViewList.xml 내문서/DDUtility 폴더로 복제 및 사용
This commit is contained in:
jungwoois
2025-04-24 14:04:20 +09:00
parent de709d7030
commit 395102ffea
8 changed files with 238 additions and 245 deletions

View File

@@ -35,7 +35,7 @@
<WebPage>index.htm</WebPage>
<TrustUrlParameters>true</TrustUrlParameters>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>2025.04.09.1</ApplicationVersion>
<ApplicationVersion>2025.04.24.1</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>

View File

@@ -61,7 +61,7 @@ namespace DDUtilityApp.LOGPARSER.DATA
string value = string.Empty;
foreach(string name in this.DisplayNameOrder.Split(';'))
{
value = this.PropertyGet(name);
value = this.PropertyGet(name).ToString();
if (!string.IsNullOrEmpty(value)) break;
}
return value;

View File

@@ -794,7 +794,7 @@ namespace DDUtilityApp.LOGPARSER
string propertyName = values[0].Trim();
string valueB = values[1].Trim().Replace("'", "");
string valueA = data.PropertyGet(propertyName);
string valueA = data.PropertyGet(propertyName).ToString();
if (valueA != valueB) flag = false;
}

View File

@@ -566,7 +566,7 @@ namespace DDUtilityApp.LOGPARSER
string propertyName = values[0].Trim();
string valueB = values[1].Trim().Replace("'", "");
string valueA = data.PropertyGet(propertyName);
string valueA = data.PropertyGet(propertyName).ToString();
if (valueA != valueB) flag = false;
}

View File

@@ -609,11 +609,13 @@ namespace DDUtilityApp.LOGPARSER.PARSER
{
if (this.SECSDefine != null) this.SECSDefine.SetInformation(rootSECS);
this.LogString_Append(rootSECS.ToFullString());
string ceid = string.Empty;
// CEID
secsItem = rootSECS.GetItemByName("CEID").FirstOrDefault();
if (secsItem == null && rootSECS.ChildItems.Count == 3) secsItem = rootSECS[1];
standardData.Value = $"CEID: {secsItem.Value}" + (string.IsNullOrEmpty(secsItem.Description) ? "" : $" {secsItem.Description}");
ceid = secsItem.Value;
// LOTID
secsItems = rootSECS.GetItemByName("LOT_ID", "LOTID", "LotID", "LEFT_LOTID", "RIGHT_LOTID");
@@ -675,6 +677,15 @@ namespace DDUtilityApp.LOGPARSER.PARSER
standardData.ModuleID += item.Value;
}
// 308:ModuleIn, 309:ModuleOut 'Name' 항목을 추가한다.
if (new string[] { "308", "309" }.Contains(ceid))
secsItems = rootSECS.GetItemByName("NAME");
foreach (SECSItem item in secsItems)
{
if (!string.IsNullOrEmpty(standardData.ModuleID)) standardData.HostPanelID += " ";
standardData.ModuleID += item.Value;
}
this.SendStandardData.Add(standardData.SystemByte, standardData);
}

View File

@@ -7,6 +7,7 @@ using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -163,32 +164,40 @@ namespace DDUtilityApp.MESDOWNLOADER
DataRow[] rows = this.DSSetting.Tables["Item"].Select($"Server_Id='{server_Id}' AND name='{nameap}'");
foreach (DataRow row in rows)
{
string url = row["url"] as string;
string dir = row["dir"] as string;
string conkey = row["conkey"] as string;
string userId = this.GetUserIdFromConkey(conkey);
string password = this.GetPasswordFromConkey(conkey);
string currentPath = string.IsNullOrEmpty(subPath) ? dir : System.IO.Path.Combine(dir, subPath);
FtpsClient.Initialize(url, userId, password);
var files = FtpsClient.GetFtpsList(currentPath);
foreach (var file in files)
try
{
DataRow rowFile = this.DTFileInfo.NewRow();
rowFile["nameap"] = nameap;
rowFile["Name"] = file.Name;
rowFile["FileName"] = file.Name;
rowFile["Size"] = this.GetFileSize(file.Size, FileSizeType.MB);
rowFile["Modified"] = file.Modified.ToLocalTime();
rowFile["Type"] = file.Type;
rowFile["url"] = url;
rowFile["dir"] = dir;
rowFile["subpath"] = subPath;
rowFile["userId"] = userId;
rowFile["password"] = password;
this.DTFileInfo.Rows.Add(rowFile);
string url = row["url"] as string;
string dir = row["dir"] as string;
string conkey = row["conkey"] as string;
string userId = this.GetUserIdFromConkey(conkey);
string password = this.GetPasswordFromConkey(conkey);
string currentPath = string.IsNullOrEmpty(subPath) ? dir : System.IO.Path.Combine(dir, subPath);
FtpsClient.Initialize(url, userId, password);
var files = FtpsClient.GetFtpsList(currentPath);
foreach (var file in files)
{
DataRow rowFile = this.DTFileInfo.NewRow();
rowFile["nameap"] = nameap;
rowFile["Name"] = file.Name;
rowFile["FileName"] = file.Name;
rowFile["Size"] = this.GetFileSize(file.Size, FileSizeType.MB);
rowFile["Modified"] = file.Modified.ToLocalTime();
rowFile["Type"] = file.Type;
rowFile["url"] = url;
rowFile["dir"] = dir;
rowFile["subpath"] = subPath;
rowFile["userId"] = userId;
rowFile["password"] = password;
this.DTFileInfo.Rows.Add(rowFile);
}
}
catch
{
chk.Checked = false;
chk.Enabled = false;
}
}
}
@@ -484,15 +493,22 @@ namespace DDUtilityApp.MESDOWNLOADER
}
}
/// <summary>
/// XML 설정파일 로딩 및 CboxServer 셋팅
/// </summary>
/// <summary>
/// XML 설정파일 로딩 및 CboxServer 셋팅
/// </summary>
private void SetCboxServer()
{
try
{
string path = ConfigurationManager.AppSettings["BULK_VIEWER"];
this.DSSetting = XmlToDsConverter.ConvertXmlToDataSet(path);
string srcFileName = ConfigurationManager.AppSettings["BULK_VIEWER"];
string myFileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "DDUtility", "ViewList.xml");
if (!File.Exists(myFileName))
{
if (!File.Exists(srcFileName)) throw new FileNotFoundException($"Source file not found: {srcFileName}");
File.Copy(srcFileName, myFileName);
}
this.DSSetting = XmlToDsConverter.ConvertXmlToDataSet(myFileName);
if (this.DSSetting == null || this.DSSetting.Tables.Count < 1 || this.DSSetting.Tables.Contains("Server") == false)
{
MessageBox.Show("XML 데이터를 불러올 수 없습니다.", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
// 지정되도록 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2025.04.09.1")]
[assembly: AssemblyFileVersion("2025.04.09.1")]
[assembly: AssemblyVersion("2025.04.24.1")]
[assembly: AssemblyFileVersion("2025.04.24.1")]