|
|
@@ -551,6 +551,251 @@ namespace UAS_MES.Make
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
+ case "MEID":
|
|
|
+ //验证是否MAC和BT重复
|
|
|
+ if (hs.ContainsValue(imeif))
|
|
|
+ {
|
|
|
+ foreach (DictionaryEntry de in hs)
|
|
|
+ {
|
|
|
+ //拿到重复的项
|
|
|
+ if (de.Value.ToString() == imeif)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误," + de.Key + "已录\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //校验网标是否存在
|
|
|
+ string meid = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + imeif + "' and ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "' and nvl(ms_nextmacode,' ')=' '").ToString();
|
|
|
+ if (meid != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + meid + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //校验在sninfo表中是否存在
|
|
|
+ teSn = dh.getFieldDataByCondition("sninfo", "si_sn", "si_" + type + "='" + imeif + "' and si_id <>'" + siid + "'").ToString();
|
|
|
+ if (teSn != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + teSn + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "UUID":
|
|
|
+ //验证是否MAC和BT重复
|
|
|
+ if (hs.ContainsValue(imeif))
|
|
|
+ {
|
|
|
+ foreach (DictionaryEntry de in hs)
|
|
|
+ {
|
|
|
+ //拿到重复的项
|
|
|
+ if (de.Value.ToString() == imeif)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误," + de.Key + "已录\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //校验网标是否存在
|
|
|
+ string uuid = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + imeif + "' and ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "' and nvl(ms_nextmacode,' ')=' '").ToString();
|
|
|
+ if (uuid != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + uuid + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //校验在sninfo表中是否存在
|
|
|
+ teSn = dh.getFieldDataByCondition("sninfo", "si_sn", "si_" + type + "='" + imeif + "' and si_id <>'" + siid + "'").ToString();
|
|
|
+ if (teSn != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + teSn + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "ETHMAC":
|
|
|
+ //验证是否MAC和BT重复
|
|
|
+ if (hs.ContainsValue(imeif))
|
|
|
+ {
|
|
|
+ foreach (DictionaryEntry de in hs)
|
|
|
+ {
|
|
|
+ //拿到重复的项
|
|
|
+ if (de.Value.ToString() == imeif)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误," + de.Key + "已录\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //校验网标是否存在
|
|
|
+ string ethmac = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + imeif + "' and ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "' and nvl(ms_nextmacode,' ')=' '").ToString();
|
|
|
+ if (ethmac != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + ethmac + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //校验在sninfo表中是否存在
|
|
|
+ teSn = dh.getFieldDataByCondition("sninfo", "si_sn", "si_" + type + "='" + imeif + "' and si_id <>'" + siid + "'").ToString();
|
|
|
+ if (teSn != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + teSn + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "OTHCODE1":
|
|
|
+ //验证是否MAC和BT重复
|
|
|
+ if (hs.ContainsValue(imeif))
|
|
|
+ {
|
|
|
+ foreach (DictionaryEntry de in hs)
|
|
|
+ {
|
|
|
+ //拿到重复的项
|
|
|
+ if (de.Value.ToString() == imeif)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误," + de.Key + "已录\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //校验网标是否存在
|
|
|
+ string othcode1 = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + imeif + "' and ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "' and nvl(ms_nextmacode,' ')=' '").ToString();
|
|
|
+ if (othcode1 != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + othcode1 + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //校验在sninfo表中是否存在
|
|
|
+ teSn = dh.getFieldDataByCondition("sninfo", "si_sn", "si_" + type + "='" + imeif + "' and si_id <>'" + siid + "'").ToString();
|
|
|
+ if (teSn != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + teSn + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "KEYID":
|
|
|
+ //验证是否MAC和BT重复
|
|
|
+ if (hs.ContainsValue(imeif))
|
|
|
+ {
|
|
|
+ foreach (DictionaryEntry de in hs)
|
|
|
+ {
|
|
|
+ //拿到重复的项
|
|
|
+ if (de.Value.ToString() == imeif)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误," + de.Key + "已录\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //校验网标是否存在
|
|
|
+ string keyid = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + imeif + "' and ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "' and nvl(ms_nextmacode,' ')=' '").ToString();
|
|
|
+ if (keyid != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + keyid + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //校验在sninfo表中是否存在
|
|
|
+ teSn = dh.getFieldDataByCondition("sninfo", "si_sn", "si_" + type + "='" + imeif + "' and si_id <>'" + siid + "'").ToString();
|
|
|
+ if (teSn != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + teSn + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "ICCID":
|
|
|
+ //验证是否MAC和BT重复
|
|
|
+ if (hs.ContainsValue(imeif))
|
|
|
+ {
|
|
|
+ foreach (DictionaryEntry de in hs)
|
|
|
+ {
|
|
|
+ //拿到重复的项
|
|
|
+ if (de.Value.ToString() == imeif)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误," + de.Key + "已录\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //校验网标是否存在
|
|
|
+ string iccid = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + imeif + "' and ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "' and nvl(ms_nextmacode,' ')=' '").ToString();
|
|
|
+ if (iccid != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + iccid + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //校验在sninfo表中是否存在
|
|
|
+ teSn = dh.getFieldDataByCondition("sninfo", "si_sn", "si_" + type + "='" + imeif + "' and si_id <>'" + siid + "'").ToString();
|
|
|
+ if (teSn != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + teSn + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "CARCODE":
|
|
|
+ //验证是否MAC和BT重复
|
|
|
+ if (hs.ContainsValue(imeif))
|
|
|
+ {
|
|
|
+ foreach (DictionaryEntry de in hs)
|
|
|
+ {
|
|
|
+ //拿到重复的项
|
|
|
+ if (de.Value.ToString() == imeif)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误," + de.Key + "已录\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //校验网标是否存在
|
|
|
+ string carcode = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + imeif + "' and ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "' and nvl(ms_nextmacode,' ')=' '").ToString();
|
|
|
+ if (carcode != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + carcode + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //校验在sninfo表中是否存在
|
|
|
+ teSn = dh.getFieldDataByCondition("sninfo", "si_sn", "si_" + type + "='" + imeif + "' and si_id <>'" + siid + "'").ToString();
|
|
|
+ if (teSn != "")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + teSn + "使用\n", Color.Red);
|
|
|
+ OperateResult.AppendText(">>请输入" + ListA.Rows[step - 2]["psr_type"].ToString() + "\n", Color.Black, code);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
if (step == ListA.Rows.Count + 1)
|
|
|
{
|