Use MES (MES DB 연결옵션) 삭제

This commit is contained in:
2025-02-28 11:01:58 +09:00
parent 99363e9ee9
commit b44ffb7305
3 changed files with 68 additions and 68 deletions

View File

@@ -45,7 +45,6 @@
this.tboxEquipmentID = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.chkAllEquipment = new System.Windows.Forms.CheckBox();
this.chkUseMesDB = new System.Windows.Forms.CheckBox();
this.chkUseSMB = new System.Windows.Forms.CheckBox();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.panel4 = new System.Windows.Forms.Panel();
@@ -159,7 +158,6 @@
this.flowLayoutPanel2.Controls.Add(this.panel8);
this.flowLayoutPanel2.Controls.Add(this.panel9);
this.flowLayoutPanel2.Controls.Add(this.chkAllEquipment);
this.flowLayoutPanel2.Controls.Add(this.chkUseMesDB);
this.flowLayoutPanel2.Controls.Add(this.chkUseSMB);
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Top;
this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 34);
@@ -237,24 +235,14 @@
this.chkAllEquipment.Text = "모든설비";
this.chkAllEquipment.UseVisualStyleBackColor = true;
//
// chkUseMesDB
//
this.chkUseMesDB.AutoSize = true;
this.chkUseMesDB.Location = new System.Drawing.Point(802, 6);
this.chkUseMesDB.Name = "chkUseMesDB";
this.chkUseMesDB.Size = new System.Drawing.Size(71, 16);
this.chkUseMesDB.TabIndex = 4;
this.chkUseMesDB.Text = "MES DB";
this.chkUseMesDB.UseVisualStyleBackColor = true;
//
// chkUseSMB
//
this.chkUseSMB.AutoSize = true;
this.chkUseSMB.Location = new System.Drawing.Point(879, 6);
this.chkUseSMB.Location = new System.Drawing.Point(802, 6);
this.chkUseSMB.Name = "chkUseSMB";
this.chkUseSMB.Size = new System.Drawing.Size(77, 16);
this.chkUseSMB.Size = new System.Drawing.Size(148, 16);
this.chkUseSMB.TabIndex = 5;
this.chkUseSMB.Text = "Use SMB";
this.chkUseSMB.Text = "Use SMB(Only Local)";
this.chkUseSMB.UseVisualStyleBackColor = true;
//
// flowLayoutPanel1
@@ -552,10 +540,16 @@
//
// radStatusStrip1
//
this.radStatusStrip1.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.radStatusStrip1.Items.AddRange(new Telerik.WinControls.RadItem[] {
this.rstatus1});
this.radStatusStrip1.Location = new System.Drawing.Point(3, 574);
this.radStatusStrip1.Name = "radStatusStrip1";
//
//
//
this.radStatusStrip1.RootElement.ControlBounds = new System.Drawing.Rectangle(0, 0, 300, 24);
this.radStatusStrip1.RootElement.StretchVertically = true;
this.radStatusStrip1.Size = new System.Drawing.Size(1014, 26);
this.radStatusStrip1.TabIndex = 1;
//
@@ -648,7 +642,6 @@
private System.Windows.Forms.TextBox tboxEquipmentID;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.CheckBox chkAllEquipment;
private System.Windows.Forms.CheckBox chkUseMesDB;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private JWH.CONTROL.GridViewEx gridLogFiles;

View File

@@ -1,4 +1,13 @@
using System;
using DDUtilityApp.DATA;
using DDUtilityApp.LOGPARSER.DATA;
using DDUtilityApp.SECS;
using FluentFTP;
using JWH;
using JWH.CONTROL;
using JWH.DATA;
using JWH.NETWORK;
using Renci.SshNet.Sftp;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
@@ -9,20 +18,7 @@ using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using DDUtilityApp.DATA;
using DDUtilityApp.LOGPARSER.DATA;
using DDUtilityApp.SECS;
using JWH;
using JWH.CONTROL;
using JWH.DATA;
using Telerik.WinControls.UI;
//jhlim 20250202 start
using FluentFTP;
using JWH.NETWORK;
using Renci.SshNet;
using Renci.SshNet.Sftp;
//jhlim 20250202 end
namespace DDUtilityApp.LOGPARSER
{
@@ -46,7 +42,7 @@ namespace DDUtilityApp.LOGPARSER
public string EquipmentID { get; set; } = string.Empty;
public SECSDefine SECSDefine { get; set; } = null;
public SECSDefine SECSDefine { get; set; } = null;
#endregion
@@ -71,8 +67,6 @@ namespace DDUtilityApp.LOGPARSER
this.tboxName.ImeMode = ImeMode.Hangul;
this.tboxEquipmentID.ImeMode = ImeMode.Alpha;
this.chkAllEquipment.Checked = GlobalVariable.Instance.FrmEqSelector_AllEquipment;
this.chkUseMesDB.Checked = true; // GlobalVariable.Instance.FrmEqSelector_UseMesDB;
this.chkUseMesDB.Visible = false;
this.chkUseSMB.Checked = GlobalVariable.Instance.FrmEqSelector_UseSMB;
this.tabControl1.SelectedIndex = 0;
this.tboxModelDescription.Font = font;
@@ -169,7 +163,6 @@ namespace DDUtilityApp.LOGPARSER
foreach (GridViewColumn column in this.gridEquipments.Columns.OrderBy(x => x.Index))
if (column.IsVisible) sb.AppendFormat($"{column.Name};");
GlobalVariable.Instance.FrmEqSelector_GridEquipmentHeader = sb.ToString();
GlobalVariable.Instance.FrmEqSelector_UseMesDB = this.chkUseMesDB.Checked;
GlobalVariable.Instance.FrmEqSelector_UseSMB = this.chkUseSMB.Checked;
GlobalVariable.Instance.SaveSetting();
@@ -189,7 +182,7 @@ namespace DDUtilityApp.LOGPARSER
EisEquipment[] equipments = this.GetEquipments();
if (this.chkAllEquipment.Checked == false)
equipments = equipments.Where(x => x.MesRegistration).ToArray();
this.gridEquipments.AutoBinding(equipments);
}
catch (Exception ex)
@@ -309,7 +302,7 @@ namespace DDUtilityApp.LOGPARSER
grid.TableElement.RowHeight = 20;
grid.MultiSelect = true;
Dictionary<string,string> dicColumnText = new Dictionary<string,string>();
Dictionary<string, string> dicColumnText = new Dictionary<string, string>();
dicColumnText.Add("Facility", "");
dicColumnText.Add("Line", "");
dicColumnText.Add("EquipmentID", "");
@@ -340,7 +333,7 @@ namespace DDUtilityApp.LOGPARSER
string columnText = string.Empty;
if (string.IsNullOrEmpty(columnNames) == false)
{
foreach (string columnName in columnNames.Split(new string[] {";"}, StringSplitOptions.RemoveEmptyEntries))
foreach (string columnName in columnNames.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries))
{
columnText = columnName;
if (dicColumnText.ContainsKey(columnName))
@@ -353,7 +346,7 @@ namespace DDUtilityApp.LOGPARSER
}
}
foreach(string columnName in dicColumnText.Keys)
foreach (string columnName in dicColumnText.Keys)
{
columnText = columnName;
if (string.IsNullOrEmpty(dicColumnText[columnName]) == false) columnText = dicColumnText[columnName];
@@ -447,7 +440,7 @@ namespace DDUtilityApp.LOGPARSER
//StpClientWrap.Initialize(equipment?.LogServerIP, "test", "daeduck!1");
//StpClientWrap.Connect();
var svrInfo = (DDUtilityApp.DATA.Account)GetNetworkAccount(equipment?.LogServerIP);
FtpsClient.Initialize(equipment?.LogServerIP, svrInfo.UserID , svrInfo.Password);
FtpsClient.Initialize(equipment?.LogServerIP, svrInfo.UserID, svrInfo.Password);
FtpsClient.Connect();
var remotePath = $"/{svrInfo.DefaultPath}/{equipment.EquipmentID}";
@@ -476,7 +469,7 @@ namespace DDUtilityApp.LOGPARSER
}
}
this.gridLogFiles.AutoBinding(GetFtpslogFiles(rtnObj));
this.gridLogFiles.AutoBinding(GetFtpslogFiles(rtnObj));
// 연결 종료 //jhlim 20250202
//StpClientWrap.Disconnect();
@@ -668,6 +661,12 @@ namespace DDUtilityApp.LOGPARSER
XLogger.Instance.Fatal(ex);
}
}
/// <summary>
/// Workflow, HSMS 파일목록 Grid
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Grid_KeyDown(object sender, KeyEventArgs e) //jhlim 20250202
{
if (e.KeyCode == Keys.Enter)
@@ -676,6 +675,11 @@ namespace DDUtilityApp.LOGPARSER
}
}
/// <summary>
/// Workflow, HSMS 파일 Download
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Grid_CellDoubleClick(object sender, GridViewCellEventArgs e) //jhlim 20250202
{
RadGridView gd = sender.GetType().Name.Contains("GridDataCellElement") ?
@@ -700,6 +704,7 @@ namespace DDUtilityApp.LOGPARSER
XLogger.Instance.Fatal(ex, true);
}
}
#endregion
#region [ GridModelDetail ] -------------------------------------------
@@ -731,7 +736,7 @@ namespace DDUtilityApp.LOGPARSER
{
try
{
LogServer logServer = this.cboxServer.SelectedItem as LogServer;
if (logServer == null) return null;
this.LogServer = logServer;
@@ -909,7 +914,7 @@ namespace DDUtilityApp.LOGPARSER
logServer.NetworkAccount.Add("192.168.115.218", new Account("192.168.7.218", "test", "daeduck!1", @"EISLog"));
logServer.NetworkAccount.Add("192.168.115.219", new Account("192.168.7.219", "test", "daeduck!1", @"EISLog"));
logServer.NetworkAccount.Add("192.168.7.150", new Account("192.168.7.150", "test", "daeduck!1", @"EIS서버"));
logServer.NetworkAccount.Add("192.168.113.231", new Account("192.168.113.231", "test", "daeduck!1", @"EISLog"));
logServer.NetworkAccount.Add("192.168.113.232", new Account("192.168.113.232", "test", "daeduck!1", @"EISLog"));
@@ -1007,7 +1012,7 @@ namespace DDUtilityApp.LOGPARSER
equipment.LastTrackOutLotID = row["LASTTRACKOUTLOTID"].ToString();
equipment.Maker = row["MAKER"].ToString();
DateTime pmDateTime = DateTime.MinValue;
if (DateTime.TryParseExact(row["PLANDATE"].ToString(), "yyyyMMddHHmmss", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, out pmDateTime))
if (DateTime.TryParseExact(row["PLANDATE"].ToString(), "yyyyMMddHHmmss", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, out pmDateTime))
equipment.PMDate = pmDateTime;
equipment.MesRegistration = true;
}
@@ -1125,7 +1130,7 @@ namespace DDUtilityApp.LOGPARSER
private object GetNetworkAccount(string logserverIP) //jhim 20250202
{
return ((LogServer) this.cboxServer.SelectedItem)?.NetworkAccount[logserverIP];
return ((LogServer)this.cboxServer.SelectedItem)?.NetworkAccount[logserverIP];
}
private void GetGEMSetting()
@@ -1183,29 +1188,15 @@ namespace DDUtilityApp.LOGPARSER
query.AppendLine($" A.EQPSTATE, ");
query.AppendLine($" A.LOCATION ");
if (this.chkUseMesDB.Checked)
{
connectionString = $@"server=192.168.8.232;database=ddmes;uid=DDB2MESAdmin;pwd=Yhqe4csJXJ4W5$%;";
connectionString = $@"server=192.168.8.232;database=ddmes;uid=DDB2MESAdmin;pwd=Yhqe4csJXJ4W5$%;";
query.AppendLine($" , E.PLANDATE ");
query.AppendLine($" FROM CIM_EQUIPMENT A (nolock) ");
query.AppendLine($" LEFT JOIN CIM_PROCESSSEGMENT B (nolock) ON A.PROCESSSEGMENTID = B.PROCESSSEGMENTID AND A.SITEID = B.SITEID ");
query.AppendLine($" LEFT JOIN CIM_EQUIPMENT C (nolock) ON A.PARENTID = C.EQUIPMENTID AND A.SITEID = C.SITEID ");
query.AppendLine($" LEFT JOIN CIM_FACILITY D (nolock) ON A.PHYSICALLOCATION = D.FACILITYID AND A.SITEID = D.SITEID ");
query.AppendLine($" LEFT JOIN (SELECT SITEID, EQUIPMENTID, MIN(PLANSTART) PLANDATE FROM DD_SEGMENTPMDETAIL (nolock) WHERE PLANSTART >= '{DateTime.Now.ToString("yyyyMMdd")}' GROUP BY SITEID, EQUIPMENTID) E ON A.EQUIPMENTID = E.EQUIPMENTID AND A.SITEID = E.SITEID ");
//query.AppendLine($" WHERE A.SITEID='1130' ");
}
else
{
connectionString = this.LogServer.DBConnectionString;
query.AppendLine($" , '' PLANDATE ");
query.AppendLine($" FROM [DBLINKMES].[ddmes].[dbo].[CIM_EQUIPMENT] A ");
query.AppendLine($" LEFT JOIN [DBLINKMES].[ddmes].[dbo].[CIM_PROCESSSEGMENT] B (nolock) ON A.PROCESSSEGMENTID = B.PROCESSSEGMENTID AND A.SITEID = B.SITEID ");
query.AppendLine($" LEFT JOIN [DBLINKMES].[ddmes].[dbo].[CIM_EQUIPMENT] C (nolock) ON A.PARENTID = C.EQUIPMENTID AND A.SITEID = C.SITEID ");
query.AppendLine($" LEFT JOIN [DBLINKMES].[ddmes].[dbo].[CIM_FACILITY] D (nolock) ON A.PHYSICALLOCATION = D.FACILITYID AND A.SITEID = D.SITEID ");
//query.AppendLine($" WHERE A.SITEID='1130' ");
}
query.AppendLine($" , E.PLANDATE ");
query.AppendLine($" FROM CIM_EQUIPMENT A (nolock) ");
query.AppendLine($" LEFT JOIN CIM_PROCESSSEGMENT B (nolock) ON A.PROCESSSEGMENTID = B.PROCESSSEGMENTID AND A.SITEID = B.SITEID ");
query.AppendLine($" LEFT JOIN CIM_EQUIPMENT C (nolock) ON A.PARENTID = C.EQUIPMENTID AND A.SITEID = C.SITEID ");
query.AppendLine($" LEFT JOIN CIM_FACILITY D (nolock) ON A.PHYSICALLOCATION = D.FACILITYID AND A.SITEID = D.SITEID ");
query.AppendLine($" LEFT JOIN (SELECT SITEID, EQUIPMENTID, MIN(PLANSTART) PLANDATE FROM DD_SEGMENTPMDETAIL (nolock) WHERE PLANSTART >= '{DateTime.Now.ToString("yyyyMMdd")}' GROUP BY SITEID, EQUIPMENTID) E ON A.EQUIPMENTID = E.EQUIPMENTID AND A.SITEID = E.SITEID ");
//query.AppendLine($" WHERE A.SITEID='1130' ");
sqlConnection = new SqlConnection();
sqlConnection.ConnectionString = connectionString;
@@ -1239,8 +1230,6 @@ namespace DDUtilityApp.LOGPARSER
}
}
#endregion
}

View File

@@ -117,6 +117,24 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="gridEquipments.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="gridLogFiles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>155, 17</value>
</metadata>
<metadata name="gridModelDetail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>273, 17</value>
</metadata>
<metadata name="gridWorkflow.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>413, 17</value>
</metadata>
<metadata name="gridHsms.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>539, 17</value>
</metadata>
<metadata name="radStatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>644, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>