Browse Source

卡通箱称重为满箱却已封箱不进行重量检测

Hcsy 8 years ago
parent
commit
ece2c2363f

+ 4 - 2
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs

@@ -102,7 +102,7 @@ namespace UAS_MES.Make
             {
                 //根据箱号查询表单数据
                 sql.Clear();
-                sql.Append("select pa_totalqty,ma_code,ma_qty,ma_salecode,pr_detail,pr_cartonunit,pr_code,pr_cartongw,");
+                sql.Append("select pa_totalqty,ma_code,ma_qty,ma_salecode,PA_STANDARDQTY,PA_CURRENTQTY,pr_detail,pr_cartonunit,pr_code,pr_cartongw,");
                 sql.Append("pr_cartonmaxw,pr_cartonminw,nvl(PR_CHECKCARTONW,'0') PR_CHECKCARTONW from package left join packagedetail ");
                 sql.Append("on pa_id=pd_paid left join makeserial on ms_sncode=pd_barcode and ms_makecode=pa_makecode left join product on pr_code=pd_prodcode left join make on ma_code=pd_makecode ");
                 sql.Append(" where pa_outboxcode='" + outboxcode.Text + "' and pa_nextstep='" + User.CurrentStepCode + "'");
@@ -118,6 +118,8 @@ namespace UAS_MES.Make
                     string _maxweight = dt.Rows[0]["pr_cartonmaxw"].ToString();
                     string _minweight = dt.Rows[0]["pr_cartonminw"].ToString();
                     string pa_pr_cartonunit = dt.Rows[0]["pr_cartonunit"].ToString();
+                    string PA_STANDARDQTY = dt.Rows[0]["PA_STANDARDQTY"].ToString();
+                    string PA_CURRENTQTY = dt.Rows[0]["PA_CURRENTQTY"].ToString();
                     Weight = double.Parse(_weight == "" ? "0" : _weight);
                     MaxWeight = double.Parse(_maxweight == "" ? "0" : _maxweight);
                     MinWeight = double.Parse(_minweight == "" ? "0" : _minweight);
@@ -128,7 +130,7 @@ namespace UAS_MES.Make
                         pr_cartongw.Text = MinWeight + "-" + MaxWeight + dt.Rows[0]["pr_cartonunit"].ToString();
                     double ActualWeight = double.Parse(weight.Text == "" ? "0" : weight.Text.Replace("kg", "").Trim());
                     //需要检查称重重量
-                    if (PR_CHECKCARTONW != "0")
+                    if (PR_CHECKCARTONW != "0" && PA_STANDARDQTY == PA_CURRENTQTY)
                     {
                         //称量合格或不合格都记录重量
                         if (ActualWeight >= MinWeight && ActualWeight <= MaxWeight)

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -384,7 +384,7 @@ namespace UAS_MES.Make
                         if (Seal == "Yes")
                         {
                             OperateResult.AppendText(">>栈板号" + pa_outboxcode.Text + "装栈板成功\n", Color.Green);
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "栈板采集", "栈板" + pa_outboxcode.Text + "成功", outboxcode.Text, "");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "栈板采集", "栈板" + pa_outboxcode.Text + "成功", outboxcode.Text, "");
                             dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                             pa_status.Text = "1";
                         }