272 lines
8.8 KiB
C#
272 lines
8.8 KiB
C#
|
|
using Cowain.Preheat.Common.Enums;
|
||
|
|
using Newtonsoft.Json;
|
||
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using System.Linq;
|
||
|
|
using System.Text;
|
||
|
|
using System.Threading.Tasks;
|
||
|
|
using Unity;
|
||
|
|
|
||
|
|
namespace Cowain.Preheat.Common.Models
|
||
|
|
{
|
||
|
|
public class MESModel
|
||
|
|
{
|
||
|
|
|
||
|
|
//static IUnityContainer _unityContainer;
|
||
|
|
public MESModel(IUnityContainer unityContainer)
|
||
|
|
{
|
||
|
|
//_unityContainer = unityContainer;
|
||
|
|
}
|
||
|
|
public class MesBase
|
||
|
|
{
|
||
|
|
public string Cmd { get; set; }
|
||
|
|
}
|
||
|
|
public class MESReturnCmdModel : MesBase
|
||
|
|
{
|
||
|
|
public MESReturnModelWithKeyFlag Info { get; set; }
|
||
|
|
}
|
||
|
|
public class MESReturnModel
|
||
|
|
{
|
||
|
|
public string Key { get; set; } = "";
|
||
|
|
public string ResultFlag { get; set; } = "";
|
||
|
|
public string MOMMessage { get; set; } = "";
|
||
|
|
}
|
||
|
|
public class MESReturnModelWithKeyFlag : MESReturnModel
|
||
|
|
{
|
||
|
|
public string KeyFlag { get; set; } = "";
|
||
|
|
}
|
||
|
|
|
||
|
|
#region 出站
|
||
|
|
public class MESReturnOutputModel : MesBase
|
||
|
|
{
|
||
|
|
public MESReturnCellModel Info { get; set; }
|
||
|
|
}
|
||
|
|
public class MESReturnCellModel : MESReturnModel
|
||
|
|
{
|
||
|
|
public List<MESReturnCell> Cells { get; set; }
|
||
|
|
}
|
||
|
|
public class MESReturnCell
|
||
|
|
{
|
||
|
|
public string CellNo { get; set; } = "";
|
||
|
|
public string CellInfo { get; set; } = "";
|
||
|
|
}
|
||
|
|
#endregion
|
||
|
|
//每个接口都有Key和设备编号,所以都从这里继承
|
||
|
|
|
||
|
|
public class EqptParameter : MesBase
|
||
|
|
{
|
||
|
|
public EqptParameter()
|
||
|
|
{
|
||
|
|
Cmd = "EqptParameter";
|
||
|
|
}
|
||
|
|
public EqptModel Info { get; set; } = new EqptModel();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class EqptModel
|
||
|
|
{
|
||
|
|
public string Key { get; set; }=Guid.NewGuid().ToString();
|
||
|
|
public string EquipmentCode { get; set; } = "HCHK0010"; //要从数据库中获取
|
||
|
|
}
|
||
|
|
public class EqptAlive : MesBase
|
||
|
|
{
|
||
|
|
public EqptAlive()
|
||
|
|
{
|
||
|
|
Cmd = "EqptAlive";
|
||
|
|
}
|
||
|
|
public EqptAliveModel Info { get; set; } = new EqptAliveModel();
|
||
|
|
}
|
||
|
|
public class EqptAliveModel: EqptModel
|
||
|
|
{
|
||
|
|
public string PPM { get; set; } = "";//设备PPM(单台设备需要提供的PPM)
|
||
|
|
public List<ModePPMs> PPMs { get; set; } = new List<ModePPMs>(); //2子设备PPM(多台设备共用一个心跳时,需要用这个字段)
|
||
|
|
}
|
||
|
|
|
||
|
|
public class ModePPMs
|
||
|
|
{
|
||
|
|
public string SubEqCode { get; set; } = ""; //子设备编码
|
||
|
|
public string PPM { get; set; } = ""; //设备PPM(单台设备需要提供的PPM
|
||
|
|
}
|
||
|
|
|
||
|
|
public class EqptStatus : MesBase
|
||
|
|
{
|
||
|
|
public EqptStatus()
|
||
|
|
{
|
||
|
|
Cmd = "EqptStatus";
|
||
|
|
}
|
||
|
|
public EqptStatusModel Info { get; set; } = new EqptStatusModel();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class EqptStatusModel: EqptModel
|
||
|
|
{
|
||
|
|
public string LocationID { get; set; } = "";
|
||
|
|
public string StatusCode { get; set; } = "";
|
||
|
|
public List<AlerInfoModel> AlertInfo { get; set; } = new List<AlerInfoModel>();
|
||
|
|
}
|
||
|
|
public class AlerInfoModel
|
||
|
|
{
|
||
|
|
public string AlertCode { get; set; } = "";
|
||
|
|
public string AlertMessage { get; set; } = "";
|
||
|
|
}
|
||
|
|
|
||
|
|
public class EqptAlert : MesBase
|
||
|
|
{
|
||
|
|
public EqptAlert()
|
||
|
|
{
|
||
|
|
Cmd = "EqptAlert";
|
||
|
|
}
|
||
|
|
public EqptAlertModel Info { get; set; } = new EqptAlertModel();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class EqptAlertModel: EqptModel
|
||
|
|
{
|
||
|
|
public List<AlertInfoModel> AlertInfo { get; set; } = new List<AlertInfoModel>();
|
||
|
|
}
|
||
|
|
public class AlertInfoModel
|
||
|
|
{
|
||
|
|
public string AlertCode { get; set; } = "";
|
||
|
|
public string AlertReset { get; set; } = "";
|
||
|
|
public string AlertMessage { get; set; } = "";
|
||
|
|
}
|
||
|
|
public class EqptParameterReturnCmd : MesBase
|
||
|
|
{
|
||
|
|
public Data Info { get; set; } = new Data();
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
public class Data : MESReturnModel
|
||
|
|
{
|
||
|
|
public List<EqptParameterModel> ParameterInfo { get; set; } = new List<EqptParameterModel>();
|
||
|
|
|
||
|
|
}
|
||
|
|
public class EqptParameterModel
|
||
|
|
{
|
||
|
|
public string ParameterCode { get; set; } = "";
|
||
|
|
public string ParameterType { get; set; } = "";
|
||
|
|
public string TargetValue { get; set; } = "";
|
||
|
|
public string UOMCode { get; set; } = "";
|
||
|
|
public string UpperLimit { get; set; } = "";
|
||
|
|
public string LowerLimit { get; set; } = "";
|
||
|
|
public string Description { get; set; } = "";
|
||
|
|
}
|
||
|
|
|
||
|
|
public class ParameterChangeCmd : MesBase
|
||
|
|
{
|
||
|
|
public ParameterChangeCmd()
|
||
|
|
{
|
||
|
|
Cmd = "ParameterChange";
|
||
|
|
}
|
||
|
|
public ParameterChange Info { get; set; } = new ParameterChange();
|
||
|
|
|
||
|
|
}
|
||
|
|
public class ParameterChange: EqptModel
|
||
|
|
{
|
||
|
|
public string EmployeeNo { get; set; } = "";
|
||
|
|
public List<EqptParameterModel> ParameterInfo { get; set; } = new List<EqptParameterModel>();
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
public class EqptRunCmd : MesBase
|
||
|
|
{
|
||
|
|
public EqptRunCmd()
|
||
|
|
{
|
||
|
|
Cmd = "EqptRun";
|
||
|
|
}
|
||
|
|
public EqptRun Info { get; set; } = new EqptRun();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class EqptRun: EqptModel
|
||
|
|
{
|
||
|
|
public string EmployeeNo { get; set; } = "";
|
||
|
|
public string Password { get; set; } = "";
|
||
|
|
public string EquipmentModel { get; set; } = "";
|
||
|
|
}
|
||
|
|
|
||
|
|
public class CellInputCmd : MesBase
|
||
|
|
{
|
||
|
|
public CellInputCmd()
|
||
|
|
{
|
||
|
|
Cmd = "CellInput";
|
||
|
|
}
|
||
|
|
public CellInput Info { get; set; } = new CellInput();
|
||
|
|
}
|
||
|
|
public class CellInput : EqptModel
|
||
|
|
{
|
||
|
|
public List<CellModel> Cells { get; set; } = new List<CellModel>();//是电芯组
|
||
|
|
}
|
||
|
|
|
||
|
|
public class CellModel
|
||
|
|
{
|
||
|
|
public string CellNo { get; set; } = ""; //电芯号 电芯号才是具体的电芯条码
|
||
|
|
}
|
||
|
|
public class BakingParameterCmd : MesBase
|
||
|
|
{
|
||
|
|
public BakingParameterCmd()
|
||
|
|
{
|
||
|
|
Cmd = "BakingParameter";
|
||
|
|
}
|
||
|
|
|
||
|
|
public BakingParameter Info { get; set; } = new BakingParameter();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class BakingParameter:EqptModel
|
||
|
|
{
|
||
|
|
public string LocationID { get; set; } = "";
|
||
|
|
public List<ProcessData> ParameterInfo { get; set; } = new List<ProcessData>();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class ProcessData
|
||
|
|
{
|
||
|
|
public string ParameterCode { get; set; } = "";
|
||
|
|
public string ParameterType { get; set; } = "";
|
||
|
|
public string Value { get; set; } = "";
|
||
|
|
public string TargetValue { get; set; } = "";
|
||
|
|
public string UOMCode { get; set; } = "";
|
||
|
|
public string UpperSpecificationsLimit { get; set; } = "";
|
||
|
|
public string LowerSpecificationsLimit { get; set; } = "";
|
||
|
|
public string LcoalTime { get; set; } = "";
|
||
|
|
public string Description { get; set; } = "";
|
||
|
|
}
|
||
|
|
public class CellOutputCmd : MesBase
|
||
|
|
{
|
||
|
|
public CellOutputCmd()
|
||
|
|
{
|
||
|
|
Cmd = "CellOutput";
|
||
|
|
}
|
||
|
|
public CellOutput Info { get; set; } = new CellOutput();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class CellOutput : EqptModel
|
||
|
|
{
|
||
|
|
public List<CellsModel> Cells { get; set; } = new List<CellsModel>();
|
||
|
|
}
|
||
|
|
|
||
|
|
public class CellsModel
|
||
|
|
{
|
||
|
|
public string CellNo { get; set; } = "";
|
||
|
|
public string PassFlag { get; set; } = "";
|
||
|
|
public string NGCode { get; set; } = "";
|
||
|
|
public string NGMessage { get; set; } = "";
|
||
|
|
|
||
|
|
public List<ParametersModel> Parameters { get; set; } = new List<ParametersModel>();
|
||
|
|
public List<MaterialInfoModel> MaterialInfo { get; set; } = new List<MaterialInfoModel>();
|
||
|
|
}
|
||
|
|
public class MaterialInfoModel
|
||
|
|
{
|
||
|
|
public string MaterialCode { get; set; } = "";
|
||
|
|
public string MaterialLoc { get; set; } = "";
|
||
|
|
public string Quantity { get; set; } = "";
|
||
|
|
}
|
||
|
|
public class ParametersModel
|
||
|
|
{
|
||
|
|
public string ParameterCode { get; set; } = "";
|
||
|
|
//public string ParameterDesc { get; set; } = "";
|
||
|
|
public string Value { get; set; } = "";
|
||
|
|
public string UpperLimit { get; set; } = "";
|
||
|
|
public string LowerLimit { get; set; } = "";
|
||
|
|
public string TargetValue { get; set; } = "";
|
||
|
|
public string ParameterResult { get; set; } = "";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|