解决数据库并发问题

This commit is contained in:
lq
2026-09-09 17:50:15 +08:00
parent e703fb2752
commit 367281d8ce
3 changed files with 77 additions and 96 deletions
-25
View File
@@ -965,31 +965,6 @@ namespace LargeSquareOne
{
new FrmMsgBoxWithAck("批量复投条码个数>8, 请单个复投", "提示").ShowDialog();
}
//if (CommonMethods.isRepeat)
//{
// for (int i = 0; i < CommonMethods.repeatCodeList.Count; i++)
// {
// string code = CommonMethods.repeatCodeList[i];//取出队列数据
// if (code.Length > 11) //手持扫码枪的条码格式结尾带字符,到时候根据那个结尾字符判断
// {
// if (counter > 8) counter = 1; // 循环计数(1-8)
// // 将计数值写入PLC的D9050地址(16位整数)
// CommonMethods.plcDevices[0]?.WriteValue("D9050", counter, PLC.DataType.Int);
// // 写入条码到D9000
// JYResult result1 = CommonMethods.plcDevices[0].WriteValue(
// "D9000",
// code,
// PLC.DataType.String
// );
// Thread.Sleep(150);
// if (result1 == null)
// {
// CommonMethods.AddDataMonitorLog(2, "条码复投失败".Translated() + ":" + code);
// }
// counter++; // 计数器递增
// }
// }
//}
}
else if (checkBox4.Checked)//已包蓝膜
{