|
|
@@ -122,7 +122,7 @@ namespace UAS_MES.Packing
|
|
|
if (ms_outboxcode != "")
|
|
|
{
|
|
|
sql.Clear();
|
|
|
- sql.Append("select pa_id,pa_checkno,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode from package where pa_outboxcode='" + ms_outboxcode + "'");
|
|
|
+ sql.Append("select pa_id,pa_checkno,PA_MAKECODE,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode,pa_weight,pa_nextstep,pa_status,pa_sccode from package where pa_outboxcode='" + ms_outboxcode + "'");
|
|
|
dtbar = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
if (dtbar.Rows.Count > 0)
|
|
|
{
|
|
|
@@ -171,9 +171,9 @@ namespace UAS_MES.Packing
|
|
|
sql.Clear();
|
|
|
sql.Append("insert into package (PA_ID, PA_OUTBOXCODE,PA_PRODCODE, PA_PACKDATE,");
|
|
|
sql.Append("PA_LEVEL,PA_PACKAGEQTY,PA_TOTALQTY,PA_MAKECODE,PA_STATUS,PA_INDATE,");
|
|
|
- sql.Append("PA_SALECODE,PA_CUSTCODE,PA_TYPE,PA_CURRENTQTY,PA_PACKTYPE,PA_STANDARDQTY)");
|
|
|
+ sql.Append("PA_SALECODE,PA_CUSTCODE,PA_TYPE,PA_CURRENTQTY,PA_PACKTYPE,PA_STANDARDQTY,pa_nextstep,pa_sccode)");
|
|
|
sql.Append("values ('" + pa_id + "','" + pa_outboxcode.Text + "','" + msprodcode + "',sysdate,'" + pa_level.Text + "','0','0'");
|
|
|
- sql.Append(",'" + ms_makecode + "','0',sysdate,'" + pa_salecode.Text + "','" + pa_custcode.Text + "','" + pa_type.Text + "','0','" + pa_packtype.Text + "','" + pa_standardqty.Text + "')");
|
|
|
+ sql.Append(",'" + ms_makecode + "','0',sysdate,'" + pa_salecode.Text + "','" + pa_custcode.Text + "','" + pa_type.Text + "','0','" + pa_packtype.Text + "','" + pa_standardqty.Text + "','"+pa_nextstep.Text+"','"+pa_sccode.Text+"')");
|
|
|
dh.ExecuteSql(sql.GetString(), "insert");
|
|
|
//删除原明细
|
|
|
dh.ExecuteSql("delete from packagedetail where pd_paid='" + old_pa_id + "' and pd_barcode = '" + sn_code.Text + "'", "delete");
|
|
|
@@ -285,6 +285,7 @@ namespace UAS_MES.Packing
|
|
|
//更新目标箱数量
|
|
|
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 + "'");
|
|
|
+
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "卡通箱转移", "序列号:" + sn_code.Text + ",从原箱号:" + ms_outboxcode + "转移至目标箱号:" + pa_outboxcode.Text + "", sn_code.Text, "");
|
|
|
OperateResult.AppendText(">>序列号:" + sn_code.Text + ",从原箱号:" + ms_outboxcode + "转移至目标箱号:" + pa_outboxcode.Text + "\n", Color.Green);
|
|
|
pa_outboxcode_KeyDown(sender, e);
|
|
|
@@ -431,9 +432,9 @@ namespace UAS_MES.Packing
|
|
|
sql.Clear();
|
|
|
sql.Append("insert into package (PA_ID, PA_OUTBOXCODE,PA_PRODCODE, PA_PACKDATE,");
|
|
|
sql.Append("PA_LEVEL,PA_PACKAGEQTY,PA_TOTALQTY,PA_MAKECODE,PA_STATUS,PA_INDATE,");
|
|
|
- sql.Append("PA_SALECODE,PA_CUSTCODE,PA_TYPE,PA_CURRENTQTY,PA_PACKTYPE,PA_STANDARDQTY,pa_weight,pa_nextstep,pa_sccode)");
|
|
|
+ sql.Append("PA_SALECODE,PA_CUSTCODE,PA_TYPE,PA_CURRENTQTY,PA_PACKTYPE,PA_STANDARDQTY,pa_weight,pa_nextstep,pa_sccode,pa_checkno)");
|
|
|
sql.Append("values ('" + pa_id + "','" + pa_outboxcode.Text + "','" + pa_macode + "',sysdate,'" + pa_level.Text + "','0','0'");
|
|
|
- sql.Append(",'" + pa_makecode + "','"+ pa_status.Text + "',sysdate,'" + pa_salecode.Text + "','" + pa_custcode.Text + "','" + pa_type.Text + "','0','" + pa_packtype.Text + "','" + pa_standardqty.Text + "','"+pa_weight.Text+"','"+ pa_nextstep.Text + "','"+ pa_sccode.Text + "')");
|
|
|
+ sql.Append(",'" + pa_makecode + "','"+ pa_status.Text + "',sysdate,'" + pa_salecode.Text + "','" + pa_custcode.Text + "','" + pa_type.Text + "','0','" + pa_packtype.Text + "','" + pa_standardqty.Text + "','"+pa_weight.Text+"','"+ pa_nextstep.Text + "','"+ pa_sccode.Text + "','"+pa_checkno+"')");
|
|
|
dh.ExecuteSql(sql.GetString(), "insert");
|
|
|
////删除原明细
|
|
|
//dh.ExecuteSql("delete from packagedetail where pd_paid='" + old_pa_id + "'", "delete");
|
|
|
@@ -444,7 +445,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_status=0,pa_weight = ''", "pa_outboxcode = '" + ms_outboxcode.Text + "'");
|
|
|
+ dh.UpdateByCondition("package", "pa_currentqty=0,pa_status=0,pa_weight = '',pa_checkno = ''", "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 + "'");
|