using JinYuan.Helper; using JinYuan.MES.Enums; using JinYuan.MES.Models; using JinYuan.Models; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection.Emit; using System.Runtime.Remoting.Messaging; using System.Text; using System.Threading.Tasks; namespace JinYuan.MES { public class MesDataProcess : IMes { #region 1、登录验证 /// /// 登录MES验证 /// /// /// /// /// /// /// /// /// public bool LoginEnyity(string url, string siteCode, string lineCode, string equipNum, string userName, string passWord, string UserCardID, ref string Mesage) { bool res = false; string resJson = ""; try { var webApi = new MESApiHelper(); var model = new LoginEnyity { siteCode = siteCode, lineCode = lineCode, equipNum = equipNum, userName = userName, passWord = passWord, userCardID =null// UserCardID }; var nowDate = DateTime.Now; var postData = JsonConvert.SerializeObject(model); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postData); sw.Stop(); if (string.IsNullOrEmpty(result)) { string resData = result == "" ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用员工权限校验接口:{url},请求数据为:{postData},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\员工权限校验\{nowDate.ToString("HH")}.txt", resJson); return res; } var res1 = ReturnMesMsg(result); if (res1 == null || !res1.success || !string.IsNullOrEmpty(res1.code) || !string.IsNullOrEmpty(res1.message)) { var resData = res1 == null ? "" : JsonConvert.SerializeObject(res1); Mesage = res1.message; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用员工权限校验接口:{url},请求数据为:{postData}\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\员工权限校验\{nowDate.ToString("HH")}.txt", resJson); } else { res = true; Mesage = res1.message; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用员工权限校验接口:{url},请求数据为:{postData}\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{JsonConvert.SerializeObject(result)}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\员工权限校验\{nowDate.ToString("HH")}.txt", resJson); } } catch (Exception ex) { resJson = $"调用员工权限校验接口发生异常:{ex.Message}"; LogHelper.Instance.WriteEX("调用员工权限校验接口", ex); } return res; } #endregion #region 2、获取MES参数请求 /// /// 获取MES参数请求 /// /// /// /// /// /// /// /// /// public ParamReturnData GetParamSetRequest(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, ref string Mesage) { string resJson = ""; try { var model = new { siteCode = siteCode, lineCode = lineCode, equipNum = equipNum, materialCode = materialCode, userName = userName }; var nowDate = DateTime.Now; var postcontent = JsonConvert.SerializeObject(model); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); if (string.IsNullOrEmpty(result)) { string resData = result == "" ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用设备参数设定值请求接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\设备参数设定值请求\{nowDate.ToString("HH")}.txt", resJson); return null; } var res1 = ReturnMesMsg(result); if (res1.success) { resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用设备参数设定值请求接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\设备参数设定值请求\{nowDate.ToString("HH")}.txt", resJson); } else { var resData = res1 == null ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用设备参数设定值请求接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\设备参数设定值请求\{nowDate.ToString("HH")}.txt", resJson); } return res1; } catch (Exception ex) { resJson = $"设备参数设定值请求接口发生异常:{ex.Message}"; LogHelper.Instance.WriteEX("设备参数设定值请求接口", ex); } return null; } #endregion #region 3、参数变更请求 /// /// 参数变更请求 /// /// /// /// /// /// /// /// /// /// public bool ParamChange(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, List paramChangeItems, ref string Mesage) { bool res = false; string resJson = ""; try { var model = new ParamChange { siteCode = siteCode, lineCode = lineCode, equipNum = equipNum, materialCode = materialCode, userName = userName, changeTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), tagGroupCode = "", tagGroupDescription = "", }; model.tagList = new List(); model.tagList.Add(new TagListItem { tagCode = "", unitBefore = "", }); var nowDate = DateTime.Now; var postcontent = JsonConvert.SerializeObject(model); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); var resData = result == "" ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用参数设定值变更接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\MesLogs\{nowDate.ToString("yyyyMMdd")}\参数设定值变更\{nowDate.ToString("HH")}.txt", resJson); } catch (Exception ex) { resJson = $"参数设定值变更接口发生异常:{ex.Message}"; LogHelper.Instance.WriteEX("参数设定值变更接口", ex); } return res; } #endregion #region 4、单个上传(只上传卷芯码,不上传托杯码) /// /// 单个上传(只上传卷芯码,不上传托杯码) /// /// /// /// /// /// /// /// /// /// /// {"rows":[{"code":null,"success":true,"message":null,"identification":"InsertAt20231218095755934","containerCode":null,"category":null}],"success":true,"total":1} /// public bool SingleCellInStation(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, string BarCode, ref string Mesage, ref MesResType mesResType) { bool res = false; string resJson = ""; mesResType = MesResType.D;//默认为OK EVEDL14L2JECX01 try { var webApi = new MESApiHelper(); var model = new SingleCellInStation { siteCode = siteCode, lineCode = lineCode, equipNum = equipNum, materialCode = materialCode, userName = userName, identification = BarCode, productType = "MB56" }; var nowDate = DateTime.Now; var postcontent = JsonConvert.SerializeObject(model); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); long outTime = sw.ElapsedMilliseconds; if (outTime > 1000) { LogHelper.Instance.WriteLog($"预焊进站PC<=>MES上传耗时:{outTime}ms,电芯码:{BarCode}", "MESTime"); } if (string.IsNullOrEmpty(result)) { string resData = result == "" ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品进站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); return res; } var res1 = ReturnMesMsg(result); if (res1.success) { res = true; GetInMesResType(res1, BarCode, ref Mesage, ref mesResType); resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品进站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); } else { GetInMesResType(res1, BarCode, ref Mesage, ref mesResType); var resData = res1 == null ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品进站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); } } catch (Exception ex) { Mesage = "调用进站接口超时或MES无返回信息!"; mesResType = MesResType.B; resJson = $"产品进站信息(组装)接口发生异常:{ex.Message}"; LogHelper.Instance.WriteEX("产品进站信息(组装)接口", ex); } return res; } #endregion #region 5、复投单个上传(只上传条码,不上传卷芯码) /// /// 复投单个上传(只上传条码,不上传卷芯码) /// /// /// /// /// /// /// /// /// /// /// public bool SingleFTCellInStation(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, string BarCode, ref string Mesage, ref MesResType mesResType) { bool res = false; string resJson = ""; try { var webApi = new MESApiHelper(); var model = new ManyCellInStation { siteCode = siteCode, lineCode = lineCode, equipNum = equipNum, materialCode = materialCode, userName = userName, }; //电芯条码 model.identificationList = new List(); model.identificationList.Add(BarCode); //电芯托杯码 model.containerCodeList = new List(); var nowDate = DateTime.Now; var postcontent = JsonConvert.SerializeObject(model); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); long outTime = sw.ElapsedMilliseconds; if (outTime > 1000) { LogHelper.Instance.WriteLog($"钢壳进站PC<=>MES上传耗时:{outTime}ms,钢壳码:{BarCode}", "MESTime"); } if (string.IsNullOrEmpty(result)) { string resData = result == "" ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品进站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); return res; } var res1 = ReturnMesMsg(result); if (res1.success) { res = true; GetInMesResType(res1, BarCode, ref Mesage, ref mesResType); resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品进站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); } else { var resData = res1 == null ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品进站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); } } catch (Exception ex) { resJson = $"产品进站信息(组装)接口发生异常:{ex.Message}"; LogHelper.Instance.WriteEX("产品进站信息(组装)接口", ex); } return res; } #endregion #region 6、多个电池进站 /// /// 多个电池进站 /// /// /// /// /// /// /// /// /// /// /// public bool ManyCellInStation(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, List listBar, ref List MesMessage, ref List mesResType) { bool res = false; string resJson = ""; MesMessage = GetListString(listBar.Count, "进站失败"); mesResType = GetMesType(listBar.Count); try { var model = new ManyCellInStation { siteCode = siteCode, lineCode = lineCode, equipNum = equipNum, materialCode = materialCode, userName = userName, productType = "OK", }; //电芯条码 model.identificationList = new List(); for (int i = 0; i < listBar.Count; i++) { model.identificationList.Add(listBar[i]); } var nowDate = DateTime.Now; var postcontent = JsonConvert.SerializeObject(model); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); long outTime = sw.ElapsedMilliseconds; if (outTime > 1000) { LogHelper.Instance.WriteLog($"预焊进站PC<=>MES上传耗时:{outTime}ms,电芯码:{listBar[0]},{listBar[1]},{listBar[2]},{listBar[3]}", "MESTime"); } if (string.IsNullOrEmpty(result)) { string resData = result == "" ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品进站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); return res; } var res1 = ReturnMesMsg(result); bool temple = false; if (res1 != null) { temple = true; } if (temple) { res = true; //GetInMesResType(res1, listBar, ref MesMessage, ref mesResType); resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品进站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); } else { var resData = res1 == null ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品进站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); } } catch (Exception ex) { resJson = $"产品进站信息(组装)接口发生异常:{ex.Message}"; LogHelper.Instance.WriteEX("产品进站信息(组装)接口", ex); } return res; } #endregion #region 7、单个电池出站 /// /// 单个电池出站 /// /// /// /// /// /// /// /// /// /// /// /// public bool SingleCellOutStation(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, BGearEntity m, int type, string materialLotCodeLocator, ref string mesage, ref MesResType mesResType) { bool res = false; string resJson = ""; string[] ngCode = new string[1]; ngCode[0] = ""; try { JArray jaContainerCode = new JArray(); //containerCodeAndIdentificationList JArray jaMaterialLotCodeList = new JArray(); //materialLotCodeList JObject jo4 = new JObject(); jo4.Add("materialLotCode", ""); jo4.Add("materialLotCodeLocator", materialLotCodeLocator); jaMaterialLotCodeList.Add(jo4); JArray jaIdentiftyList = new JArray();//identiftyList JObject jo3 = new JObject(); jo3.Add("identification", m.CSBYHCODEA); //卷心码 jo3.Add("qualityStatus", m.Result); jo3.Add("qrCode", ""); // jo3.Add("ngMessage", m.Remark); jo3.Add("materialLotList", jaMaterialLotCodeList); jaIdentiftyList.Add(jo3); JObject jo2 = new JObject(); jo2.Add("containerCode", "");//托杯码 jo2.Add("identiftyList", jaIdentiftyList); jaContainerCode.Add(jo2); JObject jo1 = new JObject(); jo1.Add("siteCode", siteCode); jo1.Add("lineCode", lineCode); jo1.Add("equipNum", equipNum); jo1.Add("userName", userName); jo1.Add("productType", ""); jo1.Add("completeQty", ""); jo1.Add("type", 1); //追溯标识替换 jo1.Add("materialCode", materialCode); jo1.Add("containerCodeAndIdentificationList", jaContainerCode); var nowDate = DateTime.Now; var postcontent = JsonConvert.SerializeObject(jo1); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); long outTime = sw.ElapsedMilliseconds; if (outTime > 1000) { LogHelper.Instance.WriteLog($"钢壳进出站PC<=>MES上传耗时:{outTime}ms,钢壳码:{m.CSBYHCODEA}", "MESTime"); } if (string.IsNullOrEmpty(result)) { string resData = result == "" ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息\{nowDate.ToString("HH")}.txt", resJson); return res; } var res1 = ReturnMesMsg(result); if (res1.success) { res = true; GetOutMesResType(res1, m.CSBYHCODEA, ref mesage, ref mesResType); resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息\{nowDate.ToString("HH")}.txt", resJson); } else { var resData = res1 == null ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息\{nowDate.ToString("HH")}.txt", resJson); } } catch (Exception ex) { resJson = $"产品出站信息(组装)接口发生异常:{ex.Message}"; LogHelper.Instance.WriteEX("产品出站信息(组装)接口", ex); } return res; } #endregion #region 8、进出站一体模式(单电池) /// /// 进出站一体模式(单电池) /// /// /// /// /// /// /// /// /// /// /// /// /// public bool SingleCellInAndOutStation(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, BGearEntity m, int type, string materialLotCodeLocator, ref string mesage, ref MesResType mesResType) { bool res = false; string resJson = ""; string[] ngCode = new string[1]; ngCode[0] = ""; try { JArray jaContainerCode = new JArray(); //containerCodeAndIdentificationList JArray jaMaterialLotCodeList = new JArray(); //materialLotCodeList JObject jo4 = new JObject(); jo4.Add("materialLotCode", ""); jo4.Add("materialLotCodeLocator", materialLotCodeLocator); jaMaterialLotCodeList.Add(jo4); JArray jaIdentiftyList = new JArray();//identiftyList JObject jo3 = new JObject(); jo3.Add("identification", m.CSBYHCODEA); //卷心码 jo3.Add("qualityStatus", m.Result); jo3.Add("qrCode", ""); // jo3.Add("ngMessage", m.Remark); jo3.Add("materialLotList", jaMaterialLotCodeList); jaIdentiftyList.Add(jo3); JObject jo2 = new JObject(); jo2.Add("containerCode", "");//托杯码 jo2.Add("identiftyList", jaIdentiftyList); jaContainerCode.Add(jo2); JObject jo1 = new JObject(); jo1.Add("siteCode", siteCode); jo1.Add("lineCode", lineCode); jo1.Add("equipNum", equipNum); jo1.Add("userName", userName); jo1.Add("productType", ""); jo1.Add("completeQty", ""); jo1.Add("type", 1); //追溯标识替换 jo1.Add("materialCode", materialCode); jo1.Add("containerCodeAndIdentificationList", jaContainerCode); var nowDate = DateTime.Now; var postcontent = JsonConvert.SerializeObject(jo1); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); long outTime = sw.ElapsedMilliseconds; if (outTime > 1000) { LogHelper.Instance.WriteLog($"钢壳进出站PC<=>MES上传耗时:{outTime}ms,钢壳码:{m.CSBYHCODEA}", "MESTime"); } if (string.IsNullOrEmpty(result)) { string resData = result == "" ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用进出站一体信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进出站一体信息(组装)\{nowDate.ToString("HH")}.txt", resJson); return res; } var res1 = ReturnMesMsg(result); if (res1.success) { res = true; GetOutMesResType(res1, m.CSBYHCODEA, ref mesage, ref mesResType); resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用进出站一体信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进出站一体信息(组装)\{nowDate.ToString("HH")}.txt", resJson); } else { var resData = res1 == null ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用进出站一体信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品进出站一体信息(组装)\{nowDate.ToString("HH")}.txt", resJson); } } catch (Exception ex) { resJson = $"产品进出站一体信息(组装)接口发生异常:{ex.Message}"; LogHelper.Instance.WriteEX("产品进出站一体信息(组装)接口", ex); } return res; } #endregion /// /// 多个电芯上传 /// /// /// public bool OutboundInformations(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, BGearEntity listBar, ref string MesMessage, ref MesResType mesResType, List NGcodeList) { bool res = false; string resJson = ""; MesMessage = "出站失败"; mesResType = MesResType.B; //MesMessage = GetListString(listBar.Count, "出站失败"); //mesResType = GetMesType(listBar.Count); try { var model = new ManyCellOutStation { siteCode = siteCode, lineCode = lineCode, equipNum = equipNum, userName = userName, containerCode = "", materialCode = materialCode, productType = "OK", //completeQty = listBar.Count.ToString(), type = 1 }; for (int i = 0; i < 1; i++) { //先给mes 传OK model.assembleLineList = new List() { new assembleLineList() { identification=listBar.CSBYHCODEA, qualityStatus = listBar.CSBYHOUTSTATIONJUDGMENTRESULT, qrCode = "", ngCode = NGcodeList, ngMessage = listBar.Remark, materialLotList=new List{}, materialLotCode= "", } }; //cc.identification = listBar[i].BarCode; //cc.materialLotList = GetListString(1, ""); //cc.materialLotCode = ""; //cc.materialLotCodeLocator = ""; //cc.qualityStatus = listBar[i].Result.ToString(); //cc.qrCode = ""; //cc.ngCode = GetListString(1, ""); //cc. //model.containerCodeAndIdentificationList[i].identiftyList.Add(new IdentiftyListItems //{ // identification = listBar[i].BarCode, // qualityStatus ="OK" , // qrCode = "", // ngMessage = listBar[i].Remark, //}); //model.containerCodeAndIdentificationList[i].identiftyList[i].materialLotList = new List(); //model.containerCodeAndIdentificationList[i].identiftyList[i].materialLotList.Add(new MaterialLotListItems //{ // materialLotCode = "", // materialLotCodeLocator = "", //}); //model.containerCodeAndIdentificationList.Add(cc); } var nowDate = DateTime.Now; var postcontent = JsonConvert.SerializeObject(model); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); long outTime = sw.ElapsedMilliseconds; if (outTime > 1000) { LogHelper.Instance.WriteLog($"外观检出站PC<=>MES上传耗时:{outTime}ms,电芯码:{listBar.CSBYHCODEA}", "MESTime"); } if (string.IsNullOrEmpty(result)) { string resData = result == "" ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); return res; } var res1 = ReturnMesMsg(result); if (res1.success) { res = true; GetOutMesResType(res1, listBar.CSBYHCODEA, ref MesMessage, ref mesResType); resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); } else { GetOutMesResType(res1, listBar.CSBYHCODEA, ref MesMessage, ref mesResType); var resData = res1 == null ? "" : result; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); } } catch (Exception ex) { resJson = $"产品出站信息(组装)接口发生异常:{ex.Message}"; LogHelper.Instance.WriteEX("产品出站信息(组装)接口", ex); } return res; } //#region 9、多个电池出站 ///// ///// 多个电池出站 ///// ///// ///// ///// ///// ///// ///// ///// ///// ///// ///// ///// //public bool ManyCellOutStation(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, List list, int type, string materialLotCodeLocator, ref List MesMessage, ref List mesResType) //{ // DateTime nowDate = DateTime.Now; // string resJson = ""; // bool res = false; // MesMessage = GetListString(list.Count, "MES出站失败"); // mesResType = GetMesType(list.Count); // try // { // JArray jaContainerCode = new JArray(); //containerCodeAndIdentificationList // foreach (BGearEntity m in list) // { // JArray jaMaterialLotCodeList = new JArray(); //materialLotCodeList // JObject jo4 = new JObject(); // jo4.Add("materialLotCode", ""); // jo4.Add("materialLotCodeLocator", materialLotCodeLocator); // jaMaterialLotCodeList.Add(jo4); // JArray jaIdentiftyList = new JArray();//identiftyList // JObject jo3 = new JObject(); // jo3.Add("identification", m.BarCode); //电芯码 // jo3.Add("materialLotList", ""); // jo3.Add("materialLotCode", ""); // jo3.Add("materialLotCodeLocator", ""); // jo3.Add("qualityStatus", m.Result); // jo3.Add("qrCode", ""); // // jo3.Add("ngCode",m.ngCode); // jo3.Add("ngMessage", m.Remark); // jo3.Add("materialLotList", jaMaterialLotCodeList); // jaIdentiftyList.Add(jo3); // } // JObject jo1 = new JObject(); // jo1.Add("siteCode", siteCode);//工厂代码 // jo1.Add("lineCode", lineCode);//产线编号 // jo1.Add("equipNum", equipNum);//设备编号 // jo1.Add("materialCode", materialCode);//物料编码 // jo1.Add("userName", userName);//员工账号 // jo1.Add("productType", "");//产品类型 // jo1.Add("completeQty", "");//完工数 // jo1.Add("containerCode", "");//托盘码 // jo1.Add("type", 1); //追溯标识替换 // jo1.Add("containerCodeAndIdentificationList", jaContainerCode); // var postcontent = JsonConvert.SerializeObject(jo1); // var sw = new Stopwatch(); // sw.Start(); // string result = MESApiHelper.WepPostAPIAsync(url, postcontent); // sw.Stop(); // long outTime = sw.ElapsedMilliseconds; // if (outTime > 1000) // { // LogHelper.Instance.WriteLog($"预焊出站PC<=>MES上传耗时:{outTime}ms,电芯码:{list[0].BarCode},{list[1].BarCode},{list[2].BarCode},{list[3].BarCode},{list[4].BarCode},{list[5].BarCode},{list[6].BarCode},{list[7].BarCode}", "MESTime"); // } // if (string.IsNullOrEmpty(result)) // { // string resData = result == "" ? "" : result; // resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; // TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); // return res; // } // var res1 = ReturnMesMsg(result); // if (res1.success) // { // res = true; // GetOutMesResType(res1, list, ref MesMessage, ref mesResType); // resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; // TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); // } // else // { // var resData = res1 == null ? "" : result; // resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品出站信息(组装)接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; // TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品出站信息(组装)\{nowDate.ToString("HH")}.txt", resJson); // } // } // catch (Exception ex) // { // resJson = $"产品出站信息(组装)接口发生异常:{ex.Message}"; // LogHelper.Instance.WriteEX("产品出站信息(组装)接口", ex); // } // return res; //} //#endregion #region 10、 过程数据上传 /// /// 过程数据上传 /// /// /// /// /// /// /// /// /// /// /// /// public bool ProductProcessParam(string url, string siteCode, string userName, string equipNum, string lineCode, string materialCode, MesUploadType unloadType, List productProcessParam, ref string resJson) { throw new NotImplementedException(); } #endregion #region 11、结果参数上传 /// /// 结果参数上传 /// /// /// /// /// /// /// /// /// /// /// public bool ProducResultParam(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, BGearEntity m, MesUploadType unloadType, ref string Mesage) { bool res = false; string resJson = ""; #region 预焊机结果上传MES //try //{ // var nowDate = DateTime.Now; // string sNowDate = nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff"); // var model = new ProductResultParameters // { // equipNum = equipNum, // type = unloadType.ToString(), // payload = "" // }; // string ZhongliangA = ""; // string ZhongliangB = ""; // string CeHouA = ""; // string CeHouB = ""; // string JiXingA = ""; // string JiXingB = ""; // string HanYingA = ""; // string HanYingB = ""; // string ZhengJiErSiLieA = ""; // string ZhengJiErSiLieB = ""; // string BeiJiErSiLieA = ""; // string BeiJiErSiLieB = ""; // string ZhengJiErFanA = ""; // string ZhengJiErFanB = ""; // string BeiJiErFanA = ""; // string BeiJiErFanB = ""; // for (int i = 0; i < 2; i++) // { // //芯包重量1判定结果 // if (m.list_Data1[i, 10] == 1) // { // if (i == 0) // ZhongliangA = "OK"; // else // ZhongliangB = "OK"; // } // else if (m.list_Data1[i, 10] == 2) // { // if (i == 0) // ZhongliangA = "NG"; // else // ZhongliangB = "NG"; // } // //芯包侧厚判定结果 // if (m.list_Data1[i, 11] == 1) // { // if (i == 0) // CeHouA = "OK"; // else // CeHouB = "OK"; // } // else if (m.list_Data1[i, 11] == 2) // { // if (i == 0) // CeHouA = "NG"; // else // CeHouB = "NG"; // } // //芯包CCD极性检测结果 // if (m.list_Data1[i, 12] == 1) // { // if (i == 0) // JiXingA = "OK"; // else // JiXingB = "OK"; // } // else if (m.list_Data1[i, 12] == 2) // { // if (i == 0) // JiXingA = "NG"; // else // JiXingB = "NG"; // } // //芯包焊印位置判定结果 // if (m.list_Data1[i, 15] == 1) // { // if (i == 0) // HanYingA = "OK"; // else // HanYingB = "OK"; // } // else if (m.list_Data1[i, 15] == 2) // { // if (i == 0) // HanYingA = "NG"; // else // HanYingB = "NG"; // } // //芯包正面极耳撕裂判定结果 // if (m.list_Data1[i, 16] == 1) // { // if (i == 0) // ZhengJiErSiLieA = "OK"; // else // ZhengJiErSiLieB = "OK"; // } // else if (m.list_Data1[i, 16] == 2) // { // if (i == 0) // ZhengJiErSiLieA = "NG"; // else // ZhengJiErSiLieB = "NG"; // } // //芯包背面极耳撕裂判定结果 // if (m.list_Data1[i, 17] == 1) // { // if (i == 0) // BeiJiErSiLieA = "OK"; // else // BeiJiErSiLieB = "OK"; // } // else if (m.list_Data1[i, 17] == 2) // { // if (i == 0) // BeiJiErSiLieA = "NG"; // else // BeiJiErSiLieB = "NG"; // } // //芯包正面极耳翻折检测结果 // if (m.list_Data1[i, 18] == 1) // { // if (i == 0) // ZhengJiErFanA = "OK"; // else // ZhengJiErFanB = "OK"; // } // else if (m.list_Data1[i, 18] == 2) // { // if (i == 0) // ZhengJiErFanA = "NG"; // else // ZhengJiErFanB = "NG"; // } // //芯包背面极耳翻折检测结果 // if (m.list_Data1[i, 19] == 1) // { // if (i == 0) // BeiJiErFanA = "OK"; // else // BeiJiErFanB = "OK"; // } // else if (m.list_Data1[i, 19] == 2) // { // if (i == 0) // BeiJiErFanA = "NG"; // else // BeiJiErFanB = "NG"; // } // } // switch (unloadType) // { // case MesUploadType.DD: // var payload1 = new Payload1 // { // siteCode = siteCode, // lineCode = lineCode, // userName = userName, // materialCode = materialCode, // carCode = "", // collection = "JS", // recordDate = sNowDate, // qty = 1, // containerCode = "", // }; // payload1.identification = new IdentificationListItem // { // identification = m.CSBYHCODEA, // qualityStatus = m.CSBYHOUTSTATIONJUDGMENTRESULT, // }; // payload1.tagDataVOList = new List // { // new TagDataVOListItem // { // tagCode="CSBYH_CELL_TYPE", // tagValue = m.A_B, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包类型" // }, // new TagDataVOListItem // { // tagCode="CSBYH_IN_STATION_TIME", // tagValue = m.CSBYHINSTATIONTIME, // tagTime = m.ScanTime[0], // tagCalculateResult = "Y", // tagRemark = "进站时间" // }, // new TagDataVOListItem // { // tagCode="CSBYH_OUT_STATION_TIME", // tagValue = m.CSBYHOUTSTATIONTIME, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "出站时间" // }, // new TagDataVOListItem // { // tagCode="CSBYH_WEIGHT_NO_A1", // tagValue = m.CSBYHWEIGHTNOA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包称重工位号" // }, // new TagDataVOListItem // { // tagCode="CSBYH_WEIGHT_A1_MAX_SETTING", // tagValue = m.CSBYHWEIGHTA1MAXSETTING.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包重量设定值最大值(g)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_WEIGHT_A1_MIN_SETTING", // tagValue = m.CSBYHWEIGHTA1MINSETTING.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包重量设定值最小值(g)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_WEIGHT_A1", // tagValue = m.CSBYHWEIGHTA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包重量(g)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_WEIGHT_RESULT_A1", // tagValue = m.CSBYHWEIGHTRESULTA1, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包重量判定结果" // }, // new TagDataVOListItem // { // tagCode="CSBYH_THICKNESS_TEST_STATION_NO_A", // tagValue = m.CSBYHTHICKNESSTESTSTATIONNOA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包测厚工位号" // }, // new TagDataVOListItem // { // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_MAX_SETTING_A", // tagValue = m.CSBYHTHICKNESSTESTPRESSUREMAXSETTINGA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包测厚压力(Kg)设定最大值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_MIN_SETTING_A", // tagValue = m.CSBYHTHICKNESSTESTPRESSUREMINSETTINGA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包测厚压力(Kg)设定最小值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_A", // tagValue = m.CSBYHTHICKNESSTESTPRESSUREA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包测厚压力实际值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_SIZE_A", // tagValue = m.CSBYHTHICKNESSTESTPRESSURESIZEA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包侧厚尺寸(mm)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_MAX_SIZE_A", // tagValue = m.CSBYHTHICKNESSTESTPRESSUREMAXSIZEA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包侧厚最大尺寸(mm)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_MIN_SIZE_A", // tagValue = m.CSBYHTHICKNESSTESTPRESSUREMINSIZEA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包侧厚最小尺寸(mm)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_THICKNESS_TEST_JUDGE_RESULT_A", // tagValue = m.CSBYHTHICKNESSTESTJUDGERESULTA, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包测厚判定结果" // }, // new TagDataVOListItem // { // tagCode="CSBYH_POLARITY_RESULT_A", // tagValue = m.CSBYHPOLARITYRESULTA, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包极性检测结果" // }, // new TagDataVOListItem // { // tagCode="CSBYH_TOOLNO_A", // tagValue = m.CSBYHTOOLNOA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包治具号" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_PRESSURE_MAX_SETTING", // tagValue = m.CSBYHCUWELDINGPRESSUREMAXSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铜极耳预焊焊接压力(Psi)设定值最大值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_PRESSURE_MIN_SETTING", // tagValue = m.CSBYHCUWELDINGPRESSUREMINSETTING.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铜极耳预焊焊接压力(Psi)设定值最小值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_POWER_MAX_SETTING", // tagValue = m.CSBYHCUWELDINGPOWERMAXSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铜极耳预焊焊接功率(W)设定值最大值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_POWER_MIN_SETTING", // tagValue = m.CSBYHCUWELDINGPOWERMINSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铜极耳预焊焊接功率(W)设定值最小值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_ENERGY_MAX_SETTING", // tagValue = m.CSBYHCUWELDINGENERGYMAXSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铜极耳预焊焊接能量(J)设定值最大值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_ENERGY_MIN_SETTING", // tagValue = m.CSBYHCUWELDINGENERGYMINSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铜极耳预焊焊接能量(J)设定值最小值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_AMPLITUDE_MAX_SETTING", // tagValue = m.CSBYHCUWELDINGAMPLITUDEMAXSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铜极耳预焊焊接振幅(μm)设定值最大值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_AMPLITUDE_MIN_SETTING", // tagValue = m.CSBYHCUWELDINGAMPLITUDEMINSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铜极耳预焊焊接振幅(μm)设定值最小值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_STATION_NO_A", // tagValue = m.CSBYHCUWELDINGSTATIONNOA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜焊接1工位号" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_STATION_NO_A2", // tagValue = m.CSBYHCUWELDINGSTATIONNOA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜焊接2工位号" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_STATION_NO_A3", // tagValue = m.CSBYHCUWELDINGSTATIONNOA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜焊接3工位号" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_PRESSURE_A1", // tagValue = m.CSBYHCUPRESSUREA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接压力(Psi)实际值1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_POWER_A1", // tagValue = m.CSBYHCUPOWERA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接功率(W)实际值1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_ENERGY_A1", // tagValue = m.CSBYHCUENERGYA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接能量(J)实际值1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_AMPLITUDE_A1", // tagValue = m.CSBYHCUAMPLITUDEA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接振幅(μm)实际值1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_TIME_A1", // tagValue = m.CSBYHCUTIMEA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接时间(ms)实际值1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_PRESSURE_A2", // tagValue = m.CSBYHCUPRESSUREA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接压力(Psi)实际值2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_POWER_A2", // tagValue = m.CSBYHCUPOWERA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接功率A(W)实际值2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_ENERGY_A2", // tagValue = m.CSBYHCUENERGYA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接能量(J)实际值2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_AMPLITUDE_A2", // tagValue = m.CSBYHCUENERGYA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接振幅(μm)实际值2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_TIME_A2", // tagValue = m.CSBYHCUTIMEA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接时间(ms)实际值2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_PRESSURE_A3", // tagValue = m.CSBYHCUPRESSUREA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接压力(Psi)实际值3" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_POWER_A3", // tagValue = m.CSBYHCUPOWERA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接功率A(W)实际值3" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_ENERGY_A3", // tagValue = m.CSBYHCUENERGYA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接能量(J)实际值3" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_AMPLITUDE_A3", // tagValue = m.CSBYHCUAMPLITUDEA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接振幅(μm)实际值3" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_TIME_A3", // tagValue = m.CSBYHCUTIMEA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜极耳预焊焊接时间(ms)实际值3" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELD_HEAD_COUNT_A", // tagValue = m.CSBYHCUWELDHEADCOUNTA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜焊1焊头次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELD_HEAD_COUNT_A2", // tagValue = m.CSBYHCUWELDHEADCOUNTA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜焊2焊头次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELD_HEAD_COUNT_A3", // tagValue = m.CSBYHCUWELDHEADCOUNTA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜焊3焊头次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELD_BASE_COUNT_A", // tagValue = m.CSBYHCUWELDBASECOUNTA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜焊1焊座次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELD_BASE_COUNT_A2", // tagValue = m.CSBYHCUWELDBASECOUNTA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜焊2焊座次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELD_BASE_COUNT_A3", // tagValue = m.CSBYHCUWELDBASECOUNTA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜焊3焊座次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_PRESSURE_MAX_SETTING", // tagValue = m.CSBYHALWELDINGPRESSUREMAXSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铝极耳预焊焊接压力(Psi)设定值最大值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_PRESSURE_MIN_SETTING", // tagValue = m.CSBYHALWELDINGPRESSUREMINSETTING.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铝极耳预焊焊接压力(Psi)设定值最小值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_POWER_MAX_SETTING", // tagValue = m.CSBYHALWELDINGPOWERMAXSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铝极耳预焊焊接功率(W)设定值最大值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_POWER_MIN_SETTING", // tagValue = m.CSBYHALWELDINGPOWERMINSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铝极耳预焊焊接功率(W)设定值最小值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_ENERGY_MAX_SETTING", // tagValue = m.CSBYHALWELDINGENERGYMAXSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铝极耳预焊焊接能量(J)设定值最大值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_ENERGY_MIN_SETTING", // tagValue = m.CSBYHALWELDINGENERGYMINSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铝极耳预焊焊接能量(J)设定值最小值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_AMPLITUDE_MAX_SETTING", // tagValue = m.CSBYHALWELDINGAMPLITUDEMAXSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铝极耳预焊焊接振幅(μm)设定值最大值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_AMPLITUDE_MIN_SETTING", // tagValue = m.CSBYHALWELDINGAMPLITUDEMINSETTING1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铝极耳预焊焊接振幅(μm)设定值最小值" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_STATION_NO_A", // tagValue = m.CSBYHALWELDINGSTATIONNOA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝焊接1工位号" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_STATION_NO_A2", // tagValue = m.CSBYHALWELDINGSTATIONNOA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝焊接2工位号" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_STATION_NO_A3", // tagValue = m.CSBYHALWELDINGSTATIONNOA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝焊接3工位号" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_PRESSURE_A1", // tagValue = m.CSBYHALPRESSUREA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接压力(Psi)实际值1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_POWER_A1", // tagValue = m.CSBYHALPOWERA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接功率(W)实际值1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_ENERGY_A1", // tagValue = m.CSBYHALENERGYA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接能量(J)实际值1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_AMPLITUDE_A1", // tagValue = m.CSBYHALAMPLITUDEA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接振幅(μm)实际值1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_TIME_A1", // tagValue = m.CSBYHALTIMEA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接时间(ms)实际值1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_PRESSURE_A2", // tagValue = m.CSBYHALPRESSUREA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接压力(Psi)实际值2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_POWER_A2", // tagValue = m.CSBYHALPOWERA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接功率(W)实际值2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_ENERGY_A2", // tagValue = m.CSBYHALENERGYA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接能量(J)实际值2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_AMPLITUDE_A2", // tagValue = m.CSBYHALAMPLITUDEA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接振幅(μm)实际值2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_TIME_A2", // tagValue = m.CSBYHALTIMEA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接时间(ms)实际值2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_PRESSURE_A3", // tagValue = m.CSBYHALPRESSUREA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接压力(Psi)实际值3" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_POWER_A3", // tagValue = m.CSBYHALPOWERA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接功率(W)实际值3" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_ENERGY_A3", // tagValue = m.CSBYHALENERGYA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接能量(J)实际值3" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_AMPLITUDE_A3", // tagValue = m.CSBYHALAMPLITUDEA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接振幅(μm)实际值3" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_TIME_A3", // tagValue = m.CSBYHALTIMEA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝极耳预焊焊接时间(ms)实际值3" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELD_HEAD_COUNT_A", // tagValue = m.CSBYHALWELDHEADCOUNTA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝焊1焊头次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELD_HEAD_COUNT_A2", // tagValue = m.CSBYHALWELDHEADCOUNTA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝焊2焊头次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELD_HEAD_COUNT_A3", // tagValue = m.CSBYHALWELDHEADCOUNTA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝焊3焊头次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELD_BASE_COUNT_A", // tagValue = m.CSBYHALWELDBASECOUNTA1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝焊1焊座次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELD_BASE_COUNT_A2", // tagValue = m.CSBYHALWELDBASECOUNTA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝焊2焊座次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELD_BASE_COUNT_A3", // tagValue = m.CSBYHALWELDBASECOUNTA3.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝焊3焊座次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CUTABCUTTERNO_A", // tagValue = m.CSBYHCUTABCUTTERNOA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯铜极耳切刀编号" // }, // new TagDataVOListItem // { // tagCode="CSBYH_ALTABCUTTERNO_A", // tagValue = m.CSBYHALTABCUTTERNOA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯铝极耳切刀编号" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CUTABCUTTERCOUNTA", // tagValue = m.CSBYHCUTABCUTTERCOUNTA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯铜极耳切刀使用次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_ALTABCUTTERCOUNTA", // tagValue = m.CSBYHALTABCUTTERCOUNTA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯铝极耳切刀使用次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CUTABLENGTHA", // tagValue = m.CSBYHCUTABLENGTHA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯铜极极耳长度(mm)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CUTABWIDTHA", // tagValue = m.CSBYHCUTABWIDTHA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯铜极极耳宽度(mm)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_ALTABLENGTHA", // tagValue = m.CSBYHALTABLENGTHA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯铝极极耳长度(mm)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_ALTABWIDTHA", // tagValue = m.CSBYHALTABWIDTHA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯铝极极耳宽度(mm)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_TOP_WELDING_DISTANCE1", // tagValue = m.CSBYHTOPTOSOLDERDISTANCEA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜顶部到焊印间距1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_POSITION_RESULT1", // tagValue = m.CSBYHSOLDERJUDGERESULTA, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜焊印位置判定结果1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_TOP_WELDING_DISTANCE2", // tagValue = m.CSBYHTOPTOSOLDERDISTANCEA2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜顶部到焊印间距2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_POSITION_RESULT2", // tagValue = m.CSBYHSOLDERJUDGERESULTA2, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铜焊印位置判定结果2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_TOP_WELDING_DISTANCE1", // tagValue = m.AluminumToWeld1.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝顶部到焊印间距1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_POSITION_RESULT1", // tagValue = m.AluminiumWeldPositionResult1, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝焊印位置判定结果1" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_TOP_WELDING_DISTANCE2", // tagValue = m.AluminumToWeld2.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝顶部到焊印间距2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_POSITION_RESULT2", // tagValue = m.AluminiumWeldPositionResult2, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包铝焊印位置判定结果2" // }, // new TagDataVOListItem // { // tagCode="CSBYH_FRONT_EAR_CRACKLE_RESULT_A", // tagValue = m.CSBYHFRONTEARCRACKLERESULTA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包正面极耳撕裂裂纹检测结果(mm)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_FRONT_EAR_CRACKLE_JUDGE_RESULT_A", // tagValue = m.CSBYHFRONTEARCRACKLEJUDGERESULTA, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包正面极耳撕裂判定结果" // }, // new TagDataVOListItem // { // tagCode="CSBYH_BACK_EAR_CRACKLE_RESULT_A", // tagValue = m.CSBYHBACKEARCRACKLERESULTA.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包背面极耳撕裂裂纹检测结果(mm)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_BACK_EAR_CRACKLE_JUDGE_RESULT_A", // tagValue = m.CSBYHBACKEARCRACKLEJUDGERESULTA, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包背面极耳撕裂判定结果" // }, // new TagDataVOListItem // { // tagCode="CSBYH_FRONT_EAR_FLODING_RESULT_A", // tagValue = m.CSBYHFRONTEARFLODINGRESULTA, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包正面极耳翻折检测结果" // }, // new TagDataVOListItem // { // tagCode="CSBYH_BACK_EAR_FLODING_RESULT_A", // tagValue = m.CSBYHBACKEARFLODINGRESULTA, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包背面极耳翻折检测结果" // }, // new TagDataVOListItem // { // tagCode="CSBYH_SCHEDULE", // tagValue = m.CSBYHSCHEDULE, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯班次" // }, // new TagDataVOListItem // { // tagCode="CSBYH_OUT_STATION_JUDGMENT_RESULT", // tagValue = m.CSBYHOUTSTATIONJUDGMENTRESULT, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "芯包出站判定结果" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_HEAD_WARNING_LIFE", // tagValue = m.CopperWeldHeadLife.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铜焊头预警寿命(次)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CU_WELDING_SEAT_WARNING_LIFE", // tagValue = m.CopperWeldSeatLife.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铜焊座预警寿命(次)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_HEAD_WARNING_LIFE", // tagValue = m.AluminiumWeldHeadLife.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铝焊头预警寿命(次)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_AL_WELDING_SEAT_WARNING_LIFE", // tagValue = m.AluminiumWeldSeatLife.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "铝焊座预警寿命(次)" // }, // new TagDataVOListItem // { // tagCode="CSBYH_CUTTING_KNIFE_USING_LIFE", // tagValue = m.CuttingKnifeLife.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "裁切刀使用寿命(次)" // }, // new TagDataVOListItem // { // tagCode="RESUBMISSION_NUMBER_YH", // tagValue = m.RethrowNum.ToString(), // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "复投次数" // }, // new TagDataVOListItem // { // tagCode="CSBYH_PROCESS_NAME", // tagValue = m.CSBYHPROCESSNAME, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯工序名" // }, // new TagDataVOListItem // { // tagCode="CSBYH_ABNORMAL_INFORMATION", // tagValue = m.Remark, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯异常反馈信息" // }, // new TagDataVOListItem // { // tagCode="CSBYH_QUALITY_STATUS", // tagValue = m.CSBYHOUTSTATIONJUDGMENTRESULT, // tagTime = m.TestTime, // tagCalculateResult = "Y", // tagRemark = "电芯质量状态" // }, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CODE_A", // // tagValue = m.listBatCode[0], // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "A芯包条码" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CODE_B", // // tagValue = m.listBatCode[1], // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包条码" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_A_SCANNING_TIME", // // tagValue = m.ScanTime[0], // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "A芯包扫码时间" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_A_SCANNING_TIME", // // tagValue = m.ScanTime[0], // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包扫码时间" // //}, // //new TagDataVOListItem // //{ // // tagCode="", // // tagValue = "无", // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "A环轨编号" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUT_ADHESION_JUDGE_RESULT_A", // // tagValue = m.list_Data1[0, 13].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "A电芯裁切粘连判定结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUT_BURR_JUDGE_RESULT_A", // // tagValue = m.list_Data1[0, 14].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "A电芯裁切毛刺判定结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_SOLDER_JUDGE_RESULT_A", // // tagValue = HanYingA, // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "A芯包焊印位置判定结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUT_ADHESION_RESULT_A", // // tagValue = m.list_Data4[0, 7].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "A电芯裁切粘连结果(mm2)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUT_BURR_RESULT_A", // // tagValue = m.list_Data4[0, 8].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "A电芯裁切毛刺结果(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_TOP_TO_SOLDER_DISTANCE_A", // // tagValue = m.list_Data4[0, 9].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "A芯包顶部到焊印间距(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_SOLDER_TO_EAR_DISTANCE_A", // // tagValue = m.list_Data4[0, 10].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "A芯包焊印边缘到极耳边缘间距(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_WEIGHT_NO_B1", // // tagValue = m.list_Data1[1, 1].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包称重1工位号" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_WEIGHT_RESULT_B1", // // tagValue = ZhongliangB, // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包重量1判定结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="", // // tagValue = "无", // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B环轨编号" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_THICKNESS_TEST_STATION_NO_B", // // tagValue = m.list_Data1[1, 2].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包侧厚工位号" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_THICKNESS_TEST_JUDGE_RESULT_B", // // tagValue = CeHouB, // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包侧厚判定结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_POLARITY_RESULT_B", // // tagValue = JiXingB, // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包极性检测结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_TOOLNO_B", // // tagValue = m.list_Data1[1, 3].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包治具号" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_WELDING_STATION_NO_B", // // tagValue = m.list_Data1[1, 4].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊接工位号" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_WELD_HEAD_COUNT_B", // // tagValue = m.list_Data2[1, 0].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊头次数" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_WELD_BASE_COUNT_B", // // tagValue = m.list_Data2[1, 1].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊座次数" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_WELDING_STATION_NO_B", // // tagValue = m.list_Data1[1, 7].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊接工位号" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_WELD_HEAD_COUNT_B", // // tagValue = m.list_Data2[1, 6].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊头次数" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_WELD_BASE_COUNT_B", // // tagValue = m.list_Data2[1, 7].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊座次数" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUTABCUTTERCOUNTB", // // tagValue = m.list_Data2[1, 12].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯铜极耳切刀使用次数" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_ALTABCUTTERCOUNTB", // // tagValue = m.list_Data2[1, 13].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯铝极耳切刀使用次数" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUT_ADHESION_JUDGE_RESULT_B", // // tagValue = m.list_Data1[1, 13].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯裁切粘连判定结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUT_BURR_JUDGE_RESULT_B", // // tagValue = m.list_Data1[1, 14].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯裁切毛刺判定结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_SOLDER_JUDGE_RESULT_B", // // tagValue = HanYingB, // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包焊印位置判定结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_FRONT_EAR_CRACKLE_JUDGE_RESULT_B", // // tagValue = ZhengJiErSiLieB, // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包正面极耳撕裂判定结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_BACK_EAR_CRACKLE_JUDGE_RESULT_B", // // tagValue = BeiJiErSiLieB, // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包背面极耳撕裂判定结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_FRONT_EAR_FLODING_RESULT_B", // // tagValue = ZhengJiErFanB, // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包正面极耳翻折检测结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_BACK_EAR_FLODING_RESULT_B", // // tagValue = BeiJiErFanB, // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包背面极耳翻折检测结果" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUTABCUTTERNO_B", // // tagValue = m.list_Data1[1,21].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯铜极耳切刀编号" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_ALTABCUTTERNO_B", // // tagValue = m.list_Data1[1,22].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯铝极耳切刀编号" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_WEIGHT_B1_MAX_SETTING", // // tagValue = m.list_Data3[1, 0].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包重量1设定值最大值(g)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_WEIGHT_B1_MIN_SETTING", // // tagValue = m.list_Data3[1, 1].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包重量1设定值最小值(g)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_WEIGHT_B1", // // tagValue = m.list_Data4[1, 0].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包重量1(g)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_MAX_SETTING_B", // // tagValue = m.list_Data3[1, 2].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包侧厚压力(Kg)设定最大值" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_MIN_SETTING_B", // // tagValue = m.list_Data3[1, 3].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包侧厚压力(Kg)设定最小值" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_B", // // tagValue = m.list_Data4[1, 1].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包侧厚压力实际值" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_SIZE_B", // // tagValue = m.list_Data4[1, 2].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包侧厚尺寸(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_MAX_SIZE_B", // // tagValue = m.list_Data3[1, 4].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包侧厚最大尺寸(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_THICKNESS_TEST_PRESSURE_MIN_SIZE_B", // // tagValue = m.list_Data3[1, 5].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包侧厚最小尺寸(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_PRESSURE_B1", // // tagValue = m.list_Data4[1, 13].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接压力(Psi)实际值1" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_POWER_B1", // // tagValue = m.list_Data4[1, 14].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊接功率(W)实际值1" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_ENERGY_B1", // // tagValue = m.list_Data4[1, 15].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接能量(J)实际值1" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_AMPLITUDE_B1", // // tagValue = m.list_Data4[1, 16].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接振幅(%)实际值1" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_TIME_B1", // // tagValue = m.list_Data4[1, 17].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接时间(ms)实际值1" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_PRESSURE_B2", // // tagValue = m.list_Data4[1, 18].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接压力(Psi)实际值2" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_POWER_B2", // // tagValue = m.list_Data4[1, 19].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊接功率B(W)实际值2" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_ENERGY_B2", // // tagValue = m.list_Data4[1, 20].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接能量(J)实际值2" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_AMPLITUDE_B2", // // tagValue = m.list_Data4[1, 21].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接振幅(%)实际值2" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_TIME_B2", // // tagValue = m.list_Data4[1, 22].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接时间(ms)实际值2" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_PRESSURE_B3", // // tagValue = m.list_Data4[1, 23].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接压力(Psi)实际值3" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_POWER_B3", // // tagValue = m.list_Data4[1, 24].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊接功率A(W)实际值3" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_ENERGY_B3", // // tagValue = m.list_Data4[1, 25].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接能量(J)实际值3" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_AMPLITUDE_B3", // // tagValue = m.list_Data4[1, 26].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接振幅(%)实际值3" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CU_TIME_B3", // // tagValue = m.list_Data4[1, 27].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铜焊焊接时间(ms)实际值3" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_PRESSURE_B1", // // tagValue = m.list_Data4[1, 28].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接压力(Psi)实际值1" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_POWER_B1", // // tagValue = m.list_Data4[1, 29].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊接功率(W)实际值1" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_ENERGY_B1", // // tagValue = m.list_Data4[1, 30].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接能量(J)实际值1" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_AMPLITUDE_B1", // // tagValue = m.list_Data4[1, 31].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接振幅(%)实际值1" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_TIME_B1", // // tagValue = m.list_Data4[1, 32].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接时间(ms)实际值1" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_PRESSURE_B2", // // tagValue = m.list_Data4[1, 33].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接压力(Psi)实际值2" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_POWER_B2", // // tagValue = m.list_Data4[1, 34].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊接功率(W)实际值2" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_ENERGY_B2", // // tagValue = m.list_Data4[1, 35].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接能量(J)实际值2" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_AMPLITUDE_B2", // // tagValue = m.list_Data4[1, 36].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接振幅(%)实际值2" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_TIME_B2", // // tagValue = m.list_Data4[1, 37].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接时间(ms)实际值2" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_PRESSURE_B3", // // tagValue = m.list_Data4[1, 38].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接压力(Psi)实际值3" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_POWER_B3", // // tagValue = m.list_Data4[1, 39].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊接功率(W)实际值3" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_ENERGY_B3", // // tagValue = m.list_Data4[1, 40].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接能量(J)实际值3" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_AMPLITUDE_B3", // // tagValue = m.list_Data4[1, 41].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接振幅(%)实际值3" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_AL_TIME_B3", // // tagValue = m.list_Data4[1, 42].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包铝焊焊接时间(ms)实际值3" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUTABLENGTHB", // // tagValue = m.list_Data4[1, 3].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯铜极极耳长度(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUTABWIDTHB", // // tagValue = m.list_Data4[1, 4].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯铜极极耳宽度(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_ALTABLENGTHB", // // tagValue = m.list_Data4[1, 5].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯铝极极耳长度(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_ALTABWIDTHB", // // tagValue = m.list_Data4[1, 6].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯铝极极耳宽度(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUT_ADHESION_RESULT_B", // // tagValue = m.list_Data4[1, 7].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯裁切粘连结果(mm2)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_CUT_BURR_RESULT_B", // // tagValue = m.list_Data4[1, 8].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B电芯裁切毛刺结果(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_TOP_TO_SOLDER_DISTANCE_B", // // tagValue = m.list_Data4[1, 9].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包顶部到焊印间距(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_SOLDER_TO_EAR_DISTANCE_B", // // tagValue = m.list_Data4[1, 10].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包焊印边缘到极耳边缘间距(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_FRONT_EAR_CRACKLE_RESULT_B", // // tagValue = m.list_Data4[1, 11].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包正面极耳撕裂裂纹检测结果(mm)" // //}, // //new TagDataVOListItem // //{ // // tagCode="CSBYH_BACK_EAR_CRACKLE_RESULT_B", // // tagValue = m.list_Data4[1, 12].ToString(), // // tagTime = m.TestTime, // // tagCalculateResult = "Y", // // tagRemark = "B芯包背面极耳撕裂裂纹检测结果(mm)" // //} // }; // model.payload = JsonConvert.SerializeObject(payload1); // //payload1= JsonConvert.SerializeObject(payload1); // break; // } // var postcontent = JsonConvert.SerializeObject(model); // var sw = new Stopwatch(); // sw.Start(); // string result = MESApiHelper.WepPostAPIAsync(url, postcontent); // sw.Stop(); // if (string.IsNullOrEmpty(result)) // { // string resData = result == "" ? "" : result; // resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品结果加工参数接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; // TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品结果加工参数\{nowDate.ToString("HH")}.txt", resJson); // return res; // } // var res1 = ReturnMesMsg(result); // if (!res1.success) // { // var resData = res1 == null ? "" : JsonConvert.SerializeObject(res1); // Mesage = res1.message; // resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品结果加工参数接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{resData}"; // TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品结果加工参数\{nowDate.ToString("HH")}.txt", resJson); // } // else // { // res = true; // Mesage = res1.message; // resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用产品结果加工参数接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{JsonConvert.SerializeObject(result)}"; // TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\产品结果加工参数\{nowDate.ToString("HH")}.txt", resJson); // } //} //catch (Exception ex) //{ // resJson = $"产品结果加工参数接口发生异常:{ex.Message}"; // LogHelper.Instance.WriteEX("产品结果加工参数接口", ex); //} #endregion return res; } #endregion #region 12、设备状态 /// /// 设备状态 /// /// /// /// /// /// /// /// /// /// /// /// public bool UploadEquStatus(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, string guid, string statusCode, List faultCodes, ref string Mesage) { bool res = false; string resJson = ""; try { DateTime nowDate = DateTime.Now; string sNowDate = nowDate.ToString("yyyy/MM/dd HH:mm:ss"); var parameters = new EqpStatusParam { siteCode = siteCode, lineCode = lineCode, equipNum = equipNum, materialCode = materialCode, userName = userName, seatId = "", recordDate = sNowDate, statusCode = statusCode.ToString(), uploadTime = sNowDate, guid = guid }; if (faultCodes != null) { parameters.faultCodeList = faultCodes; } else { parameters.faultCodeList = null; } var postcontent = JsonConvert.SerializeObject(parameters); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); res = true; resJson = $"{sNowDate}:调用设备运行状态接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy/MM/dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{JsonConvert.SerializeObject(result)}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\设备运行状态\{nowDate.ToString("HH")}.txt", resJson); } catch (Exception ex) { resJson = $"设备运行状态接口发生异常:{ex.Message}"; LogHelper.Instance.WriteEX("设备运行状态接口", ex); } return res; } #endregion #region 13、设备报警上传接口 /// /// 设备报警上传接口 /// /// /// /// /// /// /// /// /// /// /// public bool UploadEquAlarm(string url, string siteCode, string lineCode, string equipNum, string materialCode, string userName, List alarmObj, string guid, ref string mesage) { bool res = false; string resJson = ""; try { var nowDate = DateTime.Now; if (alarmObj.Count > 0) { var model = new UploadAlarmParam { siteCode = siteCode, lineCode = lineCode, equipNum = equipNum, materialCode = materialCode, userName = userName, recordDate = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), guid = guid, seatId = "" }; model.alarmLineList = new List(); for (int j = 0; j < alarmObj.Count; j++) { AlarmLineListItem alarmList = new AlarmLineListItem(); alarmList.alarmEndTime = alarmObj[j].EndTime.ToString(); alarmList.alarmType = alarmObj[j].AlarmType; alarmList.alarmName = alarmObj[j].AlarmContent; alarmList.alarmStartTime = alarmObj[j].StartTime.ToString(); alarmList.faultCode = alarmObj[j].AlarmCode; model.alarmLineList.Add(alarmList); } var postcontent = JsonConvert.SerializeObject(model); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); res = true; resJson = $"{nowDate.ToString("yyyy/MM/dd HH:mm:ss.fff")}:调用设备报警信息接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy/MM/dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{JsonConvert.SerializeObject(result)}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\报警信息\{nowDate.ToString("HH")}.txt", resJson); } } catch (Exception ex) { resJson = $"调用设备报警信息接口发生异常:{ex.Message}"; LogHelper.Instance.WriteEX("调用设备报警信息接口", ex); } return res; } #endregion #region 14、上传设备能耗数据 /// /// 上传设备能耗数据 /// /// /// /// /// /// /// /// /// /// public bool UploadEquEnergy(string url, string siteCode, string lineCode, string equipNum, string userName, List electricMeterNum, List wattrs, ref string resJson) { bool res = false; try { var nowDate = DateTime.Now; var postcontent = JsonConvert.SerializeObject(wattrs); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); res = true; resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用设备能耗信息接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{JsonConvert.SerializeObject(result)}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\设备能耗信息\{nowDate.ToString("HH")}.txt", resJson); } catch (Exception ex) { resJson = $"调用设备能耗信息接口:{ex.Message}"; LogHelper.Instance.WriteEX("调用设备能耗信息接口", ex); } return res; } #endregion #region 15、风速仪数据上传至MES /// /// 风速仪数据上传至MES /// /// /// /// /// /// /// public bool UploadDeviceCollectData(string url, string equipNum, List antiDustAirSpeedNum, List collectData, ref string mesage) { bool res = false; string resJson = ""; try { if (collectData == null) { return false; } UploadDeviceCollectData uploadDevice = new UploadDeviceCollectData(); uploadDevice.appid = "e1012966a936170c6fcab98e24042d10"; uploadDevice.device_code = equipNum; uploadDevice.collect_time = GetUnixTimestamp(); List list = new List(); for (int i = 0; i < collectData.Count; i++) { Collect_code_value_list _Value_List = new Collect_code_value_list(); _Value_List.target_code = 5; _Value_List.target_value = collectData[i].ToString(); _Value_List.target_value_tag = antiDustAirSpeedNum[i]; list.Add(_Value_List); } uploadDevice.collect_code_value_list = list; var nowDate = DateTime.Now; string postcontent = JsonConvert.SerializeObject(uploadDevice); var sw = new Stopwatch(); sw.Start(); string result = MESApiHelper.WepPostAPIAsync(url, postcontent); sw.Stop(); resJson = $"{nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}:调用风速接口:{url},请求数据为:{postcontent},\n{nowDate.AddMilliseconds(sw.ElapsedMilliseconds).ToString("yyyy-MM-dd HH:mm:ss.fff")}:接口耗时:{sw.ElapsedMilliseconds}ms,返回结果:{result}"; TxtHelper.WriteTxt($@"D:\APILog\Logs\MesLogs\{nowDate.ToString("yyyyMMdd")}\风速信息\{nowDate.ToString("HH")}.txt", resJson); } catch (Exception ex) { resJson = $"调用风速接口:{ex.Message}"; LogHelper.Instance.WriteEX("调用风速接口", ex); } return res; } #endregion #region 16、数据处理逻辑 /// /// 单电池进站分类 /// /// /// /// /// private void GetInMesResType(MesResponseIn res1, string BarCode, ref string MesMessage, ref MesResType mesResType) { if (res1 != null && res1 != null) { if (res1.success) { mesResType = MesResType.D; MesMessage = "MES进站成功 "; } else { if (res1.category == null) { mesResType = MesResType.B; MesMessage = res1.message; } else { switch (res1.category) { case "A": mesResType = MesResType.A; MesMessage = res1.message; break; case "B": mesResType = MesResType.B; MesMessage = res1.message; break; case "C": mesResType = MesResType.C; MesMessage = res1.message; break; default: mesResType = MesResType.UnKnow; MesMessage = "MES进站失败 "; break; } } } } } /// /// 多电池进站分类 /// /// /// /// /// //private void GetInMesResType(MesResponseIn res1, List listBar, ref List MesMessage, ref List mesResType) //{ // if (res1 != null) // { // for (int i = 0; i < res1.total; i++) // { // for (int j = 0; j < res1.total; j++) // { // if (res1.rows[j].identification == listBar[i]) // { // if (res1.rows[j].success) // { // mesResType[i] = MesResType.D; // MesMessage[i] = "MES进站成功 "; // } // else // { // if (res1.rows[j].category == null) // { // mesResType[i] = MesResType.B; // MesMessage[i] = res1.rows[j].message; // } // else // { // switch (res1.rows[j].category) // { // case "A": // mesResType[i] = MesResType.A; // MesMessage[i] = res1.rows[j].message; // break; // case "B": // mesResType[i] = MesResType.B; // MesMessage[i] = res1.rows[j].message; // break; // case "C": // mesResType[i] = MesResType.C; // MesMessage[i] = res1.rows[j].message; // break; // default: // mesResType[i] = MesResType.UnKnow; // MesMessage[i] = "MES进站失败 "; // break; // } // } // } // } // } // } // } //} /// /// 单电池出站分类 /// /// /// /// /// private void GetOutMesResType(MesResponse res1, string BarCode, ref string MesMessage, ref MesResType mesResType) { if (res1 != null && res1 != null) { if (res1.success) { mesResType = MesResType.D; MesMessage = "MES出站成功 "; } else { if (res1.category == null) { mesResType = MesResType.B; MesMessage = res1.message; } else { switch (res1.category) { case "A": mesResType = MesResType.A; MesMessage = res1.message; break; case "B": mesResType = MesResType.B; MesMessage = res1.message; break; case "C": mesResType = MesResType.C; MesMessage = res1.message; break; default: mesResType = MesResType.UnKnow; MesMessage = "MES出站失败 "; break; } } } } } /// /// 多电池出站结果分类 /// /// /// /// /// private void GetOutMesResType(MesResponseOut res1, List list, ref List MesMessage, ref List mesResType) { if (res1 != null) { for (int i = 0; i < list.Count; i++) { for (int j = 0; j < res1.total; j++) { if (res1.rows[j].identification == list[i].CSBYHCODEA) { if (res1.rows[j].success) { mesResType[i] = MesResType.D; MesMessage[i] = "MES出站成功 "; } else { if (res1.rows[j].category == null) { mesResType[i] = MesResType.B; MesMessage[i] = res1.rows[j].message; } else { switch (res1.rows[i].category) { case "A": mesResType[i] = MesResType.A; MesMessage[i] = res1.rows[j].message; break; case "B": mesResType[i] = MesResType.B; MesMessage[i] = res1.rows[j].message; break; case "C": mesResType[i] = MesResType.C; MesMessage[i] = res1.rows[j].message; break; default: mesResType[i] = MesResType.UnKnow; MesMessage[i] = "MES出站失败 "; break; } } } } } } } } /// /// 序列化各类返回 /// /// /// /// private T ReturnMesMsg(string ret) { try { return JsonConvert.DeserializeObject(ret); } catch (System.Exception ex) { return default(T); } } public List GetMesType(int Num) { List mesResTypes = new List(); for (int i = 0; i < Num; i++) { mesResTypes.Add(MesResType.B); } return mesResTypes; } public List GetListString(int Num, string str) { List mesResTypes = new List(); for (int i = 0; i < Num; i++) { mesResTypes.Add(str); } return mesResTypes; } /// ///本地时间为Unix时间戳 /// /// public static long GetUnixTimestamp() { return (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000; } #endregion } }