|
|
@@ -29,6 +29,7 @@ namespace UAS_MES_NEW.Make
|
|
|
string oMsID = "";
|
|
|
string ActWeigh;
|
|
|
string oMsStatus = "";
|
|
|
+
|
|
|
Regex re = new Regex("\\d+.\\d+\\w+");
|
|
|
|
|
|
//称量的标准重量
|
|
|
@@ -314,7 +315,7 @@ namespace UAS_MES_NEW.Make
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql("select pd_barcode from packagedetail where pd_outboxcode = '" + pa_outboxcode.Text + "'", "select");
|
|
|
if (dt.Rows.Count > 0 && dt.Rows.Count == 1)
|
|
|
{
|
|
|
- dh.UpdateByCondition("package", "pa_makecode = '" + ms_makecode + "',pa_prodcode = '" + ms_prodcode + "',pa_salecode = '" + ms_salecode + "'", "pa_outboxcode = '" + pa_outboxcode.Text + "'");
|
|
|
+ dh.UpdateByCondition("package", "pa_makecode = '" + ms_makecode + "',pa_prodcode = '" + ms_prodcode + "',pa_salecode = '" + ms_salecode.Text + "'", "pa_outboxcode = '" + pa_outboxcode.Text + "'");
|
|
|
}
|
|
|
if (ErrorMessage.Contains("AFTERSUCCESS"))
|
|
|
OperateResult.AppendText(">>" + ErrorMessage + "\n");
|
|
|
@@ -331,8 +332,8 @@ namespace UAS_MES_NEW.Make
|
|
|
if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == int.Parse(pr_outboxinnerqty.Text))
|
|
|
{
|
|
|
ActWeigh = weight.Text == "" ? "0" : weight.Text.Replace("kg", "").Trim();
|
|
|
- float weighA = float.Parse(ActWeigh);
|
|
|
- dh.UpdateByCondition("package", "pa_status=1,pa_packageqty=pa_currentqty,pa_weight='" + weighA + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+ float weigh = float.Parse(ActWeigh);
|
|
|
+ dh.UpdateByCondition("package", "pa_status=1,pa_packageqty=pa_currentqty,pa_weight='" + weigh + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
pa_standardqty.Text = "";
|
|
|
pa_status.Text = "1";
|
|
|
OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱封箱成功\n", Color.Green);
|
|
|
@@ -445,7 +446,7 @@ namespace UAS_MES_NEW.Make
|
|
|
return;
|
|
|
}
|
|
|
sql.Clear();
|
|
|
- sql.Append("update oqcbatch set ob_status='UNCHECK' where ob_checkno ='" + ob_checkno.Text + "'");
|
|
|
+ sql.Append("update oqcbatch set ob_status='UNCHECK',ob_breakingdate=sysdate where ob_checkno ='" + ob_checkno.Text + "'");
|
|
|
dh.ExecuteSql(sql.GetString(), "select");
|
|
|
ob_nowcheckqty.Text = "";
|
|
|
ob_batchqty.Text = "";
|
|
|
@@ -663,8 +664,16 @@ namespace UAS_MES_NEW.Make
|
|
|
dh.ExecuteSQLTran(SQLS1.ToArray());
|
|
|
}
|
|
|
List<string> SQLS2 = new List<string>();
|
|
|
- ////置空原箱
|
|
|
- SQLS2.Add("update package set pa_checkno='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+ string prcode = dh.getFieldDataByCondition("packagedetail", "pd_prodcode", "pd_outboxcode = '" + pa_outboxcode.Text + "'").ToString();
|
|
|
+ string standqty = dh.getFieldDataByCondition("product", "pr_outboxinnerqty", "pr_code = '" + prcode + "'").ToString();
|
|
|
+ if (standqty != "")
|
|
|
+ {
|
|
|
+ //置空原箱
|
|
|
+ dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0,PA_STANDARDQTY = '" + standqty + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ //置空原箱
|
|
|
+ dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
pa_status.Text = "0";
|
|
|
//删除箱的明细
|
|
|
SQLS2.Add("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "'");
|