Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

章政 8 years ago
parent
commit
f830f259bc

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

@@ -336,7 +336,7 @@ namespace UAS_MES.Make
                             sql.Clear();
                             sql.Clear();
                             sql.Append("insert into craftmaterial (cm_id, cm_makecode,cm_maid,cm_maprodcode,cm_soncode,cm_mscode,cm_sncode,cm_stepcode,cm_stepname,");
                             sql.Append("insert into craftmaterial (cm_id, cm_makecode,cm_maid,cm_maprodcode,cm_soncode,cm_mscode,cm_sncode,cm_stepcode,cm_stepname,");
                             sql.Append("cm_craftcode,cm_craftname,cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid, cm_materialtype,cm_status,cm_fsoncode,cm_firstsn)");
                             sql.Append("cm_craftcode,cm_craftname,cm_barcode,cm_inqty,cm_indate,cm_inman,cm_linecode,cm_wccode,cm_sourcecode,cm_spid, cm_materialtype,cm_status,cm_fsoncode,cm_firstsn)");
-                            sql.Append("values(Craftmaterial_seq.nextval,'" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_maid"].Value + "','" + ms_prodcode.Text + "','" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
+                            sql.Append("values(Craftmaterial_seq.nextval,'" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_maid"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_maprodcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
                             sql.Append(",'" + LabelDataGridView.Rows[i].Cells["cm_sncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_sncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepname"].Value + "',");
                             sql.Append(",'" + LabelDataGridView.Rows[i].Cells["cm_sncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_sncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_stepname"].Value + "',");
                             sql.Append("'" + LabelDataGridView.Rows[i].Cells["cm_craftcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_craftname"].Value + "','" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value + "',1,sysdate,'" + User.UserCode + "','" + User.UserLineCode + "','" + ms_wccode.Text + "',");
                             sql.Append("'" + LabelDataGridView.Rows[i].Cells["cm_craftcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_craftname"].Value + "','" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value + "',1,sysdate,'" + User.UserCode + "','" + User.UserLineCode + "','" + ms_wccode.Text + "',");
                             sql.Append("'" + User.UserSourceCode + "','" + sp_id + "','" + LabelDataGridView.Rows[i].Cells["cm_materialtype"].Value + "','0','" + LabelDataGridView.Rows[i].Cells["cm_fsoncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_firstsn"].Value + "')");
                             sql.Append("'" + User.UserSourceCode + "','" + sp_id + "','" + LabelDataGridView.Rows[i].Cells["cm_materialtype"].Value + "','0','" + LabelDataGridView.Rows[i].Cells["cm_fsoncode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_firstsn"].Value + "')");

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_PositionStock.cs

@@ -165,7 +165,7 @@ namespace UAS_MES.Make
                 sql.Append("pr_detail,nvl(mss_useqty,0) mss_useqty from stepbom left join stepproduct on sp_sbid=sb_id left join product on ");
                 sql.Append("pr_detail,nvl(mss_useqty,0) mss_useqty from stepbom left join stepproduct on sp_sbid=sb_id left join product on ");
                 sql.Append("pr_code=sp_mothercode left join makesourcestock on  mss_craftcode=sb_craftcode and mss_makecode='"+ma_code.Text+"' ");
                 sql.Append("pr_code=sp_mothercode left join makesourcestock on  mss_craftcode=sb_craftcode and mss_makecode='"+ma_code.Text+"' ");
                 sql.Append("and mss_stepcode=sp_stepcode and sp_soncode=mss_prodcode and sp_fsoncode=mss_fprodcode left join make on ma_bomversion=sb_bomversion where sb_prodcode='" + ma_prodcode.Text + "' and sb_craftcode='" + ma_craftcode.Text + "' ");
                 sql.Append("and mss_stepcode=sp_stepcode and sp_soncode=mss_prodcode and sp_fsoncode=mss_fprodcode left join make on ma_bomversion=sb_bomversion where sb_prodcode='" + ma_prodcode.Text + "' and sb_craftcode='" + ma_craftcode.Text + "' ");
-                sql.Append("and sp_stepcode='" + User.CurrentStepCode + "' and sp_tracekind=2 and ma_code='" + ma_code.Text + "' order by sp_soncode");
+                sql.Append("and sp_stepcode='" + User.CurrentStepCode + "' and sp_tracekind=2 and ma_code='" + ma_code.Text + "' and mss_linecode = '" + User.UserLineCode + "' order by sp_soncode");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
                 BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
             }
             }
@@ -176,7 +176,7 @@ namespace UAS_MES.Make
                 sql.Append("pr_detail,nvl(mss_useqty,0) mss_useqty from stepbom left join stepproduct on sp_sbid=sb_id left join product on ");
                 sql.Append("pr_detail,nvl(mss_useqty,0) mss_useqty from stepbom left join stepproduct on sp_sbid=sb_id left join product on ");
                 sql.Append("pr_code=sp_mothercode left join makesourcestock on  mss_craftcode=sb_craftcode ");
                 sql.Append("pr_code=sp_mothercode left join makesourcestock on  mss_craftcode=sb_craftcode ");
                 sql.Append("and mss_stepcode=sp_stepcode and sp_soncode=mss_prodcode and sp_fsoncode=mss_fprodcode where  ");
                 sql.Append("and mss_stepcode=sp_stepcode and sp_soncode=mss_prodcode and sp_fsoncode=mss_fprodcode where  ");
-                sql.Append(" sp_stepcode='" + User.CurrentStepCode + "' and sp_tracekind=2 order by sp_soncode");
+                sql.Append(" sp_stepcode='" + User.CurrentStepCode + "' and sp_tracekind=2 and mss_linecode = '"+User.UserLineCode+"' order by sp_soncode");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
                 BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
             }
             }

+ 1 - 0
UAS-MES/FunctionCode/Make/Make_RePrintLabel.cs

@@ -118,6 +118,7 @@ namespace UAS_MES.Make
                     OperateResult.AppendText("<<输入不能为空\n", Color.Red);
                     OperateResult.AppendText("<<输入不能为空\n", Color.Red);
                     return;
                     return;
                 }
                 }
+                OperateResult.AppendText(">>" + inputText.Text + "\n", Color.Black);
                 //打印类型为彩盒或者机身标
                 //打印类型为彩盒或者机身标
                 if (giftBox.Checked || fuselagel.Checked)
                 if (giftBox.Checked || fuselagel.Checked)
                 {
                 {