|
|
@@ -70,6 +70,11 @@ namespace UAS_MES_NEW.Make
|
|
|
KEY.Text = arr[3];
|
|
|
MAC.Text = arr[4];
|
|
|
IMEI.Text = arr[5];
|
|
|
+ if (dh.CheckExist("wincheck", "WC_SNCODE<>'" + TSN.Text + "' and ( WC_PSN='" + PSN.Text + "' or WC_PKID='" + PKID.Text + "' or WC_KEY='" + KEY.Text + "' or WC_MAC='" + IMEI.Text + "' or WC_IMEI='" + IMEI.Text + "')"))
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>包含重复信息\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
sncode.Text = TSN.Text;
|
|
|
if (sncode.Text == "")
|
|
|
{
|
|
|
@@ -97,7 +102,7 @@ namespace UAS_MES_NEW.Make
|
|
|
sql.Append(" ms_prodcode = pr_code where ms_id = '" + oMsID + "'");
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
BaseUtil.SetFormValue(this.Controls, dt);
|
|
|
- OperateResult.AppendText(">>请输入电量\n", Color.Black);
|
|
|
+ OperateResult.AppendText(">>请输入核对参数\n", Color.Black);
|
|
|
sn_code = sncode.Text;
|
|
|
sncode.Text = "";
|
|
|
isnetcode = true;
|
|
|
@@ -117,9 +122,16 @@ namespace UAS_MES_NEW.Make
|
|
|
if (TSN.Text == sncode.Text)
|
|
|
{
|
|
|
TSN_CHECK.Text = sncode.Text;
|
|
|
- if (CheckInfoPass())
|
|
|
{
|
|
|
OperateResult.AppendText(">>TSN核对成功\n", Color.Green);
|
|
|
+ if (CheckInfoPass())
|
|
|
+ {
|
|
|
+ dh.ExecuteSql("insert into wincheck(WC_ID, WC_SNCODE, WC_PSN, WC_PKID, WC_KEY, WC_MAC, WC_IMEI) values(wincheck_seq.nextval,'" + TSN.Text + "','" + PSN.Text + "','" + PKID.Text + "','" + KEY.Text + "','" + MAC.Text + "','" + IMEI.Text + "')", "insert");
|
|
|
+ isnetcode = false;
|
|
|
+ sncode.Text = "";
|
|
|
+ sncode.Focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
@@ -137,9 +149,16 @@ namespace UAS_MES_NEW.Make
|
|
|
if (PSN.Text == sncode.Text)
|
|
|
{
|
|
|
PSN_CHECK.Text = sncode.Text;
|
|
|
- if (CheckInfoPass())
|
|
|
{
|
|
|
OperateResult.AppendText(">>PSN核对成功\n", Color.Green);
|
|
|
+ if (CheckInfoPass())
|
|
|
+ {
|
|
|
+ dh.ExecuteSql("insert into wincheck(WC_ID, WC_SNCODE, WC_PSN, WC_PKID, WC_KEY, WC_MAC, WC_IMEI) values(wincheck_seq.nextval,'" + TSN.Text + "','" + PSN.Text + "','" + PKID.Text + "','" + KEY.Text + "','" + MAC.Text + "','" + IMEI.Text + "')", "insert");
|
|
|
+ isnetcode = false;
|
|
|
+ sncode.Text = "";
|
|
|
+ sncode.Focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
@@ -157,9 +176,16 @@ namespace UAS_MES_NEW.Make
|
|
|
if (PKID.Text == sncode.Text)
|
|
|
{
|
|
|
PKID_CHECK.Text = sncode.Text;
|
|
|
- if (CheckInfoPass())
|
|
|
{
|
|
|
OperateResult.AppendText(">>PKID核对成功\n", Color.Green);
|
|
|
+ if (CheckInfoPass())
|
|
|
+ {
|
|
|
+ dh.ExecuteSql("insert into wincheck(WC_ID, WC_SNCODE, WC_PSN, WC_PKID, WC_KEY, WC_MAC, WC_IMEI) values(wincheck_seq.nextval,'" + TSN.Text + "','" + PSN.Text + "','" + PKID.Text + "','" + KEY.Text + "','" + MAC.Text + "','" + IMEI.Text + "')", "insert");
|
|
|
+ isnetcode = false;
|
|
|
+ sncode.Text = "";
|
|
|
+ sncode.Focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
@@ -177,9 +203,16 @@ namespace UAS_MES_NEW.Make
|
|
|
if (KEY.Text == sncode.Text)
|
|
|
{
|
|
|
KEY_CHECK.Text = sncode.Text;
|
|
|
- if (CheckInfoPass())
|
|
|
{
|
|
|
OperateResult.AppendText(">>KEY核对成功\n", Color.Green);
|
|
|
+ if (CheckInfoPass())
|
|
|
+ {
|
|
|
+ dh.ExecuteSql("insert into wincheck(WC_ID, WC_SNCODE, WC_PSN, WC_PKID, WC_KEY, WC_MAC, WC_IMEI) values(wincheck_seq.nextval,'" + TSN.Text + "','" + PSN.Text + "','" + PKID.Text + "','" + KEY.Text + "','" + MAC.Text + "','" + IMEI.Text + "')", "insert");
|
|
|
+ isnetcode = false;
|
|
|
+ sncode.Text = "";
|
|
|
+ sncode.Focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
@@ -197,9 +230,16 @@ namespace UAS_MES_NEW.Make
|
|
|
if (MAC.Text == sncode.Text)
|
|
|
{
|
|
|
MAC_CHECK.Text = sncode.Text;
|
|
|
- if (CheckInfoPass())
|
|
|
{
|
|
|
OperateResult.AppendText(">>MAC核对成功\n", Color.Green);
|
|
|
+ if (CheckInfoPass())
|
|
|
+ {
|
|
|
+ dh.ExecuteSql("insert into wincheck(WC_ID, WC_SNCODE, WC_PSN, WC_PKID, WC_KEY, WC_MAC, WC_IMEI) values(wincheck_seq.nextval,'" + TSN.Text + "','" + PSN.Text + "','" + PKID.Text + "','" + KEY.Text + "','" + MAC.Text + "','" + IMEI.Text + "')", "insert");
|
|
|
+ isnetcode = false;
|
|
|
+ sncode.Text = "";
|
|
|
+ sncode.Focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
@@ -217,9 +257,16 @@ namespace UAS_MES_NEW.Make
|
|
|
if (IMEI.Text == sncode.Text)
|
|
|
{
|
|
|
IMEI_CHECK.Text = sncode.Text;
|
|
|
- if (CheckInfoPass())
|
|
|
{
|
|
|
OperateResult.AppendText(">>IMEI核对成功\n", Color.Green);
|
|
|
+ if (CheckInfoPass())
|
|
|
+ {
|
|
|
+ dh.ExecuteSql("insert into wincheck(WC_ID, WC_SNCODE, WC_PSN, WC_PKID, WC_KEY, WC_MAC, WC_IMEI) values(wincheck_seq.nextval,'" + TSN.Text + "','" + PSN.Text + "','" + PKID.Text + "','" + KEY.Text + "','" + MAC.Text + "','" + IMEI.Text + "')", "insert");
|
|
|
+ isnetcode = false;
|
|
|
+ sncode.Text = "";
|
|
|
+ sncode.Focus();
|
|
|
+ return;
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
@@ -230,47 +277,50 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- isnetcode = false;
|
|
|
- sncode.Text = "";
|
|
|
- sncode.Focus();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private bool CheckInfoPass()
|
|
|
{
|
|
|
- bool CheckPass = true;
|
|
|
if (CheckTSN.Checked)
|
|
|
{
|
|
|
if (TSN.Text != TSN_CHECK.Text)
|
|
|
- CheckPass = false;
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
if (CheckPSN.Checked)
|
|
|
{
|
|
|
if (PSN.Text != PSN_CHECK.Text)
|
|
|
- CheckPass = false;
|
|
|
+ return false;
|
|
|
}
|
|
|
if (CheckPKID.Checked)
|
|
|
{
|
|
|
if (PKID.Text != PKID_CHECK.Text)
|
|
|
- CheckPass = false;
|
|
|
+ return false;
|
|
|
}
|
|
|
if (CheckKey.Checked)
|
|
|
{
|
|
|
if (KEY.Text != KEY_CHECK.Text)
|
|
|
- CheckPass = false;
|
|
|
+ return false;
|
|
|
}
|
|
|
if (CheckMac.Checked)
|
|
|
{
|
|
|
if (MAC.Text != MAC_CHECK.Text)
|
|
|
- CheckPass = false;
|
|
|
+ return false;
|
|
|
}
|
|
|
if (CheckImei.Checked)
|
|
|
{
|
|
|
if (IMEI.Text != IMEI_CHECK.Text)
|
|
|
- CheckPass = false;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ string ErrorMessage2;
|
|
|
+ if (!LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, TSN.Text, "核对标签信息", "核对成功", User.UserCode, out ErrorMessage2))
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>" + ErrorMessage2 + "\n", Color.Red);
|
|
|
}
|
|
|
- return CheckPass;
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
private void Make_CollectNetCode_SizeChanged(object sender, EventArgs e)
|
|
|
@@ -291,6 +341,12 @@ namespace UAS_MES_NEW.Make
|
|
|
OperateResult.AppendText(">>清除完成,清重新输入SN号\n", Color.Green);
|
|
|
isnetcode = false;
|
|
|
sncode.Focus();
|
|
|
+ TSN.Clear();
|
|
|
+ PSN.Clear();
|
|
|
+ PKID.Clear();
|
|
|
+ IMEI.Clear();
|
|
|
+ MAC.Clear();
|
|
|
+ KEY.Clear();
|
|
|
}
|
|
|
}
|
|
|
}
|