Browse Source

拆箱时解除原箱封箱状态

Hcsy 8 years ago
parent
commit
3a1e58a31e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      UAS-MES/FunctionCode/Packing/Packing_CartonTransfer.cs

+ 3 - 3
UAS-MES/FunctionCode/Packing/Packing_CartonTransfer.cs

@@ -182,7 +182,7 @@ namespace UAS_MES.Packing
                                                     sql.Append("values (packagedetail_seq.nextval,'" + pa_id + "','" + pa_outboxcode.Text + "','" + sn_code.Text + "','1','" + msprodcode + "','" + ms_makecode + "',sysdate,to_char(sysdate,'yyyymmdd'))");
                                                     dh.ExecuteSql(sql.GetString(), "insert");
                                                     //更新原箱数量
-                                                    dh.UpdateByCondition("package", "pa_currentqty=pa_currentqty-1", "pa_outboxcode = '" + ms_outboxcode + "'");
+                                                    dh.UpdateByCondition("package", "pa_currentqty=pa_currentqty-1,pa_status=0", "pa_outboxcode = '" + ms_outboxcode + "'");
                                                     //更新目标箱数量
                                                     dh.UpdateByCondition("package", "pa_currentqty=1, pa_totalqty=1,pa_packageqty=1", "pa_outboxcode = '" + pa_outboxcode.Text + "'");
                                                     dh.UpdateByCondition("makeserial", "ms_outboxcode = '" + pa_outboxcode.Text + "'", "ms_id = '" + ms_id + "'");
@@ -281,7 +281,7 @@ namespace UAS_MES.Packing
                                         sql.Append("values (packagedetail_seq.nextval,'" + dh.getFieldDataByCondition("package", "pa_id", "PA_OUTBOXCODE = '" + pa_outboxcode.Text + "'").ToString() + "','" + pa_outboxcode.Text + "','" + sn_code.Text + "','1','" + msprodcode + "','" + ms_makecode + "',sysdate,to_char(sysdate,'yyyymmdd'))");
                                         dh.ExecuteSql(sql.GetString(), "insert");
                                         //更新原箱数量
-                                        dh.UpdateByCondition("package", "pa_currentqty=pa_currentqty-1", "pa_outboxcode = '" + ms_outboxcode + "'");
+                                        dh.UpdateByCondition("package", "pa_currentqty=pa_currentqty-1,pa_status=0", "pa_outboxcode = '" + ms_outboxcode + "'");
                                         //更新目标箱数量
                                         dh.UpdateByCondition("package", "pa_currentqty=nvl(pa_currentqty,0)+ 1,pa_totalqty=nvl(pa_totalqty,0)+1,pa_packageqty=nvl(pa_packageqty ,0)+1", "pa_outboxcode = '" + pa_outboxcode.Text + "'");
                                         dh.UpdateByCondition("makeserial", "ms_outboxcode = '" + pa_outboxcode.Text + "'", "ms_id = '" + ms_id + "'");
@@ -444,7 +444,7 @@ namespace UAS_MES.Packing
 
                             dh.UpdateByCondition("packagedetail", "PD_OUTBOXCODE = '" + pa_outboxcode.Text + "',PD_PAID = '" + pa_id + "'", "pd_paid='" + old_pa_id + "'");
                             //更新原箱数量
-                            dh.UpdateByCondition("package", "pa_currentqty=0", "pa_outboxcode = '" + ms_outboxcode.Text + "'");
+                            dh.UpdateByCondition("package", "pa_currentqty=0,pa_status=0", "pa_outboxcode = '" + ms_outboxcode.Text + "'");
                             //更新目标箱数量
                             dh.UpdateByCondition("package", "pa_currentqty=" + int.Parse(pa_qty.Text) + ", pa_totalqty=" + int.Parse(pa_qty.Text) + ",pa_packageqty=" + int.Parse(pa_qty.Text) + "", "pa_outboxcode = '" + pa_outboxcode.Text + "'");
                             dh.UpdateByCondition("makeserial", "ms_outboxcode = '" + pa_outboxcode.Text + "'", "ms_outboxcode = '" + ms_outboxcode.Text + "'");