上传设备状态

This commit is contained in:
liming 蔡
2026-07-31 20:01:04 +08:00
parent a7d1772d49
commit a31acafd88
11 changed files with 247 additions and 18 deletions
+2 -1
View File
@@ -23,7 +23,8 @@ ResultProcessMesUrl=http://10.22.167.2/core/api/public/product/process/param/new
StationArrivalUrl=http://10.22.167.2/core/api/public/formation/section/arrival/bz StationArrivalUrl=http://10.22.167.2/core/api/public/formation/section/arrival/bz
StationExitUrl=http://10.22.167.2/core/api/public/eve/pm/formation-section/bz StationExitUrl=http://10.22.167.2/core/api/public/eve/pm/formation-section/bz
LoginMesUrl=http://10.22.167.2/core/api/public/equipment/base/user/permission/verify LoginMesUrl=http://10.22.167.2/core/api/public/equipment/base/user/permission/verify
EquipAlarmUrl=http://127.0.0.1 EquipAlarmUrl=http://10.22.167.2/core/api/public/equipment/alarm/currency
EquipStatusUrl=http://10.22.167.2/api/public/eve/pm/eqm/run/status/operation
NGMessage=不分类,正面(2D/3D),反面(2D/3D),左侧面(2D/3D),右侧面(2D/3D),顶面(2D/3D),底面(2D/3D),底WE2,底WE2,底WE3,底WE4,中ME1,中ME2,中ME3,中ME1,极柱(POS/NEG),防爆阀(PRO),扫码NG,分档NG,其他 NGMessage=不分类,正面(2D/3D),反面(2D/3D),左侧面(2D/3D),右侧面(2D/3D),顶面(2D/3D),底面(2D/3D),底WE2,底WE2,底WE3,底WE4,中ME1,中ME2,中ME3,中ME1,极柱(POS/NEG),防爆阀(PRO),扫码NG,分档NG,其他
CCDResultMessage=不分类,NG,OK CCDResultMessage=不分类,NG,OK
Grading1=K77 Grading1=K77
+3
View File
@@ -37,6 +37,7 @@ namespace JY.Inspection.Frm
tb_stationExit.DataBindings.Add(new Binding("Text", bindingSource1, "StationExitUrl", true, DataSourceUpdateMode.OnPropertyChanged)); tb_stationExit.DataBindings.Add(new Binding("Text", bindingSource1, "StationExitUrl", true, DataSourceUpdateMode.OnPropertyChanged));
tb_loginMes.DataBindings.Add(new Binding("Text", bindingSource1, "LoginMesUrl", true, DataSourceUpdateMode.OnPropertyChanged)); tb_loginMes.DataBindings.Add(new Binding("Text", bindingSource1, "LoginMesUrl", true, DataSourceUpdateMode.OnPropertyChanged));
tb_euipAlarm.DataBindings.Add(new Binding("Text", bindingSource1, "EquipAlarmUrl", true, DataSourceUpdateMode.OnPropertyChanged)); tb_euipAlarm.DataBindings.Add(new Binding("Text", bindingSource1, "EquipAlarmUrl", true, DataSourceUpdateMode.OnPropertyChanged));
tb_euipStatus.DataBindings.Add(new Binding("Text", bindingSource1, "EquipStatusUrl", true, DataSourceUpdateMode.OnPropertyChanged));
} }
#endregion #endregion
@@ -60,6 +61,7 @@ namespace JY.Inspection.Frm
_viewModel.StationExitUrl = IniFileHelper.ReadIniData("MES配置", "StationExitUrl"); _viewModel.StationExitUrl = IniFileHelper.ReadIniData("MES配置", "StationExitUrl");
_viewModel.LoginMesUrl = IniFileHelper.ReadIniData("MES配置", "LoginMesUrl"); _viewModel.LoginMesUrl = IniFileHelper.ReadIniData("MES配置", "LoginMesUrl");
_viewModel.EquipAlarmUrl = IniFileHelper.ReadIniData("MES配置", "EquipAlarmUrl"); _viewModel.EquipAlarmUrl = IniFileHelper.ReadIniData("MES配置", "EquipAlarmUrl");
_viewModel.EquipStatusUrl = IniFileHelper.ReadIniData("MES配置", "EquipStatusUrl");
LoginTime.Text = IniFileHelper.ReadIniData("MES配置", "LoginTime"); LoginTime.Text = IniFileHelper.ReadIniData("MES配置", "LoginTime");
txtMesRequestTime.Text = IniFileHelper.ReadIniData("MES配置", "MesRequestTime"); txtMesRequestTime.Text = IniFileHelper.ReadIniData("MES配置", "MesRequestTime");
@@ -87,6 +89,7 @@ namespace JY.Inspection.Frm
IniFileHelper.WriteIniData("MES配置", "StationExitUrl", _viewModel.StationExitUrl.Trim()); IniFileHelper.WriteIniData("MES配置", "StationExitUrl", _viewModel.StationExitUrl.Trim());
IniFileHelper.WriteIniData("MES配置", "LoginMesUrl", _viewModel.LoginMesUrl.Trim()); IniFileHelper.WriteIniData("MES配置", "LoginMesUrl", _viewModel.LoginMesUrl.Trim());
IniFileHelper.WriteIniData("MES配置", "EquipAlarmUrl", _viewModel.EquipAlarmUrl.Trim()); IniFileHelper.WriteIniData("MES配置", "EquipAlarmUrl", _viewModel.EquipAlarmUrl.Trim());
IniFileHelper.WriteIniData("MES配置", "EquipStatusUrl", _viewModel.EquipStatusUrl.Trim());
IniFileHelper.WriteIniData("MES配置", "LoginTime", LoginTime.Text.Trim()); IniFileHelper.WriteIniData("MES配置", "LoginTime", LoginTime.Text.Trim());
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置权限超时时间[{LoginTime.Text.Trim()}]", LogAddtype.local, Logtype.Warning); LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置权限超时时间[{LoginTime.Text.Trim()}]", LogAddtype.local, Logtype.Warning);
+58 -9
View File
@@ -69,6 +69,8 @@ namespace JY.Inspection.Frm
this.linkLabel_editCollectItemCfg = new System.Windows.Forms.LinkLabel(); this.linkLabel_editCollectItemCfg = new System.Windows.Forms.LinkLabel();
this.chkIsMesUP = new System.Windows.Forms.CheckBox(); this.chkIsMesUP = new System.Windows.Forms.CheckBox();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.metroLabel12 = new MetroFramework.Controls.MetroLabel();
this.tb_euipStatus = new MetroFramework.Controls.MetroTextBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.metroPanel_mid.SuspendLayout(); this.metroPanel_mid.SuspendLayout();
this.metroPanel_top.SuspendLayout(); this.metroPanel_top.SuspendLayout();
@@ -368,17 +370,20 @@ namespace JY.Inspection.Frm
this.groupBox1.Controls.Add(this.metroPanel_mid); this.groupBox1.Controls.Add(this.metroPanel_mid);
this.groupBox1.Controls.Add(this.metroPanel_top); this.groupBox1.Controls.Add(this.metroPanel_top);
this.groupBox1.Controls.Add(this.metroPanel_bottom); this.groupBox1.Controls.Add(this.metroPanel_bottom);
this.groupBox1.Location = new System.Drawing.Point(31, 79); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox1.Location = new System.Drawing.Point(27, 75);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4); this.groupBox1.Margin = new System.Windows.Forms.Padding(4);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4); this.groupBox1.Padding = new System.Windows.Forms.Padding(4);
this.groupBox1.Size = new System.Drawing.Size(959, 615); this.groupBox1.Size = new System.Drawing.Size(981, 651);
this.groupBox1.TabIndex = 36; this.groupBox1.TabIndex = 36;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "MES配置"; this.groupBox1.Text = "MES配置";
// //
// metroPanel_mid // metroPanel_mid
// //
this.metroPanel_mid.Controls.Add(this.tb_euipStatus);
this.metroPanel_mid.Controls.Add(this.metroLabel12);
this.metroPanel_mid.Controls.Add(this.tb_euipAlarm); this.metroPanel_mid.Controls.Add(this.tb_euipAlarm);
this.metroPanel_mid.Controls.Add(this.metroLabel11); this.metroPanel_mid.Controls.Add(this.metroLabel11);
this.metroPanel_mid.Controls.Add(this.tb_loginMes); this.metroPanel_mid.Controls.Add(this.tb_loginMes);
@@ -398,7 +403,7 @@ namespace JY.Inspection.Frm
this.metroPanel_mid.Location = new System.Drawing.Point(4, 226); this.metroPanel_mid.Location = new System.Drawing.Point(4, 226);
this.metroPanel_mid.Margin = new System.Windows.Forms.Padding(4); this.metroPanel_mid.Margin = new System.Windows.Forms.Padding(4);
this.metroPanel_mid.Name = "metroPanel_mid"; this.metroPanel_mid.Name = "metroPanel_mid";
this.metroPanel_mid.Size = new System.Drawing.Size(951, 269); this.metroPanel_mid.Size = new System.Drawing.Size(973, 305);
this.metroPanel_mid.TabIndex = 186; this.metroPanel_mid.TabIndex = 186;
this.metroPanel_mid.VerticalScrollbar = true; this.metroPanel_mid.VerticalScrollbar = true;
this.metroPanel_mid.VerticalScrollbarBarColor = true; this.metroPanel_mid.VerticalScrollbarBarColor = true;
@@ -598,7 +603,7 @@ namespace JY.Inspection.Frm
this.metroPanel_top.Location = new System.Drawing.Point(4, 22); this.metroPanel_top.Location = new System.Drawing.Point(4, 22);
this.metroPanel_top.Margin = new System.Windows.Forms.Padding(4); this.metroPanel_top.Margin = new System.Windows.Forms.Padding(4);
this.metroPanel_top.Name = "metroPanel_top"; this.metroPanel_top.Name = "metroPanel_top";
this.metroPanel_top.Size = new System.Drawing.Size(951, 204); this.metroPanel_top.Size = new System.Drawing.Size(973, 204);
this.metroPanel_top.TabIndex = 185; this.metroPanel_top.TabIndex = 185;
this.metroPanel_top.VerticalScrollbarBarColor = true; this.metroPanel_top.VerticalScrollbarBarColor = true;
this.metroPanel_top.VerticalScrollbarHighlightOnWheel = false; this.metroPanel_top.VerticalScrollbarHighlightOnWheel = false;
@@ -720,7 +725,7 @@ namespace JY.Inspection.Frm
// metroLabel22 // metroLabel22
// //
this.metroLabel22.AutoSize = true; this.metroLabel22.AutoSize = true;
this.metroLabel22.Location = new System.Drawing.Point(504, 159); this.metroLabel22.Location = new System.Drawing.Point(511, 159);
this.metroLabel22.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.metroLabel22.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.metroLabel22.Name = "metroLabel22"; this.metroLabel22.Name = "metroLabel22";
this.metroLabel22.Size = new System.Drawing.Size(114, 20); this.metroLabel22.Size = new System.Drawing.Size(114, 20);
@@ -731,7 +736,7 @@ namespace JY.Inspection.Frm
// metroLabel20 // metroLabel20
// //
this.metroLabel20.AutoSize = true; this.metroLabel20.AutoSize = true;
this.metroLabel20.Location = new System.Drawing.Point(469, 66); this.metroLabel20.Location = new System.Drawing.Point(477, 66);
this.metroLabel20.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.metroLabel20.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.metroLabel20.Name = "metroLabel20"; this.metroLabel20.Name = "metroLabel20";
this.metroLabel20.Size = new System.Drawing.Size(141, 20); this.metroLabel20.Size = new System.Drawing.Size(141, 20);
@@ -749,10 +754,10 @@ namespace JY.Inspection.Frm
this.metroPanel_bottom.HorizontalScrollbarBarColor = true; this.metroPanel_bottom.HorizontalScrollbarBarColor = true;
this.metroPanel_bottom.HorizontalScrollbarHighlightOnWheel = false; this.metroPanel_bottom.HorizontalScrollbarHighlightOnWheel = false;
this.metroPanel_bottom.HorizontalScrollbarSize = 12; this.metroPanel_bottom.HorizontalScrollbarSize = 12;
this.metroPanel_bottom.Location = new System.Drawing.Point(4, 495); this.metroPanel_bottom.Location = new System.Drawing.Point(4, 531);
this.metroPanel_bottom.Margin = new System.Windows.Forms.Padding(4); this.metroPanel_bottom.Margin = new System.Windows.Forms.Padding(4);
this.metroPanel_bottom.Name = "metroPanel_bottom"; this.metroPanel_bottom.Name = "metroPanel_bottom";
this.metroPanel_bottom.Size = new System.Drawing.Size(951, 116); this.metroPanel_bottom.Size = new System.Drawing.Size(973, 116);
this.metroPanel_bottom.TabIndex = 187; this.metroPanel_bottom.TabIndex = 187;
this.metroPanel_bottom.VerticalScrollbarBarColor = true; this.metroPanel_bottom.VerticalScrollbarBarColor = true;
this.metroPanel_bottom.VerticalScrollbarHighlightOnWheel = false; this.metroPanel_bottom.VerticalScrollbarHighlightOnWheel = false;
@@ -781,11 +786,53 @@ namespace JY.Inspection.Frm
this.chkIsMesUP.Text = "开启MES模式"; this.chkIsMesUP.Text = "开启MES模式";
this.chkIsMesUP.UseVisualStyleBackColor = true; this.chkIsMesUP.UseVisualStyleBackColor = true;
// //
// metroLabel12
//
this.metroLabel12.AutoSize = true;
this.metroLabel12.Location = new System.Drawing.Point(41, 269);
this.metroLabel12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.metroLabel12.Name = "metroLabel12";
this.metroLabel12.Size = new System.Drawing.Size(144, 20);
this.metroLabel12.TabIndex = 44;
this.metroLabel12.Text = "设备状态接口地址:";
//
// tb_euipStatus
//
//
//
//
this.tb_euipStatus.CustomButton.Image = null;
this.tb_euipStatus.CustomButton.Location = new System.Drawing.Point(671, 1);
this.tb_euipStatus.CustomButton.Margin = new System.Windows.Forms.Padding(4);
this.tb_euipStatus.CustomButton.Name = "";
this.tb_euipStatus.CustomButton.Size = new System.Drawing.Size(27, 27);
this.tb_euipStatus.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
this.tb_euipStatus.CustomButton.TabIndex = 1;
this.tb_euipStatus.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
this.tb_euipStatus.CustomButton.UseSelectable = true;
this.tb_euipStatus.CustomButton.Visible = false;
this.tb_euipStatus.Lines = new string[0];
this.tb_euipStatus.Location = new System.Drawing.Point(235, 260);
this.tb_euipStatus.Margin = new System.Windows.Forms.Padding(4);
this.tb_euipStatus.MaxLength = 32767;
this.tb_euipStatus.Name = "tb_euipStatus";
this.tb_euipStatus.PasswordChar = '\0';
this.tb_euipStatus.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.tb_euipStatus.SelectedText = "";
this.tb_euipStatus.SelectionLength = 0;
this.tb_euipStatus.SelectionStart = 0;
this.tb_euipStatus.ShortcutsEnabled = true;
this.tb_euipStatus.Size = new System.Drawing.Size(699, 29);
this.tb_euipStatus.TabIndex = 45;
this.tb_euipStatus.UseSelectable = true;
this.tb_euipStatus.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
this.tb_euipStatus.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
//
// FormMesDataSet // FormMesDataSet
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1017, 722); this.ClientSize = new System.Drawing.Size(1035, 751);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4); this.Margin = new System.Windows.Forms.Padding(4);
@@ -849,5 +896,7 @@ namespace JY.Inspection.Frm
private MetroFramework.Controls.MetroTextBox tb_loginMes; private MetroFramework.Controls.MetroTextBox tb_loginMes;
private MetroFramework.Controls.MetroTextBox tb_euipAlarm; private MetroFramework.Controls.MetroTextBox tb_euipAlarm;
private MetroFramework.Controls.MetroLabel metroLabel11; private MetroFramework.Controls.MetroLabel metroLabel11;
private MetroFramework.Controls.MetroTextBox tb_euipStatus;
private MetroFramework.Controls.MetroLabel metroLabel12;
} }
} }
+25 -6
View File
@@ -2815,14 +2815,14 @@ namespace JY.Inspection
strStatues = ""; strStatues = "";
while (true) while (true)
{ {
//SendStatus(); SendStatus();
Thread.Sleep(1000); Thread.Sleep(1000);
} }
} }
/// <summary> /// <summary>
/// 设备状态上传 /// TODO 设备状态上传 上传时机
/// </summary> /// </summary>
/// <param name="mt"></param> /// <param name="mt"></param>
@@ -2883,24 +2883,43 @@ namespace JY.Inspection
if (Global.systemConfig.isUpMes) if (Global.systemConfig.isUpMes)
{ {
string strJosn = JsonConvert.SerializeObject(Status); ReqEquipStatus req = new ReqEquipStatus()
{
SiteCode = Global.systemConfig.siteCode,
LineCode = Global.systemConfig.lineCode,
EquipNum = Global.systemConfig.equipCode,
MaterialCode = Global.systemConfig.materialCode,
UserName = Global.systemConfig.userName,
SeatId = string.Empty,
RecordDate = Status.recordDate,
StatusCode = Status.statusCode,
UploadTime = Status.uploadTime,
Guid = Status.guid,
FaultCodeList = new List<FaultCodeInfo>() {
new FaultCodeInfo() { FaultCode = string.Empty }
}
};
//string strJosn = JsonConvert.SerializeObject(req);
// LogManagerControl.AddLog($"PC->FMS[MES_Status]:{strJosn}", LogAddtype.MES); // LogManagerControl.AddLog($"PC->FMS[MES_Status]:{strJosn}", LogAddtype.MES);
//TxtHelper.WriteTxt($@"{Global.strMesLogspath}\{DateTime.Now.ToString("yyyyMMdd")}\设备运行状态\{DateTime.Now.ToString("HH")}.txt", strJosn); //TxtHelper.WriteTxt($@"{Global.strMesLogspath}\{DateTime.Now.ToString("yyyyMMdd")}\设备运行状态\{DateTime.Now.ToString("HH")}.txt", strJosn);
Stopwatch swTime = new Stopwatch(); Stopwatch swTime = new Stopwatch();
swTime.Start(); swTime.Start();
var result = JY.MES.FMS.MesHelper_EVE.MES_Status(Status); //var result = JY.MES.FMS.MesHelper_EVE.MES_Status(Status);
MesCallResult<RespEquipStatus> result = new MESDataCombin().UpEquipStatus(req);
swTime.Stop(); swTime.Stop();
LogManagerControl.AddLog($"处理设备状态上报FMS耗时:{swTime.ElapsedMilliseconds}ms", LogAddtype.local, Logtype.Message); LogManagerControl.AddLog($"处理设备状态上报FMS耗时:{swTime.ElapsedMilliseconds}ms", LogAddtype.local, Logtype.Message);
if (result != null) if (result != null)
{ {
string strRes = "code" + "[" + result.code + "]" + "success" + "[" + result.success + "]" + "message" + "[" + result.message + "]" + "category" + "[" + result.category + "]"; string strRes = "code" + "[" + result?.OriResponse.Code + "]" + "success" + "[" + result?.OriResponse.Success + "]" + "message" + "[" + result?.OriResponse.Message + "]" + "category" + "[" + result?.OriResponse.Category + "]";
LogManagerControl.AddLog($"FMS->PC[MES_Status]:{strRes}", LogAddtype.MES); LogManagerControl.AddLog($"FMS->PC[MES_Status]:{strRes}", LogAddtype.MES);
} }
else else
{ {
LogManagerControl.AddLog($"设备状态上报FMS出错", LogAddtype.local, Logtype.Message); LogManagerControl.AddLog($"设备状态上报MES出错", LogAddtype.local, Logtype.Message);
} }
} }
+48 -2
View File
@@ -52,9 +52,10 @@ namespace JY.Inspection.Mes
MesCallResult<RespLoginMes> LoginMes(ReqLoginMes req); MesCallResult<RespLoginMes> LoginMes(ReqLoginMes req);
// TODO 上传设备状态信息 // 上传设备状态信息
MesCallResult<RespEquipStatus> UpEquipStatus(ReqEquipStatus req);
// TODO 上传设备报警信息 // 上传设备报警信息
MesCallResult<RespAlarm> UpAlarmData(ReqAlarm req); MesCallResult<RespAlarm> UpAlarmData(ReqAlarm req);
// TODO 能耗 // TODO 能耗
@@ -470,5 +471,50 @@ namespace JY.Inspection.Mes
return resp; return resp;
} }
public MesCallResult<RespEquipStatus> UpEquipStatus(ReqEquipStatus req)
{
if (req == null)
{
throw new ArgumentNullException("MES设备状态信息为空");
}
// MES登录请求地址
DateTime currentTime = DateTime.Now;
// 设备状态URL
string reqUrl = Global.systemConfig.EquipStatusUrl;
MesCallResult<RespEquipStatus> resp = new MesCallResult<RespEquipStatus>();
try
{
string reqJsonStr = JsonHelper.Serialize(req);
var sw = new Stopwatch();
sw.Start();
string mesRes = MESApiHelper.HttpPostJsonAPI(
reqUrl,
reqJsonStr,
Global.systemConfig.MesRequestTime
);
resp = MESApiHelper.HttpPostJsonAPI<RespEquipStatus>(reqUrl, reqJsonStr, Global.systemConfig.MesRequestTime);
sw.Stop();
if (resp?.OriResponse != null && resp?.OriResponse.Success != true)
{
resp.IsSuccess = false;
resp.ErrorType = MesErrorType.BusinessError;
resp.ErrorMessage = resp?.OriResponse?.Message ?? "MES业务处理失败, 错误消息为空";
}
new MesLog().LogEqupStatus(currentTime, reqJsonStr, resp.OriRespJsonStr, sw.ElapsedMilliseconds);
}
catch (Exception ex)
{
resp.IsSuccess = false;
resp.ErrorType = MesErrorType.ClientError;
resp.ErrorMessage = "上传设备状态信息异常:" + ex.Message;
}
return resp;
}
} }
} }
+9
View File
@@ -19,6 +19,8 @@ namespace JY.Inspection.Mes
void LogLoginMes(DateTime curTime, string reqJsonStr, string respMes, long costTime); void LogLoginMes(DateTime curTime, string reqJsonStr, string respMes, long costTime);
void LogEqupAlarmInfo(DateTime curTime, string reqJsonStr, string respMes, long costTime); void LogEqupAlarmInfo(DateTime curTime, string reqJsonStr, string respMes, long costTime);
void LogEqupStatus(DateTime curTime, string reqJsonStr, string respMes, long costTime);
} }
public class MesLog : IMesLog public class MesLog : IMesLog
@@ -80,5 +82,12 @@ namespace JY.Inspection.Mes
LogoutAction(actionName, curTime, reqJsonStr, respMes, costTime); LogoutAction(actionName, curTime, reqJsonStr, respMes, costTime);
} }
public void LogEqupStatus(DateTime curTime, string reqJsonStr, string respMes, long costTime)
{
string actionName = "设备状态";
LogoutAction(actionName, curTime, reqJsonStr, respMes, costTime);
}
} }
} }
@@ -68,7 +68,16 @@ namespace JY.Inspection.ViewModel
set { equipAlarmUrl = value; OnPropertyChanged(); } set { equipAlarmUrl = value; OnPropertyChanged(); }
} }
private string equipStatusUrl;
/// <summary>
/// 设备状态接口地址
/// </summary>
public string EquipStatusUrl
{
get { return equipStatusUrl; }
set { equipStatusUrl = value; OnPropertyChanged(); }
}
private string productType; private string productType;
+2
View File
@@ -74,11 +74,13 @@
<Compile Include="MES\ProductResultParameters.cs" /> <Compile Include="MES\ProductResultParameters.cs" />
<Compile Include="MES\ReqAlarm.cs" /> <Compile Include="MES\ReqAlarm.cs" />
<Compile Include="MES\ReqArrivalStation.cs" /> <Compile Include="MES\ReqArrivalStation.cs" />
<Compile Include="MES\ReqEquipStatus.cs" />
<Compile Include="MES\ReqExitStation.cs" /> <Compile Include="MES\ReqExitStation.cs" />
<Compile Include="MES\ReqLoginMes.cs" /> <Compile Include="MES\ReqLoginMes.cs" />
<Compile Include="MES\RespAlarm.cs" /> <Compile Include="MES\RespAlarm.cs" />
<Compile Include="MES\RespArrivalStation.cs" /> <Compile Include="MES\RespArrivalStation.cs" />
<Compile Include="MES\RespBase.cs" /> <Compile Include="MES\RespBase.cs" />
<Compile Include="MES\RespEquipStatus.cs" />
<Compile Include="MES\RespExitStation.cs" /> <Compile Include="MES\RespExitStation.cs" />
<Compile Include="MES\RespLoginMes.cs" /> <Compile Include="MES\RespLoginMes.cs" />
<Compile Include="MES\RespProductResult.cs" /> <Compile Include="MES\RespProductResult.cs" />
+74
View File
@@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JY.MES.MES
{
/// <summary>
/// 请求-设备状态
/// </summary>
public class ReqEquipStatus
{
/// <summary>
/// 工厂代码
/// </summary>
public string SiteCode { get; set; }
/// <summary>
/// 产线编号
/// </summary>
public string LineCode { get; set; }
/// <summary>
/// 设备编号
/// </summary>
public string EquipNum { get; set; }
/// <summary>
/// 物料编码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 员工账号
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 库位ID
/// </summary>
public string SeatId { get; set; }
/// <summary>
/// 采集时间
/// </summary>
public string RecordDate { get; set; }
/// <summary>
/// 设备状态
/// </summary>
public string StatusCode { get; set; }
/// <summary>
/// 状态变更时间
/// </summary>
public string UploadTime { get; set; }
/// <summary>
/// 唯一标识符号
/// </summary>
public string Guid { get; set; }
/// <summary>
/// 故障代码数组
/// </summary>
public List<FaultCodeInfo> FaultCodeList { get; set; }
}
public class FaultCodeInfo
{
public string FaultCode { get; set; }
}
}
+12
View File
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JY.MES.MES
{
public class RespEquipStatus : RespBase
{
}
}
+5
View File
@@ -62,6 +62,11 @@ namespace JY.Model
/// </summary> /// </summary>
public string EquipAlarmUrl = "http://127.0.0.1"; public string EquipAlarmUrl = "http://127.0.0.1";
/// <summary>
/// 设备状态接口地址
/// </summary>
public string EquipStatusUrl = "http://127.0.0.1";
public List<CollectItemCfg> CollectItemCfgList { get; set; } = new List<CollectItemCfg>(); public List<CollectItemCfg> CollectItemCfgList { get; set; } = new List<CollectItemCfg>();
#endregion #endregion