浏览代码

完工入库采集测试界面逻辑修改

Hcsy 7 年之前
父节点
当前提交
5bb8de97ed
共有 1 个文件被更改,包括 55 次插入55 次删除
  1. 55 55
      UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeInTest.cs

+ 55 - 55
UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeInTest.cs

@@ -68,7 +68,7 @@ namespace UAS_MES.Warehouse
                             if (!CheckStatus(pa_downstatus, pa_status, pa_iostatus, pa_outno, "栈板"))
                                 return;
                             insertprodiomac(pa_id, pa_makecode, "PALLET");
-                            OperateResult.AppendText("栈板" + input.Text + "完工入库成功\n", Color.Green);
+                            OperateResult.AppendText("栈板" + input.Text + "完工入库测试成功\n", Color.Green);
                         }
                         else
                         {
@@ -104,7 +104,7 @@ namespace UAS_MES.Warehouse
                             if (!CheckStatus(pa_downstatus, pa_status, pa_iostatus, pa_outno, "箱"))
                                 return;
                             insertprodiomac(pa_id, pa_makecode, "BOX");
-                            OperateResult.AppendText("箱号" + input.Text + "完工入库成功\n", Color.Green);
+                            OperateResult.AppendText("箱号" + input.Text + "完工入库测试成功\n", Color.Green);
                         }
                         else
                         {
@@ -162,13 +162,13 @@ namespace UAS_MES.Warehouse
                                 OperateResult.AppendText("序列号" + input.Text + "处于售后退货状态\n", Color.Red, input);
                                 return;
                             }
-                            sql.Clear();
-                            sql.Append("insert into prodiomac(pim_id,pim_prodcode,pim_mac,pim_indate,pim_inman,pim_type,pim_inorout,pim_class) ");
-                            sql.Append("values(prodiomac_seq.nextval,'" + ms_prodcode + "','" + input.Text + "',sysdate,'" + User.UserCode + "',' ','IN','完工入库')");
-                            dh.ExecuteSql(sql.GetString(), "insert");
-                            dh.UpdateByCondition("makeserial", "ms_iostatus=1", " ms_id='" + ms_id + "'");
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "序列号" + input.Text + "完工入库", "序列号" + input.Text + "完工入库成功", input.Text, "");
-                            OperateResult.AppendText("序列号" + input.Text + "完工入库成功\n", Color.Green);
+                            //sql.Clear();
+                            //sql.Append("insert into prodiomac(pim_id,pim_prodcode,pim_mac,pim_indate,pim_inman,pim_type,pim_inorout,pim_class) ");
+                            //sql.Append("values(prodiomac_seq.nextval,'" + ms_prodcode + "','" + input.Text + "',sysdate,'" + User.UserCode + "',' ','IN','完工入库')");
+                            //dh.ExecuteSql(sql.GetString(), "insert");
+                            //dh.UpdateByCondition("makeserial", "ms_iostatus=1", " ms_id='" + ms_id + "'");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "序列号" + input.Text + "完工入库测试", "序列号" + input.Text + "完工入库测试成功", input.Text, "");
+                            OperateResult.AppendText("序列号" + input.Text + "完工入库测试成功\n", Color.Green);
                         }
                     }
                     else
@@ -207,7 +207,7 @@ namespace UAS_MES.Warehouse
                             }
                             DeleteData();
                             deleteprodiomac(pa_id, pa_makecode, "PALLET");
-                            OperateResult.AppendText("栈板" + input.Text + "取消完工入库成功\n", Color.Green, input);
+                            OperateResult.AppendText("栈板" + input.Text + "取消完工入库测试成功\n", Color.Green, input);
                         }
                         else
                         {
@@ -252,7 +252,7 @@ namespace UAS_MES.Warehouse
                             }
                             DeleteData();
                             deleteprodiomac(pa_id, pa_makecode, "BOX");
-                            OperateResult.AppendText("箱号" + input.Text + "取消完工入库成功\n", Color.Green, input);
+                            OperateResult.AppendText("箱号" + input.Text + "取消完工入库测试成功\n", Color.Green, input);
                         }
                         else
                         {
@@ -296,13 +296,13 @@ namespace UAS_MES.Warehouse
                                 return;
                             }
                             DeleteData();
-                            sql.Clear();
-                            sql.Append("delete from prodiomac where pim_id =(select max(pim_id) from prodiomac where ");
-                            sql.Append(" pim_mac='" + input.Text + "' and pim_inorout='IN' AND pim_class='完工入库' )");
-                            dh.ExecuteSql(sql.GetString(), "delete");
-                            dh.UpdateByCondition("makeserial", "ms_iostatus=0", " ms_id='" + ms_id + "'");
-                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "序列号" + input.Text + "取消完工入库", "序列号" + input.Text + "取消完工入库成功", input.Text, "");
-                            OperateResult.AppendText("序列号" + input.Text + "取消完工入库成功\n", Color.Green, input);
+                            //sql.Clear();
+                            //sql.Append("delete from prodiomac where pim_id =(select max(pim_id) from prodiomac where ");
+                            //sql.Append(" pim_mac='" + input.Text + "' and pim_inorout='IN' AND pim_class='完工入库' )");
+                            //dh.ExecuteSql(sql.GetString(), "delete");
+                            //dh.UpdateByCondition("makeserial", "ms_iostatus=0", " ms_id='" + ms_id + "'");
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "序列号" + input.Text + "取消完工入库测试", "序列号" + input.Text + "取消完工入库测试成功", input.Text, "");
+                            OperateResult.AppendText("序列号" + input.Text + "取消完工入库测试成功\n", Color.Green, input);
                         }
                     }
                     else
@@ -362,28 +362,28 @@ namespace UAS_MES.Warehouse
 
         private void insertprodiomac(string pa_id, string pa_makecode, string type)
         {
-            sql.Clear();
-            sql.Append("insert into prodiomac(pim_id,pim_prodcode,pim_mac,pim_indate,pim_inman,pim_type,pim_outboxcode,pim_inorout,pim_class) ");
-            sql.Append("select prodiomac_seq.nextval,v_prodcode,v_barcode,sysdate,'" + User.UserCode + "','" + type + "','" + input.Text + "','IN','完工入库'  from mes_package_view where v_outboxcode='" + input.Text + "'");
-            dh.ExecuteSql(sql.GetString(), "update");
-            dh.UpdateByCondition("package", "pa_iostatus=1", "pa_id='" + pa_id + "'");
-            if (type == "BOX")
-            {
-                type = "箱";
-            }
-            else
-                type = "栈板";
-            //dh.UpdateByCondition("makeserial", "ms_iostatus=1", "ms_id in (select max(ms_id)  from makeserial where ms_sncode in (select v_barcode from MES_PACKAGE_VIEW where v_outboxcode = '"+input.Text+"') GROUP BY ms_sncode)");
-            List<string> v_barcode = new List<string>();
-            List<string> v_makecode = new List<string>();
-            DataTable datatable = (DataTable)dh.ExecuteSql("select v_makecode,v_barcode from MES_PACKAGE_VIEW where v_outboxcode = '" + input.Text + "'", "select");
-            for (int i = 0; i < datatable.Rows.Count; i++)
-            {
-                v_barcode.Add(datatable.Rows[i]["v_barcode"].ToString());
-                v_makecode.Add(datatable.Rows[i]["v_makecode"].ToString());
-            }
-            dh.BatchInsert("update makeserial set ms_iostatus=1 where ms_sncode = :v_barcode and ms_makecode = :v_makecode", new string[] { "v_barcode", "v_makecode" }, v_barcode.ToArray(), v_makecode.ToArray());
-            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode, User.UserLineCode, User.UserSourceCode, type + "号" + input.Text + "完工入库", type + "号" + input.Text + "完工入库成功", "", input.Text);
+            //sql.Clear();
+            //sql.Append("insert into prodiomac(pim_id,pim_prodcode,pim_mac,pim_indate,pim_inman,pim_type,pim_outboxcode,pim_inorout,pim_class) ");
+            //sql.Append("select prodiomac_seq.nextval,v_prodcode,v_barcode,sysdate,'" + User.UserCode + "','" + type + "','" + input.Text + "','IN','完工入库'  from mes_package_view where v_outboxcode='" + input.Text + "'");
+            //dh.ExecuteSql(sql.GetString(), "update");
+            //dh.UpdateByCondition("package", "pa_iostatus=1", "pa_id='" + pa_id + "'");
+            //if (type == "BOX")
+            //{
+            //    type = "箱";
+            //}
+            //else
+            //    type = "栈板";
+            ////dh.UpdateByCondition("makeserial", "ms_iostatus=1", "ms_id in (select max(ms_id)  from makeserial where ms_sncode in (select v_barcode from MES_PACKAGE_VIEW where v_outboxcode = '"+input.Text+"') GROUP BY ms_sncode)");
+            //List<string> v_barcode = new List<string>();
+            //List<string> v_makecode = new List<string>();
+            //DataTable datatable = (DataTable)dh.ExecuteSql("select v_makecode,v_barcode from MES_PACKAGE_VIEW where v_outboxcode = '" + input.Text + "'", "select");
+            //for (int i = 0; i < datatable.Rows.Count; i++)
+            //{
+            //    v_barcode.Add(datatable.Rows[i]["v_barcode"].ToString());
+            //    v_makecode.Add(datatable.Rows[i]["v_makecode"].ToString());
+            //}
+            //dh.BatchInsert("update makeserial set ms_iostatus=1 where ms_sncode = :v_barcode and ms_makecode = :v_makecode", new string[] { "v_barcode", "v_makecode" }, v_barcode.ToArray(), v_makecode.ToArray());
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode, User.UserLineCode, User.UserSourceCode, type + "号" + input.Text + "完工入库测试", type + "号" + input.Text + "完工入库测试成功", "", input.Text);
             return;
         }
 
@@ -440,21 +440,21 @@ namespace UAS_MES.Warehouse
 
         private void deleteprodiomac(string pa_id, string pa_makecode, string type)
         {
-            sql.Clear();
-            sql.Append("delete from prodiomac where pim_id in (select pim_id from prodiomac where ");
-            sql.Append(" pim_outboxcode='" + input.Text + "' and pim_type='" + type + "' and pim_inorout='IN' AND pim_class='完工入库' )");
-            dh.ExecuteSql(sql.GetString(), "delete");
-            dh.UpdateByCondition("package", "pa_iostatus=0", "pa_id='" + pa_id + "'");
-            List<string> v_barcode = new List<string>();
-            List<string> v_makecode = new List<string>();
-            DataTable datatable = (DataTable)dh.ExecuteSql("select v_makecode,v_barcode from MES_PACKAGE_VIEW where v_outboxcode = '" + input.Text + "'", "select");
-            for (int i = 0; i < datatable.Rows.Count; i++)
-            {
-                v_barcode.Add(datatable.Rows[i]["v_barcode"].ToString());
-                v_makecode.Add(datatable.Rows[i]["v_makecode"].ToString());
-            }
-            dh.BatchInsert("update makeserial set ms_iostatus=0 where ms_sncode = :v_barcode and ms_makecode = :v_makecode", new string[] { "v_barcode", "v_makecode" }, v_barcode.ToArray(), v_makecode.ToArray());
-            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode, User.UserLineCode, User.UserSourceCode, type + "号" + input.Text + "取消完工入库", type + "号" + input.Text + "取消完工入库成功", "", input.Text);
+            //sql.Clear();
+            //sql.Append("delete from prodiomac where pim_id in (select pim_id from prodiomac where ");
+            //sql.Append(" pim_outboxcode='" + input.Text + "' and pim_type='" + type + "' and pim_inorout='IN' AND pim_class='完工入库' )");
+            //dh.ExecuteSql(sql.GetString(), "delete");
+            //dh.UpdateByCondition("package", "pa_iostatus=0", "pa_id='" + pa_id + "'");
+            //List<string> v_barcode = new List<string>();
+            //List<string> v_makecode = new List<string>();
+            //DataTable datatable = (DataTable)dh.ExecuteSql("select v_makecode,v_barcode from MES_PACKAGE_VIEW where v_outboxcode = '" + input.Text + "'", "select");
+            //for (int i = 0; i < datatable.Rows.Count; i++)
+            //{
+            //    v_barcode.Add(datatable.Rows[i]["v_barcode"].ToString());
+            //    v_makecode.Add(datatable.Rows[i]["v_makecode"].ToString());
+            //}
+            //dh.BatchInsert("update makeserial set ms_iostatus=0 where ms_sncode = :v_barcode and ms_makecode = :v_makecode", new string[] { "v_barcode", "v_makecode" }, v_barcode.ToArray(), v_makecode.ToArray());
+            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode, User.UserLineCode, User.UserSourceCode, type + "号" + input.Text + "取消完工入库测试", type + "号" + input.Text + "取消完工入库测试成功", "", input.Text);
             //dh.UpdateByCondition("makeserial", "ms_iostatus=0", "ms_id in (select max(ms_id)  from makeserial where ms_sncode in (select v_barcode from MES_PACKAGE_VIEW where v_outboxcode = '" + input.Text + "') GROUP BY ms_sncode)");
             return;
         }