首次提交:添加src文件夹代码
This commit is contained in:
296
Cowain.Bake.Common/Models/MESModel.cs
Normal file
296
Cowain.Bake.Common/Models/MESModel.cs
Normal file
@@ -0,0 +1,296 @@
|
||||
using Cowain.Bake.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.Bake.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<CellsMode> Cells { get; set; } = new List<CellsMode>();
|
||||
}
|
||||
public class CellsMode
|
||||
{
|
||||
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; } = "";
|
||||
}
|
||||
//7. 16.电芯状态获取
|
||||
public class CellStateCmd : MesBase
|
||||
{
|
||||
public CellStateCmd()
|
||||
{
|
||||
Cmd = "CellState";
|
||||
}
|
||||
public CellState Info { get; set; } = new CellState();
|
||||
}
|
||||
public class CellState: EqptModel
|
||||
{
|
||||
public string CellNo { get; set; } = "";
|
||||
}
|
||||
public class BakingInputCmd : MesBase
|
||||
{
|
||||
public BakingInputCmd()
|
||||
{
|
||||
Cmd = "BakingInput";
|
||||
}
|
||||
public BakingInput Info { get; set; } = new BakingInput();
|
||||
}
|
||||
|
||||
public class BakingInput : EqptModel
|
||||
{
|
||||
public string TrayNo { get; set; } = "";
|
||||
public string RecipeName { get; set; } = "";
|
||||
public string LocationID { get; set; } = "";
|
||||
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 string LocalTime { get; set; } = "";
|
||||
public List<ProcessData> ParameterInfo { get; set; } = new List<ProcessData>();
|
||||
}
|
||||
|
||||
public class ProcessData : EqptParameterModel
|
||||
{
|
||||
public string Value { get; set; } = "";
|
||||
}
|
||||
public class CellOutputCmd : MesBase
|
||||
{
|
||||
public CellOutputCmd()
|
||||
{
|
||||
Cmd = "CellOutput";
|
||||
}
|
||||
public InfoModel Info { get; set; } = new InfoModel();
|
||||
}
|
||||
|
||||
public class InfoModel : EqptModel
|
||||
{
|
||||
public CellsModel Cells { get; set; } = new 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; } = "";
|
||||
}
|
||||
public class BakingOutputCmd : MesBase
|
||||
{
|
||||
public BakingOutputCmd()
|
||||
{
|
||||
Cmd = "BakingOutput";
|
||||
}
|
||||
public BakingOutput Info { get; set; } = new BakingOutput();
|
||||
}
|
||||
public class BakingOutput : EqptModel
|
||||
{
|
||||
public string TrayNo { get; set; } = "";
|
||||
public string LocationID { get; set; } = "";
|
||||
public string OutFlag { get; set; } = "";// 是否出站(Y或空表示出站,N单纯的上传水含量数据)
|
||||
//public string Passflag { get; set; }
|
||||
//public string NGCode { get; set; }
|
||||
public List<CellModel> Cells { get; set; } = new List<CellModel>();
|
||||
public List<ParametersModel> Parameters { get; set; } = new List<ParametersModel>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user