|
@@ -121,8 +121,8 @@ namespace MainForm
|
|
|
private int IntervalAlarm = 1000; //ms 数据(报警)查询与设备运行信息
|
|
|
|
|
|
//采集Atlas数据
|
|
|
- AtlasScrew atlasScrewLeft;
|
|
|
- AtlasScrew atlasScrewRight;
|
|
|
+ AtlasScrew_Left atlasScrewLeft;
|
|
|
+ AtlasScrew_Right atlasScrewRight;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设备报警数据
|
|
@@ -553,10 +553,10 @@ namespace MainForm
|
|
|
//收集Atlas
|
|
|
if (GlobalContext.IsUsePLC7)
|
|
|
{
|
|
|
- atlasScrewLeft = new AtlasScrew(GlobalContext.AtlasAddressLeft, GlobalContext.AtlasAddressPort,
|
|
|
+ atlasScrewLeft = new AtlasScrew_Left(GlobalContext.AtlasAddressLeft, GlobalContext.AtlasAddressPort,
|
|
|
3000, 3000, "Left");
|
|
|
atlasScrewLeft.Initial();
|
|
|
- atlasScrewRight = new AtlasScrew(GlobalContext.AtlasAddressRight, GlobalContext.AtlasAddressPort,
|
|
|
+ atlasScrewRight = new AtlasScrew_Right(GlobalContext.AtlasAddressRight, GlobalContext.AtlasAddressPort,
|
|
|
3000, 3000, "Right");
|
|
|
atlasScrewRight.Initial();
|
|
|
}
|
|
@@ -1139,7 +1139,6 @@ namespace MainForm
|
|
|
public static string _strProductBarcode = "";
|
|
|
public static string _strCarrierBarcode = "";
|
|
|
DateTime lastWarningTime = DateTime.MinValue;
|
|
|
- TimeSpan warningInterval = TimeSpan.FromSeconds(10); // 每10秒提醒一次
|
|
|
public static BarcodeSet_t barcode_left =new BarcodeSet_t();
|
|
|
public static BarcodeSet_t barcode_right = new BarcodeSet_t();
|
|
|
|
|
@@ -1506,7 +1505,7 @@ namespace MainForm
|
|
|
/// <param name="Barcode"></param>
|
|
|
/// <param name="iotData"></param>
|
|
|
/// <returns></returns>
|
|
|
- public int PostMesByCheck(string ProductBarcode, string machineId,string stationId)
|
|
|
+ public int PostMesByCheck(string ProductBarcode,string PCBBarcode, string machineId,string stationId)
|
|
|
{
|
|
|
int res = 0;
|
|
|
string jsonstr1 = "";
|
|
@@ -1518,7 +1517,8 @@ namespace MainForm
|
|
|
outRequest_Body.clientMac = GlobalContext.MacStr; // 客⼾端本机MAC地址,格式:XX-XX-XX-XX-XX-XX
|
|
|
outRequest_Body.clientTime =
|
|
|
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); // 客⼾端请求时间,格式yyyy-MM-dd HH:mm:ss.fff
|
|
|
- outRequest_Body.unitSn = ProductBarcode; // 产品SN
|
|
|
+ outRequest_Body.unitSn = PCBBarcode; // 产品SN
|
|
|
+ outRequest_Body.materialSn = ProductBarcode; // 产品SN
|
|
|
outRequest_Body.userId = GlobalContext.MESUserId; // ⽤⼾ID
|
|
|
outRequest_Body.factoryId = long.Parse(GlobalContext.Factory_Code); // ⼯⼚id
|
|
|
|
|
@@ -1680,9 +1680,9 @@ namespace MainForm
|
|
|
$"【进站数据 SN {stationIn.Sn}】上传MES服务器---失败!接口报错信息: {mesRet},请求参数:{json_Body}");
|
|
|
}
|
|
|
|
|
|
- string sql_response =
|
|
|
- stationIn.ToStringUpdateStationInReturn_body(JsonConvert.SerializeObject(response));
|
|
|
- SQLHelper_New.ExecuteNonQuery(sql_response, null);
|
|
|
+ //string sql_response =
|
|
|
+ // stationIn.ToStringUpdateStationInReturn_body(JsonConvert.SerializeObject(response));
|
|
|
+ //SQLHelper_New.ExecuteNonQuery(sql_response, null);
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
@@ -1878,7 +1878,7 @@ namespace MainForm
|
|
|
DataTable jd_Table = jd_row.Any() ? jd_row.CopyToDataTable(): dt.Clone();
|
|
|
//只保留螺丝序号和扭力
|
|
|
DataTable jd_dt = Form_Home.GetSelectedColumns(jd_Table, new[] {"序号", "角度数组" } );
|
|
|
- string jd_json = JsonConvert.SerializeObject(nj_dt, Formatting.Indented);
|
|
|
+ string jd_json = JsonConvert.SerializeObject(jd_dt, Formatting.Indented);
|
|
|
outRequest_Body.unitData.processData.Add(
|
|
|
new XmStationOut_ProcessData()
|
|
|
{
|
|
@@ -2019,10 +2019,10 @@ namespace MainForm
|
|
|
}
|
|
|
fileUploadData.fileData.Clear();
|
|
|
|
|
|
- string sql_UpStationout = ProcessData.ToStringUpdateStationOut_body(
|
|
|
- JsonConvert.SerializeObject(outRequest_Body),
|
|
|
- JsonConvert.SerializeObject(response), id);
|
|
|
- SQLHelper_New.ExecuteNonQuery(sql_UpStationout, null);
|
|
|
+ //string sql_UpStationout = ProcessData.ToStringUpdateStationOut_body(
|
|
|
+ // JsonConvert.SerializeObject(outRequest_Body),
|
|
|
+ // JsonConvert.SerializeObject(response), id);
|
|
|
+ //SQLHelper_New.ExecuteNonQuery(sql_UpStationout, null);
|
|
|
}
|
|
|
#endregion
|
|
|
}
|
|
@@ -2280,7 +2280,7 @@ namespace MainForm
|
|
|
return Encoding.UTF8.GetString(btArr);
|
|
|
}
|
|
|
|
|
|
- private void CollectAndProcessDataLeft(AtlasScrew atlasScrew, string sn, string direction)
|
|
|
+ private void CollectAndProcessDataLeft(AtlasScrew_Left atlasScrew, string sn, string direction)
|
|
|
{
|
|
|
Stopwatch stopwatch = new Stopwatch();
|
|
|
stopwatch.Start();
|
|
@@ -2385,7 +2385,7 @@ namespace MainForm
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void CollectAndProcessDataRight(AtlasScrew atlasScrew, string sn, string direction)
|
|
|
+ private void CollectAndProcessDataRight(AtlasScrew_Right atlasScrew, string sn, string direction)
|
|
|
{
|
|
|
Stopwatch stopwatch = new Stopwatch();
|
|
|
stopwatch.Start();
|
|
@@ -3936,13 +3936,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(CarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|
|
@@ -4302,13 +4299,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(strCarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
//这个地方之后PLC可能会返回SN码,到时用返回的和数据库中的比较下对错,结果faalse怎么办现在不知道
|
|
@@ -4403,13 +4397,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(CarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|
|
@@ -5023,13 +5014,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(strCarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|
|
@@ -5132,13 +5120,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(CarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|
|
@@ -5572,13 +5557,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(strCarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|
|
@@ -5667,13 +5649,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(CarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|
|
@@ -6245,14 +6224,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(CarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
stPLC_MesData.BarcodeSet.strProductBarcode = strProductBarcode;
|
|
@@ -6372,7 +6347,7 @@ namespace MainForm
|
|
|
inspectionItemData.AddDataItem("AirPressure", "ADD板压力", fForceAddPCB.ToString(), fForceAddPCBMax.ToString(), fForceAddPCBMin.ToString(), passFlag);
|
|
|
}
|
|
|
|
|
|
- inspectionItemData.childUnitSn = strProductBarcode;
|
|
|
+ inspectionItemData.childUnitSn = pcbBarcode;
|
|
|
inspectionItemData.childUnitState = AllpassFlag;
|
|
|
inspectionItemData.toolVersion = "1.0";
|
|
|
#endregion
|
|
@@ -6391,7 +6366,7 @@ namespace MainForm
|
|
|
}
|
|
|
else if (stPLC_MesData.mesCommFrmPLC.cmdParam == 1)
|
|
|
{
|
|
|
- result1 = PostMesByCheck(sn,GlobalContext.s5_device_code,GlobalContext.S5_StationId);
|
|
|
+ result1 = PostMesByCheck(sn, pcbBarcode, GlobalContext.s5_device_code,GlobalContext.S5_StationId);
|
|
|
AddMessage(LogType.Info, stationNameStr + "_校验结束");
|
|
|
}
|
|
|
//原流程,ADD板进站==>ADD板出站==>组装==>壳体出站
|
|
@@ -6412,24 +6387,24 @@ namespace MainForm
|
|
|
//if (mesResultFrmWeb == 1)
|
|
|
//{
|
|
|
// //进站结果写入PLC
|
|
|
- // resultToPlC.cmd = 0;
|
|
|
- // resultToPlC.cmdParam = 0; //指令参数
|
|
|
- // resultToPlC.cmdResult = mesResultFrmWeb;
|
|
|
- // WriteResultToPlc(plcNo, stationNameStr, tagMesCommName, 1, resultToPlC);
|
|
|
-
|
|
|
- //保存PLC返回MES数据到本地
|
|
|
- //ResponseMessage message = new ResponseMessage();
|
|
|
- //message = SQLHelper.InsertOp50Data(CarrierBarcode, sn, stPLC_MesData.mesData.nIsAddPCBAsmOK,
|
|
|
- // stPLC_MesData.mesData.nHaveAddPCB, stPLC_MesData.mesData.fForceAddPCB,
|
|
|
- // stPLC_MesData.mesData.nRemainCount, "");
|
|
|
- //if (message.result == false)
|
|
|
- //{
|
|
|
- // OnMessage(LogType.Info, stationNameStr + "_保存加工数据到本地失败");
|
|
|
- //}
|
|
|
- //else
|
|
|
- //{
|
|
|
- // OnMessage(LogType.Info, stationNameStr + "_保存加工数据到本地成功");
|
|
|
- //}
|
|
|
+ resultToPlC.cmd = 0;
|
|
|
+ resultToPlC.cmdParam = 0; //指令参数
|
|
|
+ resultToPlC.cmdResult = mesResultFrmWeb;
|
|
|
+ WriteResultToPlc(plcNo, stationNameStr, tagMesCommName, 1, resultToPlC);
|
|
|
+
|
|
|
+ //保存PLC返回MES数据到本地
|
|
|
+ //ResponseMessage message = new ResponseMessage();
|
|
|
+ //message = SQLHelper.InsertOp50Data(CarrierBarcode, sn, stPLC_MesData.mesData.nIsAddPCBAsmOK,
|
|
|
+ // stPLC_MesData.mesData.nHaveAddPCB, stPLC_MesData.mesData.fForceAddPCB,
|
|
|
+ // stPLC_MesData.mesData.nRemainCount, "");
|
|
|
+ //if (message.result == false)
|
|
|
+ //{
|
|
|
+ // OnMessage(LogType.Info, stationNameStr + "_保存加工数据到本地失败");
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // OnMessage(LogType.Info, stationNameStr + "_保存加工数据到本地成功");
|
|
|
+ //}
|
|
|
//}
|
|
|
|
|
|
//保存部件码信息
|
|
@@ -6797,12 +6772,12 @@ namespace MainForm
|
|
|
}
|
|
|
sn = ProductBarcode;
|
|
|
AddMessage(LogType.Info, $"载具码:{strCarrierBarcode};产品码:{sn}");
|
|
|
- if (ProductBarcode != "")
|
|
|
- {
|
|
|
- MessageBox.Show($"产品码:{sn}线外螺丝机过站后点击确认", "提示",
|
|
|
- MessageBoxButtons.OK,
|
|
|
- MessageBoxIcon.Information);
|
|
|
- }
|
|
|
+ //if (ProductBarcode != "")
|
|
|
+ //{
|
|
|
+ // MessageBox.Show($"产品码:{sn}线外螺丝机过站后点击确认", "提示",
|
|
|
+ // MessageBoxButtons.OK,
|
|
|
+ // MessageBoxIcon.Information);
|
|
|
+ //}
|
|
|
|
|
|
// 产品SN(物料码)校验
|
|
|
List<TestItem> item = new List<TestItem>();
|
|
@@ -6906,13 +6881,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(CarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|
|
@@ -7217,8 +7189,7 @@ namespace MainForm
|
|
|
ProgressState = true;
|
|
|
Task.Run(() => S7进站(plcNo, stationNameStr, stPLC_MesData.Left,
|
|
|
tagBaseName + ".Left." + tagMesCommName,
|
|
|
- tagBaseName + ".Left." + tagBarsetName, "Left", out ProgressState,
|
|
|
- atlasScrewLeft));
|
|
|
+ tagBaseName + ".Left." + tagBarsetName, "Left", out ProgressState));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -7284,8 +7255,7 @@ namespace MainForm
|
|
|
ProgressState = true;
|
|
|
Task.Run(() => S7进站(plcNo, stationNameStr, stPLC_MesData.Right,
|
|
|
tagBaseName + ".Right." + tagMesCommName,
|
|
|
- tagBaseName + ".Right" + tagBarsetName, "Right", out ProgressState,
|
|
|
- atlasScrewRight));
|
|
|
+ tagBaseName + ".Right" + tagBarsetName, "Right", out ProgressState));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -7457,7 +7427,7 @@ namespace MainForm
|
|
|
/// <param name="stPLC_MesData"></param>
|
|
|
/// <param name="tagMesCommName"></param>
|
|
|
private void S7进站(int plcNo, string stationNameStr, OP70_stnDataSet_t stPLC_MesData, string tagMesCommName,
|
|
|
- string tagBarsetName, string direction, out bool ProgressState, AtlasScrew atlasScrew)
|
|
|
+ string tagBarsetName, string direction, out bool ProgressState)
|
|
|
{
|
|
|
Stopwatch stopwatch1 = new Stopwatch();
|
|
|
Stopwatch stopwatch2 = new Stopwatch();
|
|
@@ -7479,13 +7449,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(strCarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
sn = strProductBarcode;
|
|
|
AddMessage(LogType.Info, $"载具码:{strCarrierBarcode};产品码:{sn}");
|
|
@@ -7620,13 +7587,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(CarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|
|
@@ -8027,13 +7991,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(strCarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|
|
@@ -8123,13 +8084,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(CarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|
|
@@ -8520,13 +8478,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(strCarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{strCarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|
|
@@ -8616,13 +8571,10 @@ namespace MainForm
|
|
|
string strProductBarcode = SQLHelper.GetProductBarcodeByCarrierCode(CarrierBarcode);
|
|
|
if (string.IsNullOrEmpty(strProductBarcode))
|
|
|
{
|
|
|
- if (DateTime.Now - lastWarningTime > warningInterval)
|
|
|
- {
|
|
|
- AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
- ProgressState = false;
|
|
|
- lastWarningTime = DateTime.Now;
|
|
|
- return;
|
|
|
- }
|
|
|
+ AddMessage(LogType.Error, $"{stationNameStr}_数据库未查询到载具码[{CarrierBarcode}]的绑定信息!");
|
|
|
+ ProgressState = false;
|
|
|
+ lastWarningTime = DateTime.Now;
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
sn = strProductBarcode;
|