Browse Source

称重记录公共方法修改

Hcsy 8 years ago
parent
commit
6fb943152a

+ 3 - 0
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs

@@ -136,11 +136,13 @@ namespace UAS_MES.Make
                         if (ActualWeight >= MinWeight && ActualWeight <= MaxWeight)
                         {
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量合格:" + weight.Text.Trim(), outboxcode.Text, "");
+                            LogicHandler.RecordProdWeight(outboxcode.Text,"CARTON", float.Parse(ActualWeight.ToString()),"kg",User.UserLineCode,pr_code.Text,User.UserSourceCode,User.UserName);
                             OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测合格\n", Color.Green);
                         }
                         else
                         {
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量不合格:" + weight.Text.Trim(), outboxcode.Text, "");
+                            LogicHandler.RecordProdWeight(outboxcode.Text, "CARTON", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
                             OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测未通过\n", Color.Red, outboxcode);
                             return;
                         }
@@ -148,6 +150,7 @@ namespace UAS_MES.Make
                     else
                     {
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量完成:" + weight.Text.Trim(), outboxcode.Text, "");
+                        LogicHandler.RecordProdWeight(outboxcode.Text, "CARTON", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
                     }
                     if (AutoPrint.Checked)
                     {

+ 1 - 1
UAS-MES/PublicMethod/LogicHandler.cs

@@ -1322,7 +1322,7 @@ namespace UAS_MES.PublicMethod
             sql.Append("insert into weightlog(wl_id,wl_type,wl_scancode,wl_weight,wl_unit,wl_linecode,");
             sql.Append("wl_prodcode,wl_sccode,wl_indate,wl_inman) values (weightlog_seq.nextval,:wl_type,:wl_scancode,");
             sql.Append(":wl_weight,:wl_unit,:wl_linecode,:wl_prodcode,:wl_sccode,sysdate,:wl_inman)");
-            dh.BatchInsert(sql.ToString(), new string[] { "wl_type", "wl_scancode", "wl_weight", "wl_unit", "wl_linecode", "wl_prodcode", "wl_sccode", "wl_inman" }, new string[] { iType } , new string[] { iSN } , new float[] { iWeight }, new string[] { iUnit } , new string[] { iLineCode } , new string[] { iPrCode }, iSource, iUser);
+            dh.ExecuteSql(sql.ToString(), "insert", iType  , iSN  , iWeight ,iUnit ,iLineCode  , iPrCode , iSource , iUser);
         }