|
|
@@ -9,8 +9,6 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
public partial class Make_CheckQrcode : Form
|
|
|
{
|
|
|
- DataHelper dh;
|
|
|
-
|
|
|
LogStringBuilder sql = new LogStringBuilder();
|
|
|
|
|
|
public Make_CheckQrcode()
|
|
|
@@ -20,7 +18,6 @@ namespace UAS_MES_NEW.Make
|
|
|
|
|
|
private void Special_BoxSplit_Load(object sender, EventArgs e)
|
|
|
{
|
|
|
- dh = SystemInf.dh;
|
|
|
OperatResult.AppendText(">>请录入SN\n", Color.Black);
|
|
|
}
|
|
|
|
|
|
@@ -39,31 +36,25 @@ namespace UAS_MES_NEW.Make
|
|
|
OperatResult.AppendText(">>录入不可为空\n", Color.Red);
|
|
|
return;
|
|
|
}
|
|
|
- if (qrcode.Text == "")
|
|
|
+ //第一次扫码:记录SN
|
|
|
+ if (SN.Text == "")
|
|
|
{
|
|
|
- string qr_code = dh.getFieldDataByCondition("craftmaterial join product on cm_soncode = pr_code", "cm_barcode", "cm_sncode = '" + input.Text + "' and cm_status =0 and pr_detail like '%二维码%'").ToString();
|
|
|
- if (qr_code == "")
|
|
|
- {
|
|
|
- OperatResult.AppendText(">>SN:" + input.Text + "未找到对应二维码标签\n", Color.Red);
|
|
|
- input.Text = "";
|
|
|
- return;
|
|
|
- }
|
|
|
- qrcode.Text = qr_code;
|
|
|
- OperatResult.AppendText(">>获取SN:" + input.Text + "二维码标签成功,请录入二维码核对\n", Color.Green);
|
|
|
SN.Text = input.Text;
|
|
|
+ OperatResult.AppendText(">>SN:" + SN.Text + "录入成功,请扫码核对\n", Color.Green);
|
|
|
input.Text = "";
|
|
|
}
|
|
|
+ //第二次扫码:扫码内容包含第一次扫码的SN即通过
|
|
|
else
|
|
|
{
|
|
|
- if (qrcode.Text != input.Text)
|
|
|
+ if (!input.Text.Contains(SN.Text))
|
|
|
{
|
|
|
- OperatResult.AppendText(">>录入二维码标签:" + input.Text + "与先标签内容不对应,核对失败\n", Color.Red);
|
|
|
+ OperatResult.AppendText(">>录入内容:" + input.Text + "不包含SN:" + SN.Text + ",核对失败\n", Color.Red);
|
|
|
input.Text = "";
|
|
|
return;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- OperatResult.AppendText(">>二维码标签核对成功\n", Color.Green);
|
|
|
+ OperatResult.AppendText(">>核对通过\n", Color.Green);
|
|
|
BaseUtil.CleanControls(this.Controls);
|
|
|
OperatResult.AppendText(">>请录入SN\n", Color.Black);
|
|
|
return;
|