|
|
@@ -104,7 +104,7 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
sql.Clear();
|
|
|
sql.Append("select ma_code as ms_makecode,nvl(mcd_okqty,0),ma_prodcode,pr_detail,");
|
|
|
- sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty from make left join makecraftdetail on ");
|
|
|
+ sql.Append("pr_spec,ma_qty - nvl(mcd_inqty, 0) mcd_remainqty,nvl(ma_unlimitin,0) ma_unlimitin from make left join makecraftdetail on ");
|
|
|
sql.Append("mcd_maid=ma_id left join product on pr_code=ma_prodcode where ma_code='" + oMakeCode + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
@@ -180,7 +180,13 @@ namespace UAS_MES.Make
|
|
|
}
|
|
|
//根据序列号获取此时BT号
|
|
|
//ms_bt = dh.getFieldDataByCondition("makeserial", "ms_bt", "ms_id = '" + oMsID + "'").ToString();
|
|
|
- if (dh.CheckExist("makeserial", "ms_bt = '" + sncode.Text + "'"))
|
|
|
+ if (int.Parse(mcd_remainqty.Text) <= 0 && dt.Rows[0]["ma_unlimitin"].ToString() == "0")
|
|
|
+ {
|
|
|
+ ErrorMessage = "工单" + ms_makecode.Text + "剩余采集数不足\n>>>请输入SN";
|
|
|
+ OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else if (dh.CheckExist("makeserial", "ms_bt = '" + sncode.Text + "'"))
|
|
|
{
|
|
|
OperateResult.AppendText(">>录入错误,已存在此BT\n", Color.Red, sncode);
|
|
|
OperateResult.AppendText(">>请输入BT\n", Color.Black);
|
|
|
@@ -245,7 +251,13 @@ namespace UAS_MES.Make
|
|
|
}
|
|
|
////根据序列号获取此时网标号
|
|
|
//ms_mac = dh.getFieldDataByCondition("makeserial", "ms_mac", "ms_id = '" + oMsID + "'").ToString();
|
|
|
- if (dh.CheckExist("makeserial", "ms_mac = '" + sncode.Text + "'"))
|
|
|
+ if (int.Parse(mcd_remainqty.Text) <= 0 && dt.Rows[0]["ma_unlimitin"].ToString() == "0")
|
|
|
+ {
|
|
|
+ ErrorMessage = "工单" + ms_makecode.Text + "剩余采集数不足\n>>>请输入SN";
|
|
|
+ OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else if (dh.CheckExist("makeserial", "ms_mac = '" + sncode.Text + "'"))
|
|
|
{
|
|
|
OperateResult.AppendText(">>录入错误,已存在此MAC\n", Color.Red, sncode);
|
|
|
OperateResult.AppendText(">>请输入MAC\n", Color.Black);
|