From 65bdf3d210c789351f9ee641c1e8df8c99291c36 Mon Sep 17 00:00:00 2001 From: ldw <11622064+ldw888@user.noreply.gitee.com> Date: Fri, 15 Aug 2025 21:09:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E7=BB=93=E6=9E=9CMES?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JinYuan.ControlCenter/ControlCenter_Plc.cs | 38 +- JinYuan.MES/MesDataProcess.cs | 2144 +++----------------- LargeSquareOne/Config/Configure.ini | 2 +- 3 files changed, 354 insertions(+), 1830 deletions(-) diff --git a/JinYuan.ControlCenter/ControlCenter_Plc.cs b/JinYuan.ControlCenter/ControlCenter_Plc.cs index fd89bed..3be8c15 100644 --- a/JinYuan.ControlCenter/ControlCenter_Plc.cs +++ b/JinYuan.ControlCenter/ControlCenter_Plc.cs @@ -259,18 +259,24 @@ namespace JinYuan.ControlCenters private int JudgmentWGJResult(int A, int[,] B, int C) { int Result = 1; - OK_NG = "OK"; - for (int i = 0; i < 28; i++) + OK_NG = "OK"; + for (int i = 0; i < 27; i++) { - if (B[C,i] ==1) + if (B[C,i] !=1) { //1OK,2扫码NG,3MES反馈NG,4其他NG Result = 4; OK_NG = "NG"; - NG_Type += $"外观检测NG{i + 1}"; + NG_Type += $"外观检测NG{i + 1},"; } } - + if (A == 2) + { + NG_Type += "无条码,"; + Result = 2; + OK_NG = "NG"; + } + return Result; } #region 上料工位(数据处理) @@ -1821,7 +1827,7 @@ namespace JinYuan.ControlCenters List NGcodeList = new List(); //NGcodeList = NGcode(m.list_Data1[i, 10], m.list_Data1[i, 11], m.list_Data1[i, 12], m.list_Data1[i, 15], m.list_Data1[i, 26], m.list_Data1[i, 16] // , m.list_Data1[i, 17], m.list_Data1[i, 18], m.list_Data1[i, 19], m.list_Data1[i, 23], m.list_Data1[i, 24], m.list_Data1[i, 25], m.list_Data1[i, 27]); - NGcodeList = NGWGJcode(m.list_Data1,i); + NGcodeList = NGWGJcode(m.CCD_Data, i); //电芯CCD判定结果 #region //电芯CCD判定结果 1 0K 0NG 2缺图 @@ -1880,7 +1886,7 @@ namespace JinYuan.ControlCenters } } else - MyRes[i] = 1; + MyRes[i] = 2;//扫码NG MyRes[i] = JudgmentWGJResult(Code_NG, m.CCD_Data,i); m.Result = MyRes[i]; @@ -1957,11 +1963,17 @@ namespace JinYuan.ControlCenters m.Result = MyRes[i] = 3; m.Remark += "MES NG"; break; - case MesResType.C://可忽略 + case MesResType.C://可忽略 //m.listRes[i] = 1; // m.Result = MyRes[i] = 2; - m.Result = MyRes[i] = 3; - m.Remark += "MES NG"; + m.Result = MyRes[i] = 1; + m.Remark += "MES Alerm OK"; + break; + case MesResType.D://可忽略 + //m.listRes[i] = 1; + // m.Result = MyRes[i] = 2; + m.Result = MyRes[i] = 1; + m.Remark += "MES OK"; break; default: m.Remark += "MES NG"; @@ -2238,12 +2250,12 @@ namespace JinYuan.ControlCenters return NGcodelist; } //下料不良代码 外观检 - public List NGWGJcode(short[ ,] lstResult,int index) + public List NGWGJcode(int[ ,] lstResult,int index) { List NGcodelist = new List(); - for (int i = 0; i < 28; i++) + for (int i = 0; i < 27; i++) { - if(lstResult[index,i] == 2) + if(lstResult[index,i] !=1) { NGcodelist.Add("WGJA00"+(i+1)); } diff --git a/JinYuan.MES/MesDataProcess.cs b/JinYuan.MES/MesDataProcess.cs index 7c5de03..a8898f9 100644 --- a/JinYuan.MES/MesDataProcess.cs +++ b/JinYuan.MES/MesDataProcess.cs @@ -7,6 +7,7 @@ using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; namespace JinYuan.MES { @@ -968,1836 +969,347 @@ namespace JinYuan.MES { 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, - // }; + #region 结果上传MES - // 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)" - // }, + try + { + var nowDate = DateTime.Now; + string sNowDate = nowDate.ToString("yyyy-MM-dd HH:mm:ss.fff"); - // 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" - // }, + var model = new ProductResultParameters + { + equipNum = equipNum, + type = unloadType.ToString(), + payload = "" + }; + #region old + //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"; + // } + //} + #endregion + 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 = "", - // 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)" - // //} + }; + payload1.identification = new IdentificationListItem + { + identification = m.CSBYHCODEA, + qualityStatus = m.CSBYHOUTSTATIONJUDGMENTRESULT, + }; - // }; - - // model.payload = JsonConvert.SerializeObject(payload1); - // //payload1= JsonConvert.SerializeObject(payload1); - // break; - - // } + payload1.tagDataVOList = GetTagDataVOList(m); + #region old + // 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 = "芯包称重工位号" + // //} - // var postcontent = JsonConvert.SerializeObject(model); - // var sw = new Stopwatch(); - // sw.Start(); - // string result = MESApiHelper.WepPostAPIAsync(url, postcontent); - // sw.Stop(); + // }; + #endregion - // 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; - // } + model.payload = JsonConvert.SerializeObject(payload1); + //payload1= JsonConvert.SerializeObject(payload1); + break; + + } - // 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); - // } + var postcontent = JsonConvert.SerializeObject(model); + var sw = new Stopwatch(); + sw.Start(); + string result = MESApiHelper.WepPostAPIAsync(url, postcontent); + sw.Stop(); - //} - //catch (Exception ex) - //{ - // resJson = $"产品结果加工参数接口发生异常:{ex.Message}"; - // LogHelper.Instance.WriteEX("产品结果加工参数接口", ex); - //} + 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}"; + LoggerHelp.WriteEX("产品结果加工参数接口", ex); + } #endregion return res; } + private List GetTagDataVOList(BGearEntity m) + { + //var AGearList = + string insertTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + List datavolist = new List(); + + string strFileName = System.Environment.CurrentDirectory + "\\采集项目表.csv"; + + FileStream fileStream = new FileStream(strFileName, FileMode.Open, FileAccess.Read, FileShare.Read); + StreamReader streamReader = new StreamReader(fileStream); + _ = streamReader.ReadLine(); + while (!streamReader.EndOfStream) + { + string line = streamReader.ReadLine(); + string[] keys = line.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); + if (keys.Length == 3) + { + var temp = m.GetType().GetProperty(keys[1]).GetValue(m, null); + + datavolist.Add(new TagDataVOListItem() + { + tagCode = keys[0], + tagValue = temp == null ? "0" : temp.ToString(),//m + tagTime = DateTime.Now.ToString(), + tagCalculateResult = "Y", + tagRemark = keys[2] + }); + } + } + #region 本地字段没有,手动赋值 + // 进站时间 + if (string.IsNullOrEmpty(insertTime)) + { + datavolist.Add(new TagDataVOListItem() + { + tagCode = "FV_F060_RES_002", + tagValue = DateTime.Now.ToString(),//m + tagTime = DateTime.Now.ToString(), + tagCalculateResult = "Y", + tagRemark = "采集时间" + }); + } + else + { + datavolist.Add(new TagDataVOListItem() + { + tagCode = "FV_F060_RES_002", + tagValue = insertTime,//m + tagTime = DateTime.Now.ToString(), + tagCalculateResult = "Y", + tagRemark = "采集时间" + }); + } + // 设备名称 + datavolist.Add(new TagDataVOListItem() + { + tagCode = "FV_F060_RES_004", + tagValue = "",//m + tagTime = DateTime.Now.ToString(), + tagCalculateResult = "Y", + tagRemark = "设备名称" + }); + // 操作员 + datavolist.Add(new TagDataVOListItem() + { + tagCode = "FV_F060_RES_005", + tagValue = "",//m + tagTime = DateTime.Now.ToString(), + tagCalculateResult = "Y", + tagRemark = "操作员" + }); + + #endregion + + return datavolist; + } #endregion #region 12、设备状态 diff --git a/LargeSquareOne/Config/Configure.ini b/LargeSquareOne/Config/Configure.ini index e6ff45d..055017e 100644 --- a/LargeSquareOne/Config/Configure.ini +++ b/LargeSquareOne/Config/Configure.ini @@ -29,7 +29,7 @@ MES ²úƷ½øվ=http://10.22.160.141/core/api/public/formation/section/arrival/bz ²úƷ¹ý³̼ӹ¤²ÎÊý=http://10.22.160.141/core/api/public/product/process/param/new/process ²úƷ½á¹û¼ӹ¤²ÎÊý=http://10.22.160.141/core/api/public/product/process/param/new/result -²úƷ³öվ=http://10.22.160.141/core/api/public/eve/pm/formation-section/bz +²úƷ³öվ=http://10.22.160.141/core/api/public/eve/pm/formation-section É豸±¨¾¯=http://10.22.160.141/core/api/public/equipment/alarm/currency É豸״̬=http://10.22.160.141/core/api/public/eve/pm/eqm/run/status/operation ÄܺÄ=http://10.22.160.141/core/api/public/eve/pm/energy/consumption/collection/submit