添加项目文件。
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.MES.FMS
|
||||
{
|
||||
public class FMS_Alarm
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统编号
|
||||
/// </summary>
|
||||
public string systemCode { get; set; }
|
||||
/// <summary>
|
||||
/// 产线编号
|
||||
/// </summary>
|
||||
public string houseCode { get; set; }
|
||||
/// <summary>
|
||||
/// 设备编号
|
||||
/// </summary>
|
||||
public string equipNum { get; set; }
|
||||
/// <summary>
|
||||
/// 库位ID
|
||||
/// </summary>
|
||||
public string seatId { get; set; }
|
||||
/// <summary>
|
||||
/// 采集时间
|
||||
/// </summary>
|
||||
public string recordDate { get; set; }
|
||||
/// <summary>
|
||||
/// 唯一标识符号
|
||||
/// </summary>
|
||||
public string guid { get; set; }
|
||||
/// <summary>
|
||||
/// 报警消除时间
|
||||
/// </summary>
|
||||
public string alarmEndTime { get; set; }
|
||||
/// <summary>
|
||||
/// 报警类型
|
||||
/// </summary>
|
||||
public string alarmType { get; set; }
|
||||
/// <summary>
|
||||
/// 报警名称
|
||||
/// </summary>
|
||||
public string alarmName { get; set; }
|
||||
/// <summary>
|
||||
/// 报警开始时间
|
||||
/// </summary>
|
||||
public string alarmStartTime { get; set; }
|
||||
/// <summary>
|
||||
/// 故障代码
|
||||
/// </summary>
|
||||
public string faultCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.MES.FMS
|
||||
{
|
||||
public class FMS_Materialln
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统编号
|
||||
/// </summary>
|
||||
public string systemCode { get; set; }
|
||||
/// <summary>
|
||||
/// 产线编号
|
||||
/// </summary>
|
||||
public string houseCode { get; set; }
|
||||
/// <summary>
|
||||
/// 电芯条码
|
||||
/// </summary>
|
||||
public string skuCode { get; set; }
|
||||
/// <summary>
|
||||
/// 设备号
|
||||
/// </summary>
|
||||
public string deviceCode { get; set; }
|
||||
/// <summary>
|
||||
/// 工序号
|
||||
/// </summary>
|
||||
public string processCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.MES.FMS
|
||||
{
|
||||
public class FMS_Status
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统编号
|
||||
/// </summary>
|
||||
public string systemCode { get; set; }
|
||||
/// <summary>
|
||||
/// 产线编号
|
||||
/// </summary>
|
||||
public string houseCode { get; set; }
|
||||
/// <summary>
|
||||
/// 设备编号
|
||||
/// </summary>
|
||||
public string equipNum { 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; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,529 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace JY.MES.FMS
|
||||
{
|
||||
public class MesHelper_EVE
|
||||
{
|
||||
/// <summary>
|
||||
/// 接口地址
|
||||
/// </summary>
|
||||
public string UserVerifyUrl = "http://10.6.1.155/core/api/public/equipment/base/user/login/verify";
|
||||
//public static string InboundUrl = "http://10.6.1.155/core/api/public/in/station/process/true";
|
||||
//public string OutboundUrl = "http://10.6.1.155/core/api/public/out/station/process/true";
|
||||
public string ProductParamUrl = "http://10.6.1.155/core/api/public/product/process/param/result";
|
||||
public string EquipmentStatusUrl = "http://10.6.1.155/core/api/public/eve/pm/eqm/run/status/operation";
|
||||
public string AlarmStatusUrl = "http://10.6.1.155/core/api/public/equipment/alarm/currency";
|
||||
public string GetRecipeUrl = "http://10.6.1.155/core/api/public/param/set/request";
|
||||
public string UnloadRecipeUrl = "http://10.6.1.155/core/api/public/api/public/param/setting/change";
|
||||
|
||||
|
||||
public string 电芯入站 = "http://192.168.1.11:30030/fms/restful/api/v3/process/CheckMaterialStatus";
|
||||
public string 电芯出站 = "http://192.168.1.11:30030/fms/restful/api/v3/process/MaterialEX";
|
||||
public string 设备状态 = "http://192.168.1.11:30030/fms/restful/api/v3/device/uploadDeviceStatus";
|
||||
public string 报警 = "http://192.168.1.11:30030/fms/restful/api/v3/device/uploadDeviceError";
|
||||
|
||||
|
||||
public static string InboundUrl = "http://192.168.1.11:30030/fms/restful/api/v3/process/CheckMaterialStatus";
|
||||
public static string OutboundUrl = "http://192.168.1.11:30030/fms/restful/api/v3/process/MaterialEX";
|
||||
public static string StatusUrl = "http://192.168.1.11:30030/fms/restful/api/v3/device/uploadDeviceStatus";
|
||||
public static string AlarmUrl = "http://192.168.1.11:30030/fms/restful/api/v3/device/uploadDeviceError";
|
||||
public static string MateriallnStationeUrl = "http://192.168.1.11:30030/fms/restful/api/v3/inventory/materiallnStatione";
|
||||
|
||||
/// <summary>
|
||||
/// 超时
|
||||
/// </summary>
|
||||
public int _TimeOut = 3000;
|
||||
/// <summary>
|
||||
/// 凭证
|
||||
/// </summary>
|
||||
//public Credentials Credentials { get; set; }
|
||||
MesRequestAndRespondParam mrrp = new MesRequestAndRespondParam();
|
||||
/// <summary>
|
||||
/// 初始标记为false(离线文件标记)
|
||||
/// </summary>
|
||||
public static bool WriteState { get; set; } = false;
|
||||
|
||||
public static List<string> listSource = new List<string>();
|
||||
|
||||
///// <summary>
|
||||
///// 提交登录窗口填写的信息,登录MES
|
||||
///// </summary>
|
||||
///// <param name="mParam"></param>
|
||||
///// <returns></returns>
|
||||
//public MesRespondParam.MesResult MesPost<T>(T t, int Type) where T : class
|
||||
//{
|
||||
// var Start = DateTime.Now;
|
||||
// MesRespondParam.MesResult _mesResult = new MesRespondParam.MesResult();
|
||||
// try
|
||||
// {
|
||||
// //等待7秒,如果超过7秒未收到MES返回消息,视为超时
|
||||
// new Task(() =>
|
||||
// {
|
||||
// if ((DateTime.Now - Start).TotalMilliseconds > 7000)
|
||||
// {
|
||||
// _mesResult.code = "-9999";
|
||||
// _mesResult.message = "交互超时";
|
||||
// _mesResult.success = false;
|
||||
// }
|
||||
|
||||
// }).Start();
|
||||
|
||||
// var json = JsonHelper.SerializeObject(t);
|
||||
|
||||
// if (Type == 0)
|
||||
// {
|
||||
// Addlo.WriteEorr($@"【向服务端发送信息】: {Convert.ToString(json)}", "测试日志", "入站服务端数据", Type: "UTF-8");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SysLog.WriteEorr($@"【向服务端发送信息】: {Convert.ToString(json)}", "测试日志", "出站服务端数据", Type: "UTF-8");
|
||||
// }
|
||||
|
||||
// string jsnstr = PostWebRequest(Type == 0 ? 电芯入站 : 电芯出站, json, Type == 0 ? "入站" : "出站"); //request.GetJsonResponse(UserVerifyUrl, JsonHelper.SerializeObject(mParam));
|
||||
// _mesResult = JsonHelper.DeserializeJsonToObject<MesRespondParam.MesResult>(jsnstr);
|
||||
|
||||
// if (Type == 0)
|
||||
// {
|
||||
// SysLog.WriteEorr($@"【接收服务端返回信息】: {Convert.ToString(jsnstr)}", "测试日志", "入站服务端数据", Type: "UTF-8");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SysLog.WriteEorr($@"【接收服务端返回信息】: {Convert.ToString(jsnstr)}", "测试日志", "出站服务端数据", Type: "UTF-8");
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// _mesResult.code = "-404";
|
||||
// _mesResult.message = ex.Message;
|
||||
// _mesResult.success = false;
|
||||
// }
|
||||
// return _mesResult;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 容量分档
|
||||
/// </summary>
|
||||
/// <param name="mParam"></param>
|
||||
/// <returns></returns>
|
||||
public static MesReturnParam.MesResult FMS_MateriallnStatione(FMS_Materialln mParam)
|
||||
{
|
||||
MesReturnParam.MesResult _mesResult = new FMS.MesReturnParam.MesResult();
|
||||
try
|
||||
{
|
||||
string jsnstr = PostWebRequest(MateriallnStationeUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam));
|
||||
_mesResult = Newtonsoft.Json.JsonConvert.DeserializeObject<MesReturnParam.MesResult>(jsnstr);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_mesResult.statusCode = -9999;
|
||||
_mesResult.statusMessage = ex.Message;
|
||||
|
||||
}
|
||||
return _mesResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品进站
|
||||
/// </summary>
|
||||
/// <param name="mParam"></param>
|
||||
/// <returns></returns>
|
||||
public static MesReturnParam.MesResult MES_Inbound(FMS_In mParam)
|
||||
{
|
||||
MesReturnParam.MesResult _mesResult = new FMS.MesReturnParam.MesResult();
|
||||
try
|
||||
{
|
||||
string jsnstr = PostWebRequest(InboundUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam));
|
||||
_mesResult = Newtonsoft.Json.JsonConvert.DeserializeObject<MesReturnParam.MesResult>(jsnstr);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_mesResult.statusCode = -9999;
|
||||
_mesResult.statusMessage = ex.Message;
|
||||
|
||||
}
|
||||
return _mesResult;
|
||||
}
|
||||
/// <summary>
|
||||
/// 产品出站
|
||||
/// </summary>
|
||||
/// <param name="mParam"></param>
|
||||
/// <returns></returns>
|
||||
public static MesRequestAndRespondParam.MesRespondParam.MesResult MES_Outbound(FMS_Out mParam)
|
||||
{
|
||||
MesRequestAndRespondParam.MesRespondParam.MesResult _mesResult = new MesRequestAndRespondParam.MesRespondParam.MesResult();
|
||||
string jsnstr = PostWebRequest(OutboundUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam));
|
||||
|
||||
try
|
||||
{
|
||||
if (jsnstr.Contains("【链接异常】"))
|
||||
{
|
||||
//异常视为离线,如果离线,则将数据保存到本地
|
||||
SaveOutlineData(jsnstr);
|
||||
}
|
||||
_mesResult = Newtonsoft.Json.JsonConvert.DeserializeObject<MesRequestAndRespondParam.MesRespondParam.MesResult>(jsnstr);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_mesResult.statusCode = -9999;
|
||||
_mesResult.statusMessage = ex.Message;
|
||||
}
|
||||
return _mesResult;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设备状态上传MES
|
||||
/// </summary>
|
||||
/// <param name="mParam"></param>
|
||||
/// <returns></returns>
|
||||
public static MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond MES_Status(FMS_Status mParam)
|
||||
{
|
||||
//string jsnstr = PostHelper.HttpPostJsonAPI1(StatusUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam));
|
||||
//return Newtonsoft.Json.JsonConvert.DeserializeObject<MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond>(jsnstr);
|
||||
|
||||
MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond _mesResult = new MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond();
|
||||
try
|
||||
{
|
||||
string jsnstr = PostWebRequest(StatusUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam));
|
||||
_mesResult = Newtonsoft.Json.JsonConvert.DeserializeObject<MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond>(jsnstr);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_mesResult.code = "-9999";
|
||||
_mesResult.message = ex.Message;
|
||||
_mesResult.success = "失败";
|
||||
_mesResult.category = "";
|
||||
}
|
||||
return _mesResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 报警上传MES
|
||||
/// </summary>
|
||||
/// <param name="mParam"></param>
|
||||
/// <returns></returns>
|
||||
public static MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond MES_Alarm(FMS_Alarm mParam)
|
||||
{
|
||||
|
||||
//string jsnstr = PostHelper.HttpPostJsonAPI1(AlarmUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam));
|
||||
//return Newtonsoft.Json.JsonConvert.DeserializeObject<MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond>(jsnstr);
|
||||
|
||||
MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond _mesResult = new MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond();
|
||||
try
|
||||
{
|
||||
string jsnstr = PostWebRequest(AlarmUrl, Newtonsoft.Json.JsonConvert.SerializeObject(mParam));
|
||||
_mesResult = Newtonsoft.Json.JsonConvert.DeserializeObject<MesRequestAndRespondParam.MesRespondParam.GetRecipeRespond>(jsnstr);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_mesResult.code = "-9999";
|
||||
_mesResult.message = ex.Message;
|
||||
_mesResult.success = "失败";
|
||||
_mesResult.category = "";
|
||||
}
|
||||
return _mesResult;
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 加工参数采集
|
||||
///// </summary>
|
||||
///// <param name="mParam"></param>
|
||||
///// <returns></returns>
|
||||
//public MesRequestAndRespondParam.MesRespondParam.MesResult MES_ProductParaColloctUniversal(MesRequestAndRespondParam.MesRequestParam.ProductDataRequest mParam)
|
||||
//{
|
||||
// MesRequestAndRespondParam.MesRespondParam.MesResult _mesResult = new MesRequestAndRespondParam.MesRespondParam.MesResult();
|
||||
// string jsnstPostWebRequestr = (ProductParamUrl, JsonHelper.SerializeObject(mParam));
|
||||
|
||||
// try
|
||||
// {
|
||||
// _mesResult = JsonHelper.DeserializeJsonToObject<MesRequestAndRespondParam.MesRespondParam.MesResult>(jsnstr);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// _mesResult.code = "-9999";
|
||||
// _mesResult.message = ex.Message;
|
||||
// _mesResult.success = false;
|
||||
// }
|
||||
// return _mesResult;
|
||||
//}
|
||||
/// <summary>
|
||||
/// 加工参数采集(手动或离线传入上传内容)
|
||||
/// </summary>
|
||||
/// <param name="JsString"></param>
|
||||
/// <returns></returns>
|
||||
//public MesRequestAndRespondParam.MesRespondParam.MesResult MES_ProductParaColloctUniversal(string JsString)
|
||||
//{
|
||||
// MesRequestAndRespondParam.MesRespondParam.MesResult _mesResult = new MesRequestAndRespondParam.MesRespondParam.MesResult();
|
||||
// try
|
||||
// {
|
||||
// string jsnstr = JsString;
|
||||
// _mesResult = JsonHelper.DeserializeJsonToObject<MesRequestAndRespondParam.MesRespondParam.MesResult>(jsnstr);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// _mesResult.code = "-9999";
|
||||
// _mesResult.message = ex.Message;
|
||||
// _mesResult.success = false;
|
||||
// }
|
||||
// return _mesResult;
|
||||
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 设备状态采集
|
||||
///// </summary>
|
||||
///// <param name="mParam"></param>
|
||||
///// <returns></returns>
|
||||
//public MesRespondParam.MesResult MES_EquipStatusCollect(MesRequestParam.EquipStatusRequest mParam)
|
||||
//{
|
||||
// MesRespondParam.MesResult _mesResult = new MesRespondParam.MesResult();
|
||||
// try
|
||||
// {
|
||||
// string jsnstr = PostWebRequest(EquipmentStatusUrl, JsonHelper.SerializeObject(mParam));
|
||||
// _mesResult = JsonHelper.DeserializeJsonToObject<MesRespondParam.MesResult>(jsnstr);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// _mesResult.code = "-9999";
|
||||
// _mesResult.message = ex.Message;
|
||||
// _mesResult.success = false;
|
||||
// }
|
||||
// return _mesResult;
|
||||
//}
|
||||
///// <summary>
|
||||
///// 设备报警采集
|
||||
///// </summary>
|
||||
///// <param name="mParam"></param>
|
||||
///// <returns></returns>
|
||||
//public MesRespondParam.MesResult MES_Alarm(MesRequestParam.AlarmRequest mParam)
|
||||
//{
|
||||
// MesRespondParam.MesResult _mesResult = new MesRespondParam.MesResult();
|
||||
// try
|
||||
// {
|
||||
// string jsnstr = PostWebRequest(AlarmStatusUrl, JsonHelper.SerializeObject(mParam));
|
||||
// _mesResult = JsonHelper.DeserializeJsonToObject<MesRespondParam.MesResult>(jsnstr);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// _mesResult.code = "-9999";
|
||||
// _mesResult.message = ex.Message;
|
||||
// _mesResult.success = false;
|
||||
// }
|
||||
// return _mesResult;
|
||||
//}
|
||||
/// <summary>
|
||||
/// 配方修改上传
|
||||
/// </summary>
|
||||
/// <param name="mParam"></param>
|
||||
/// <returns></returns>
|
||||
//public MesRespondParam.MesResult MES_UploadRecipe(MesRequestParam.SetRecipeRequest mParam)
|
||||
//{
|
||||
// MesRespondParam.MesResult _mesResult = new MesRespondParam.MesResult();
|
||||
// try
|
||||
// {
|
||||
// string jsnstr = PostWebRequest(UnloadRecipeUrl, JsonHelper.SerializeObject(mParam));
|
||||
// _mesResult = JsonHelper.DeserializeJsonToObject<MesRespondParam.MesResult>(jsnstr);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// _mesResult.code = "-9999";
|
||||
// _mesResult.message = ex.Message;
|
||||
// _mesResult.success = false;
|
||||
// }
|
||||
// return _mesResult;
|
||||
//}
|
||||
///// <summary>
|
||||
///// 配方下载
|
||||
///// </summary>
|
||||
///// <param name="mParam"></param>
|
||||
///// <returns></returns>
|
||||
//public MesRespondParam.GetRecipeRespond MES_GetRecipe(MesRequestParam.GetRecipeRequest mParam)
|
||||
//{
|
||||
// MesRespondParam.GetRecipeRespond _mesResult = new MesRespondParam.GetRecipeRespond();
|
||||
// try
|
||||
// {
|
||||
// string jsnstr = PostWebRequest(GetRecipeUrl, JsonHelper.SerializeObject(mParam));
|
||||
// _mesResult = JsonHelper.DeserializeJsonToObject<MesRespondParam.GetRecipeRespond>(jsnstr);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// _mesResult.code = "-9999";
|
||||
// _mesResult.message = ex.Message;
|
||||
// _mesResult.success = false;
|
||||
// }
|
||||
// return _mesResult;
|
||||
//}
|
||||
#region 公共
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Post数据接口
|
||||
/// </summary>
|
||||
/// <param name="postUrl">接口地址</param>
|
||||
/// <param name="paramData">提交json数据</param>
|
||||
/// <param name="dataEncode">编码方式(Encoding.UTF8)</param>
|
||||
/// <returns></returns>
|
||||
public static string PostWebRequest(string postUrl, string paramData, string SockAction = "")
|
||||
{
|
||||
string responseContent = string.Empty;
|
||||
try
|
||||
{
|
||||
string TypeName = string.Empty;
|
||||
if (SockAction.Contains("入站"))
|
||||
{
|
||||
TypeName = "入站操作";
|
||||
}
|
||||
else
|
||||
{
|
||||
TypeName = "出站操作";
|
||||
}
|
||||
|
||||
byte[] byteArray = Encoding.UTF8.GetBytes(paramData); //转化
|
||||
HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create(new Uri(postUrl));
|
||||
//webReq.Timeout = _TimeOut;
|
||||
webReq.Method = "POST";
|
||||
webReq.ContentType = "application/json;charset=UTF-8";
|
||||
//webReq.ContentType = "application/x-www-form-urlencoded;charset=UTF-8";
|
||||
//webReq.ContentLength = byteArray.Length;
|
||||
if (SockAction.Length > 0)
|
||||
webReq.Headers.Add("SOAPAction", SockAction);
|
||||
//if (this.Credentials != null)
|
||||
{
|
||||
//(2)设置Headers Authorization
|
||||
webReq.Headers.Add("Authorization", "Basic " /*+ Convert.ToBase64String(Encoding.UTF8.GetBytes($"{Credentials.UserName}:{Credentials.Password}"))*/);
|
||||
}
|
||||
//webReq.CookieContainer = new CookieContainer();
|
||||
//webReq.ContentType = "application/json;";
|
||||
|
||||
////(1)设置请求Credentials
|
||||
//CredentialCache credentialCache = new CredentialCache();
|
||||
//credentialCache.Add(new Uri("接口地址"), "Basic", new NetworkCredential("用户名", "密码"));
|
||||
//webReq.Credentials = credentialCache;
|
||||
|
||||
using (Stream reqStream = webReq.GetRequestStream())
|
||||
{
|
||||
StreamWriter mySwrite = new StreamWriter(reqStream, Encoding.GetEncoding("UTF-8"));
|
||||
mySwrite.Write(paramData);//写入参数
|
||||
mySwrite.Close();
|
||||
}
|
||||
|
||||
using (HttpWebResponse response = (HttpWebResponse)webReq.GetResponse())
|
||||
{
|
||||
var code = response.StatusCode.ToString();
|
||||
|
||||
//在这里对接收到的页面内容进行处理
|
||||
using (StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("UTF-8")))
|
||||
{
|
||||
responseContent = sr.ReadToEnd().ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
//SysLog.WriteEorr("【操作异常】:" + ex.Message.ToString() + "---------" + ex.StackTrace.ToString(), "测试日志", "服务端数据");
|
||||
return ex.Message + "【链接异常】";
|
||||
}
|
||||
//catch ( Exception ex)
|
||||
//{
|
||||
// return "连接远程服务器出错"; ;
|
||||
//}
|
||||
return responseContent;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="url">目标url</param>
|
||||
/// <param name="strPost">要发送的post字符串</param>
|
||||
/// <returns>接收后返回值</returns>
|
||||
public string PostXML(string url, string strPost)
|
||||
{
|
||||
|
||||
string result = string.Empty;
|
||||
//生成文件流
|
||||
byte[] buffer = Encoding.UTF8.GetBytes(strPost);
|
||||
//向流中写字符串
|
||||
StreamWriter mywriter = null;
|
||||
//根据url创建请求对象
|
||||
HttpWebRequest objrequest = (HttpWebRequest)WebRequest.Create(url);
|
||||
|
||||
//设置发送方式
|
||||
objrequest.Method = "POST";
|
||||
//提交长度
|
||||
objrequest.ContentLength = buffer.Length;
|
||||
//发送内容格式
|
||||
objrequest.ContentType = "text/xml;charset=UTF-8";
|
||||
objrequest.Timeout = _TimeOut;
|
||||
try
|
||||
{
|
||||
mywriter = new StreamWriter(objrequest.GetRequestStream());
|
||||
mywriter.Write(strPost);
|
||||
mywriter.Close();
|
||||
HttpWebResponse objresponse;
|
||||
|
||||
try
|
||||
{
|
||||
//读取服务器返回信息
|
||||
objresponse = (HttpWebResponse)objrequest.GetResponse();
|
||||
|
||||
}
|
||||
catch (WebException EX)
|
||||
{
|
||||
|
||||
objresponse = (HttpWebResponse)EX.Response;
|
||||
|
||||
}
|
||||
using (StreamReader sr = new StreamReader(objresponse.GetResponseStream()))
|
||||
{
|
||||
result = sr.ReadToEnd();
|
||||
sr.Close();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
result = "发送文件流失败!";
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 当MES离线时,保存上传数据(MrLin)
|
||||
/// </summary>
|
||||
/// <param name="requestJson"></param>
|
||||
private static void SaveOutlineData(string requestJson)
|
||||
{
|
||||
//每次创建一个新的文件文本
|
||||
string logSite = $@"D:\MESData\ErrData{DateTime.Now.ToString("ffffff")}.txt";
|
||||
try
|
||||
{
|
||||
WriteState = false;
|
||||
//防止重复数据存入本地的判断
|
||||
if (!listSource.Contains(requestJson))
|
||||
{
|
||||
//SysLog.WriteContext(requestJson, logSite);
|
||||
//写入记录之后将数据存入到本地结合,防止重复数据存入到本地文件
|
||||
listSource.Add(requestJson);
|
||||
}
|
||||
|
||||
//文件写完标记
|
||||
WriteState = true;
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
//string str = SysLog.ReadContext(logSite) + "\r\n" + "";
|
||||
WriteState = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,564 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.MES.FMS
|
||||
{
|
||||
public class MesRequestAndRespondParam
|
||||
{
|
||||
/// <summary>
|
||||
/// MES请求对象
|
||||
/// </summary>
|
||||
public class MesRequestParam
|
||||
{
|
||||
#region 登录
|
||||
/// <summary>
|
||||
/// 操作员登录参数
|
||||
/// </summary>
|
||||
public class UserVerifyRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// :站点;必填
|
||||
/// </summary>
|
||||
public string siteCode { get; set; }
|
||||
/// <summary>
|
||||
/// :设备;必填
|
||||
/// </summary>
|
||||
public string equipNum { get; set; }
|
||||
/// <summary>
|
||||
/// 产线编号
|
||||
/// </summary>
|
||||
public string lineCode { get; set; }
|
||||
/// <summary>
|
||||
/// :用户;必填
|
||||
/// </summary>
|
||||
public string userName { get; set; }
|
||||
/// <summary>
|
||||
/// :密码;必填
|
||||
/// </summary>
|
||||
public string passWord { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 进站
|
||||
|
||||
/// <summary>
|
||||
/// 产品进站信息
|
||||
/// </summary>
|
||||
public class InStationRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统编号(上位机代号);必填
|
||||
/// </summary>
|
||||
public string systemCode { get; set; }
|
||||
/// <summary>
|
||||
/// 产线编号
|
||||
/// </summary>
|
||||
public string houseCode { get; set; }
|
||||
/// <summary>
|
||||
/// :设备号;必填
|
||||
/// </summary>
|
||||
public string deviceCode { get; set; }
|
||||
/// <summary>
|
||||
/// :工序号;必填
|
||||
/// </summary>
|
||||
public string processCode { get; set; }
|
||||
/// <summary>
|
||||
/// :工序号;必填
|
||||
/// </summary>
|
||||
public string skuCode { get; set; }
|
||||
/// <summary>
|
||||
/// :电芯结果;必填
|
||||
/// </summary>
|
||||
public string testResult { get; set; }
|
||||
/// <summary>
|
||||
/// :NG代码;必填
|
||||
/// </summary>
|
||||
public string ngCode { get; set; }
|
||||
/// <summary>
|
||||
/// :工序数据集;必填
|
||||
/// </summary>
|
||||
public string processData { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 出站
|
||||
/// 产品出站参数
|
||||
/// </summary>
|
||||
public class OutStationRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// <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 userName { get; set; }
|
||||
/// <summary>
|
||||
///工单生成的物料号
|
||||
/// </summary>
|
||||
public string materialCode { get; set; }
|
||||
/// <summary>
|
||||
/// :生产类型;(非必输)
|
||||
/// </summary>
|
||||
public string productType { get; set; }
|
||||
/// <summary>
|
||||
/// :完工数量;(非必输)
|
||||
/// </summary>
|
||||
public string completeQty { get; set; }
|
||||
/// <summary>
|
||||
/// 托盘码
|
||||
/// </summary>
|
||||
public string containerCode { get; set; }
|
||||
/// <summary>
|
||||
/// 1:通用出站(默认);2:其他待定;
|
||||
/// </summary>
|
||||
public int type { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 产品信息结构体
|
||||
/// </summary>
|
||||
public List<OutStationVO1> assembleLineList;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 出站产品信息结构体
|
||||
/// </summary>
|
||||
public struct OutStationVO1
|
||||
{
|
||||
/// <summary>
|
||||
/// 产品条码
|
||||
/// </summary>
|
||||
public string identification { get; set; }
|
||||
/// <summary>
|
||||
/// 质量状态
|
||||
/// </summary>
|
||||
public string qualityStatus { get; set; }
|
||||
/// <summary>
|
||||
/// 关联条码:组装段超声焊专用,其他工序可为空
|
||||
/// </summary>
|
||||
public string qrCode { get; set; }
|
||||
/// <summary>
|
||||
/// NG错误信息:质量状态OK不返回,质量状态NG返回具体报错消息
|
||||
/// </summary>
|
||||
public string ngMessage { get; set; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 产品加工参数
|
||||
/// <summary>
|
||||
/// 产品结果参数:单进单出
|
||||
/// </summary>
|
||||
public class ProductDataRequest
|
||||
{
|
||||
public string equipNum { get; set; }
|
||||
public string type { get; set; }
|
||||
public string payload { get; set; }
|
||||
}
|
||||
public class payloadDD
|
||||
{
|
||||
/// <summary>
|
||||
/// 工厂
|
||||
/// </summary>
|
||||
public string siteCode { get; set; }
|
||||
/// <summary>
|
||||
/// 产线
|
||||
/// </summary>
|
||||
public string lineCode { get; set; }
|
||||
/// <summary>
|
||||
/// 物料
|
||||
/// </summary>
|
||||
public string materialCode { get; set; }
|
||||
/// <summary>
|
||||
/// 用户
|
||||
/// </summary>
|
||||
public string userName { get; set; }
|
||||
/// <summary>
|
||||
/// 小车号
|
||||
/// </summary>
|
||||
public string carCode { get; set; }
|
||||
/// <summary>
|
||||
/// 采集时间
|
||||
/// </summary>
|
||||
public string recordDate { get; set; }
|
||||
/// <summary>
|
||||
/// 条码数量
|
||||
/// </summary>
|
||||
public int qty { get; set; }
|
||||
/// <summary>
|
||||
/// 托盘码
|
||||
/// </summary>
|
||||
public string containerCode { get; set; }
|
||||
public identificationParaDD identification { get; set; }
|
||||
public List<tagDataVOPara> tagDataVOList { get; set; }
|
||||
}
|
||||
|
||||
public class identificationParaDD
|
||||
{
|
||||
/// <summary>
|
||||
/// 条码
|
||||
/// </summary>
|
||||
public string identification { get; set; }
|
||||
/// <summary>
|
||||
/// 质量状态Y/N
|
||||
/// </summary>
|
||||
public string qualityStatus { get; set; }
|
||||
}
|
||||
public class tagDataVOPara
|
||||
{
|
||||
public string tagCode { get; set; } = "0";
|
||||
public string tagValue { get; set; } = "0";
|
||||
public string tagTime { get; set; }
|
||||
/// <summary>
|
||||
/// 采集项判断结果(Y/N)
|
||||
/// </summary>
|
||||
public string tagCalculateResult { get; set; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 设备状态
|
||||
|
||||
/// <summary>
|
||||
/// 设备状态参数
|
||||
/// </summary>
|
||||
public class EquipStatusRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// :站点;必填
|
||||
/// </summary>
|
||||
public string siteCode { get; set; }
|
||||
public string lineCode { get; set; }
|
||||
/// <summary>
|
||||
/// :设备;必填
|
||||
/// </summary>
|
||||
public string equipNum { get; set; }
|
||||
/// <summary>
|
||||
/// :登录账号
|
||||
/// </summary>
|
||||
public string userName { get; set; }
|
||||
public string materialCode { get; set; }
|
||||
/// <summary>
|
||||
/// 采集时间(2019-09-11 13:13:13)(非必输)
|
||||
/// </summary>
|
||||
public string recordDate { get; set; }
|
||||
/// <summary>
|
||||
/// 设备状态
|
||||
/// </summary>
|
||||
public string statusCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态变更时间
|
||||
/// </summary>
|
||||
public string uploadTime { get; set; }
|
||||
/// <summary>
|
||||
/// 故障代码(行,可以不传,可以多条,只有设备状态为故障时才需要传输)
|
||||
/// </summary>
|
||||
public List<faultCodes> faultCodeList { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备运行状态
|
||||
/// </summary>
|
||||
|
||||
public struct faultCodes
|
||||
{
|
||||
public string faultCode { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 报警状态
|
||||
public class AlarmRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// :站点;必填
|
||||
/// </summary>
|
||||
public string siteCode { get; set; }
|
||||
public string lineCode { get; set; }
|
||||
/// <summary>
|
||||
/// :设备;必填
|
||||
/// </summary>
|
||||
public string equipNum { get; set; }
|
||||
/// <summary>
|
||||
/// :登录账号
|
||||
/// </summary>
|
||||
public string userName { get; set; }
|
||||
public string materialCode { get; set; }
|
||||
/// <summary>
|
||||
/// 采集时间(2019-09-11 13:13:13)(非必输)
|
||||
/// </summary>
|
||||
public string recordDate { get; set; }
|
||||
/// <summary>
|
||||
/// 唯一标识符号
|
||||
/// </summary>
|
||||
public string guid { get; set; }
|
||||
public List<AlarmLineList> alarmLineList { get; set; }
|
||||
}
|
||||
public struct AlarmLineList
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警消除时间
|
||||
/// </summary>
|
||||
public string alarmEndTime { get; set; }
|
||||
/// <summary>
|
||||
/// 报警类型
|
||||
/// </summary>
|
||||
public string alarmType { get; set; }
|
||||
/// <summary>
|
||||
/// 报警名称
|
||||
/// </summary>
|
||||
public string alarmName { get; set; }
|
||||
/// <summary>
|
||||
/// 报警开始时间
|
||||
/// </summary>
|
||||
public string alarmStartTime { get; set; }
|
||||
/// <summary>
|
||||
/// 故障代码
|
||||
/// </summary>
|
||||
public string faultCode { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 配方参数修改
|
||||
/// <summary>
|
||||
/// 参数修改
|
||||
/// </summary>
|
||||
public class SetRecipeRequest
|
||||
{
|
||||
public string siteCode { get; set; }
|
||||
public string lineCode { get; set; }
|
||||
public string equipNum { get; set; }
|
||||
public string userName { get; set; }
|
||||
public string materialCode { get; set; }
|
||||
/// <summary>
|
||||
/// 变更时间
|
||||
/// </summary>
|
||||
public string changeTime { get; set; }
|
||||
/// <summary>
|
||||
/// 数据组编码
|
||||
/// </summary>
|
||||
public string tagGroupCode { get; set; }
|
||||
/// <summary>
|
||||
/// 数据组描述
|
||||
/// </summary>
|
||||
public string tagGroupDescription { get; set; }
|
||||
/// <summary>
|
||||
/// 数据项数组
|
||||
/// </summary>
|
||||
public List<tagList> tagList { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 配方数据项数组对象
|
||||
/// </summary>
|
||||
public struct tagList
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据项编码
|
||||
/// </summary>
|
||||
public string tagCode { get; set; }
|
||||
/// <summary>
|
||||
/// 变更前计量单位
|
||||
/// </summary>
|
||||
public string unitBefore { get; set; }
|
||||
/// <summary>
|
||||
/// 变更前标准值
|
||||
/// </summary>
|
||||
public string standardValueBefore { get; set; }
|
||||
/// <summary>
|
||||
/// 变更前符合值
|
||||
/// </summary>
|
||||
public string trueValueBefore { get; set; }
|
||||
/// <summary>
|
||||
/// 变更前不符合值
|
||||
/// </summary>
|
||||
public string falseValueBefore { get; set; }
|
||||
/// <summary>
|
||||
/// 变更前最小值
|
||||
/// </summary>
|
||||
public double minValueBefore { get; set; }
|
||||
/// <summary>
|
||||
/// 变更前最大值
|
||||
/// </summary>
|
||||
public double maxValueBefore { get; set; }
|
||||
/// <summary>
|
||||
/// 变更后计量单位
|
||||
/// </summary>
|
||||
public string unitAfter { get; set; }
|
||||
/// <summary>
|
||||
/// 变更后标准值
|
||||
/// </summary>
|
||||
public string standardValueAfter { get; set; }
|
||||
/// <summary>
|
||||
/// 变更后符合值
|
||||
/// </summary>
|
||||
public string trueValueAfter { get; set; }
|
||||
/// <summary>
|
||||
/// 变更后不符合值
|
||||
/// </summary>
|
||||
public string falseValueAfter { get; set; }
|
||||
/// <summary>
|
||||
/// 变更后最小值
|
||||
/// </summary>
|
||||
public double minValueAfter { get; set; }
|
||||
/// <summary>
|
||||
/// 变更后最大值
|
||||
/// </summary>
|
||||
public double maxValueAfter { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 配方请求
|
||||
/// <summary>
|
||||
/// 配方请求
|
||||
/// </summary>
|
||||
public class GetRecipeRequest
|
||||
{
|
||||
public string siteCode { get; set; }
|
||||
public string lineCode { get; set; }
|
||||
public string equipNum { get; set; }
|
||||
public string userName { get; set; }
|
||||
public string materialCode { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// MES返回对象
|
||||
/// </summary>
|
||||
public class MesRespondParam
|
||||
{
|
||||
#region 通用返回
|
||||
/// <summary>
|
||||
/// Mes返回信息对象{"statusCode":0,"statusMessage": "该设备111找不到,请检查!"}
|
||||
/// </summary>
|
||||
public class MesResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 返回信息代码 0:成功
|
||||
/// </summary>
|
||||
public int statusCode { get; set; }
|
||||
/// <summary>
|
||||
/// 返回信息
|
||||
/// </summary>
|
||||
public string statusMessage { get; set; }
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 设备状态数据返回
|
||||
/// <summary>
|
||||
/// 设备状态MES返回参数
|
||||
/// </summary>
|
||||
public class GetRecipeRespond
|
||||
{
|
||||
/// <summary>
|
||||
/// 错误代码
|
||||
/// </summary>
|
||||
public string code { get; set; }
|
||||
/// <summary>
|
||||
/// 成功标识
|
||||
/// </summary>
|
||||
public string success { get; set; }
|
||||
/// <summary>
|
||||
/// 数据处理消息
|
||||
/// </summary>
|
||||
public string message { get; set; }
|
||||
/// <summary>
|
||||
/// 报错消息类型
|
||||
/// </summary>
|
||||
public string category { get; set; }
|
||||
|
||||
}
|
||||
|
||||
#region 屏蔽
|
||||
public struct rows
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据组编码
|
||||
/// </summary>
|
||||
public string tagGroupCode { get; set; }
|
||||
/// <summary>
|
||||
/// 数据组描述
|
||||
/// </summary>
|
||||
public string tagGroupDescription { get; set; }
|
||||
/// <summary>
|
||||
/// 数据项数组
|
||||
/// </summary>
|
||||
public List<tagList> tagList { get; set; }
|
||||
|
||||
}
|
||||
public struct tagList
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据项编码
|
||||
/// </summary>
|
||||
public string tagCode { get; set; }
|
||||
/// <summary>
|
||||
/// 数据项描述
|
||||
/// </summary>
|
||||
public string tagDescription { get; set; }
|
||||
/// <summary>
|
||||
/// 数据项备注
|
||||
/// </summary>
|
||||
public string tagRemark { get; set; }
|
||||
/// <summary>
|
||||
/// 数据类型
|
||||
/// </summary>
|
||||
public string valueType { get; set; }
|
||||
/// <summary>
|
||||
/// 计量单位
|
||||
/// </summary>
|
||||
public string unit { get; set; }
|
||||
/// <summary>
|
||||
/// 符合值
|
||||
/// </summary>
|
||||
public double trueValue { get; set; }
|
||||
/// <summary>
|
||||
/// 不符合值
|
||||
/// </summary>
|
||||
public double falseValue { get; set; }
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// </summary>
|
||||
public double minValue { get; set; }
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// </summary>
|
||||
public double maxValue { get; set; }
|
||||
/// <summary>
|
||||
/// 标准值
|
||||
/// </summary>
|
||||
public double standardValue { get; set; }
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.MES.FMS
|
||||
{
|
||||
public class MesReturnParam
|
||||
{
|
||||
public class MesResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 返回信息代码 0:成功
|
||||
/// </summary>
|
||||
public int statusCode { get; set; }
|
||||
/// <summary>
|
||||
/// 返回信息
|
||||
/// </summary>
|
||||
public string statusMessage { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.MES.FMS
|
||||
{
|
||||
public class FMS_In
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统编号
|
||||
/// </summary>
|
||||
public string systemCode { get; set; }
|
||||
/// <summary>
|
||||
/// 产线编号
|
||||
/// </summary>
|
||||
public string houseCode { get; set; }
|
||||
/// <summary>
|
||||
/// 电芯条码
|
||||
/// </summary>
|
||||
public string skuCode { get; set; }
|
||||
/// <summary>
|
||||
/// 设备号
|
||||
/// </summary>
|
||||
public string deviceCode { get; set; }
|
||||
/// <summary>
|
||||
/// 工序号
|
||||
/// </summary>
|
||||
public string processCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JY.MES.FMS
|
||||
{
|
||||
public class FMS_Out
|
||||
{
|
||||
public string systemCode { get; set; }
|
||||
public string houseCode { get; set; }
|
||||
public string skuCode { get; set; }
|
||||
public string deviceCode { get; set; }
|
||||
public string processCode { get; set; }
|
||||
public string testResult { get; set; }
|
||||
public string ngCode { get; set; }
|
||||
public processData processData { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class processData
|
||||
{
|
||||
/// <summary>
|
||||
/// 结果
|
||||
/// </summary>
|
||||
public string testResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 进站时间;必填
|
||||
/// </summary>
|
||||
public string inTime { get; set; }
|
||||
/// <summary>
|
||||
/// 出站时间;必填
|
||||
/// </summary>
|
||||
public string outTime { get; set; }
|
||||
/// <summary>
|
||||
/// 参数判定结果;必填
|
||||
/// </summary>
|
||||
public string cspdjg { get; set; }
|
||||
/// <summary>
|
||||
/// 测试时间;必填
|
||||
/// </summary>
|
||||
public string cssj { get; set; }
|
||||
/// <summary>
|
||||
/// 测试批次;必填
|
||||
/// </summary>
|
||||
public string cspc { get; set; }
|
||||
/// <summary>
|
||||
/// 测试结果;必填
|
||||
/// </summary>
|
||||
public string csjg { get; set; }
|
||||
/// <summary>
|
||||
/// 复测标记;必填
|
||||
/// </summary>
|
||||
public string fcbj { get; set; }
|
||||
/// <summary>
|
||||
/// 复测次数;必填
|
||||
/// </summary>
|
||||
public string fccs { get; set; }
|
||||
/// <summary>
|
||||
/// 复测时间;必填
|
||||
/// </summary>
|
||||
public string fcsj { get; set; }
|
||||
/// <summary>
|
||||
/// 复测原因;必填
|
||||
/// </summary>
|
||||
public string fcyy { get; set; }
|
||||
/// <summary>
|
||||
/// NG原因;必填
|
||||
/// </summary>
|
||||
public string ngyy { get; set; }
|
||||
/// <summary>
|
||||
/// NG时间;必填
|
||||
/// </summary>
|
||||
public string ngsj { get; set; }
|
||||
/// <summary>
|
||||
/// NG位置;必填
|
||||
/// </summary>
|
||||
public string ngwz { get; set; }
|
||||
/// <summary>
|
||||
/// 环境温度;必填
|
||||
/// </summary>
|
||||
public string hjwd { get; set; }
|
||||
/// <summary>
|
||||
/// 环境湿度;必填
|
||||
/// </summary>
|
||||
public string hjsd { get; set; }
|
||||
/// <summary>
|
||||
/// 空气洁净度;必填
|
||||
/// </summary>
|
||||
public string kqjjd { get; set; }
|
||||
/// <summary>
|
||||
/// 班次
|
||||
/// </summary>
|
||||
public string workShift { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user