|
@@ -109,7 +109,7 @@ namespace UAS_MES_NEW.Packing
|
|
|
if (e.KeyCode == Keys.Enter)
|
|
if (e.KeyCode == Keys.Enter)
|
|
|
{
|
|
{
|
|
|
sql.Clear();
|
|
sql.Clear();
|
|
|
- sql.Append("select pa_weight,pr_bigboxmaxw,pr_bigboxminw,pr_colorboxgw,pa_id,pa_prodcode,pr_spec,pr_detail,pa_makecode,pa_salecode,pa_totalqty,");
|
|
|
|
|
|
|
+ sql.Append("select pa_weight,pr_bigboxmaxw,pr_bigboxminw,PA_STANDARDQTY,PA_CURRENTQTY,pr_colorboxgw,pa_id,pa_prodcode,pr_spec,pr_detail,pa_makecode,pa_salecode,pa_totalqty,");
|
|
|
sql.Append("pa_packageqty from package left join product on pr_code=pa_prodcode where ");
|
|
sql.Append("pa_packageqty from package left join product on pr_code=pa_prodcode where ");
|
|
|
sql.Append("pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=2");
|
|
sql.Append("pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=2");
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
@@ -132,6 +132,8 @@ namespace UAS_MES_NEW.Packing
|
|
|
string _maxweight = dt.Rows[0]["pr_bigboxmaxw"].ToString();
|
|
string _maxweight = dt.Rows[0]["pr_bigboxmaxw"].ToString();
|
|
|
string _minweight = dt.Rows[0]["pr_bigboxminw"].ToString();
|
|
string _minweight = dt.Rows[0]["pr_bigboxminw"].ToString();
|
|
|
string pa_weight = dt.Rows[0]["pa_weight"].ToString();
|
|
string pa_weight = dt.Rows[0]["pa_weight"].ToString();
|
|
|
|
|
+ string PA_STANDARDQTY = dt.Rows[0]["PA_STANDARDQTY"].ToString();
|
|
|
|
|
+ string PA_CURRENTQTY = dt.Rows[0]["PA_CURRENTQTY"].ToString();
|
|
|
if (pa_weight != "")
|
|
if (pa_weight != "")
|
|
|
{
|
|
{
|
|
|
OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已经称重\n", Color.Red);
|
|
OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "已经称重\n", Color.Red);
|
|
@@ -147,15 +149,19 @@ namespace UAS_MES_NEW.Packing
|
|
|
else
|
|
else
|
|
|
pr_colorboxgw.Text = MinWeight + "-" + MaxWeight;
|
|
pr_colorboxgw.Text = MinWeight + "-" + MaxWeight;
|
|
|
|
|
|
|
|
- if ((ActualWeight >= MinWeight) && (ActualWeight <= MaxWeight))
|
|
|
|
|
|
|
+ if (PA_STANDARDQTY == PA_CURRENTQTY)
|
|
|
{
|
|
{
|
|
|
- OperateResult.AppendText(">>大箱" + pa_outboxcode.Text + "重量检测检测合格\n", Color.Green);
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- OperateResult.AppendText(">>大箱" + pa_outboxcode.Text + "重量检测未通过\n", Color.Red);
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ if ((ActualWeight >= MinWeight) && (ActualWeight <= MaxWeight))
|
|
|
|
|
+ {
|
|
|
|
|
+ OperateResult.AppendText(">>大箱" + pa_outboxcode.Text + "重量检测检测合格\n", Color.Green);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ OperateResult.AppendText(">>大箱" + pa_outboxcode.Text + "重量检测未通过\n", Color.Red);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
//更新大箱重量
|
|
//更新大箱重量
|
|
|
sql.Clear();
|
|
sql.Clear();
|
|
|
sql.Append("update package set pa_weight='" + ActualWeight + "' where pa_outboxcode= '" + pa_outboxcode.Text + "'");
|
|
sql.Append("update package set pa_weight='" + ActualWeight + "' where pa_outboxcode= '" + pa_outboxcode.Text + "'");
|