Bladeren bron

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

Hcsy 8 jaren geleden
bovenliggende
commit
ee2cc572d2

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

@@ -222,7 +222,7 @@ namespace UAS_MES.Make
             if (PrintLabel.Items.Count != 0)
             {
                 OperateResult.AppendText(">>打印箱号" + bigoutboxcode.Text + "\n", Color.Black);
-                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                Print.CodeSoft(Tag.ToString(),lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
             }
             else
                 OperateResult.AppendText(">>产品" + pa_prodcode.Text + "未维护打印标签\n", Color.Red);

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

@@ -145,7 +145,7 @@ namespace UAS_MES.Make
                     {
                         try
                         {
-                            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                            Print.CodeSoft(Tag.ToString(),lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                             dh.ExecuteSql("update package set pa_printcount= pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                             printcount++;
                             weightsum.Text = printcount + "";

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

@@ -130,7 +130,7 @@ namespace UAS_MES.Make
                     {
                         if (AutoPrint.Checked)
                         {
-                            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                            Print.CodeSoft(Tag.ToString(),lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                         }
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserSourceCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "卡通箱称重", "称量合格", outboxcode.Text, "");
                         OperateResult.AppendText(">>箱号" + outboxcode.Text + "检测合格\n", Color.Green);
@@ -185,7 +185,7 @@ namespace UAS_MES.Make
         //确认打印
         private void Confirm_Click(object sender, EventArgs e)
         {
-            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+            Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
         }
 
         //停止进程,关闭串口

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

@@ -226,7 +226,7 @@ namespace UAS_MES.Make
                                 //更新至下一步工序
                                 if (LogicHandler.SetStepResult(oMakeCode, User.UserSourceCode, sncode.Text, "彩盒打印", "彩盒打印成功", User.UserCode, out ErrorMessage2))
                                 {
-                                    Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                                    Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                                     //提示用户打印成功
                                     OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);
                                     LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,ma_code.Text,User.UserLineCode,User.UserSourceCode,"彩盒打印","彩盒打印成功",sncode.Text,"");

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

@@ -189,7 +189,7 @@ namespace UAS_MES.Make
                             sql.Append("where ma_code='" + ma_code + "'and sp_id=" + sp_id + " and mcd_stepcode = '" + User.CurrentStepCode + "' and ms_sncode='" + ms_sncode.Text + "'");
                             dh.BatchInsert(sql.GetString(), new string[] { "soncode", "barcode" }, CollectDataSonCode.ToArray(), CollectData.ToArray());
                             OperateResult.AppendText(">>序列号" + ms_sncode.Text + "对应的工单已经采集完成\n", Color.Green);
-                            Print.CodeSoft(lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ms_sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                            Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, ms_sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                             RemainIndex = 0;
                             CollectData.Clear();
                             CollectDataSonCode.Clear();

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

@@ -222,7 +222,7 @@ namespace UAS_MES.Make
         {
             if (PrintLabel.Items.Count != 0)
             {
-                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
             }
             else
             {

+ 3 - 1
UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -141,9 +141,11 @@ namespace UAS_MES.Make
                                 return;
                             }
                             //按照打印张数打印
-                            Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                            Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                             //提示用户打印成功
                             OperateResult.AppendText(">>序列号:" + sncode.Text + "打印成功\n", Color.Green);
+                            //记录日志
+                            LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,oMakeCode,User.UserLineCode,User.UserSourceCode, "机身标打印","机身标打印成功", sncode.Text,"");
                             //更新打印的数据
                             LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sncode.Text, "机身标打印", "机身标打印成功", User.UserCode, out oErrorMessage);
                             //清空输入框的值,聚焦

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

@@ -245,7 +245,7 @@ namespace UAS_MES.Make
                                     if (PrintLabel.Items.Count != 0)
                                     {
                                         OperateResult.AppendText(">>打印序列号" + sn_code.Text + "\n", Color.Black);
-                                        Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sn_code.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                                        Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, sn_code.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                                         dh.UpdateByCondition("makeserial", "ms_printcount=nvl(ms_printcount,0)+1", "ms_sncode='" + sn_code.Text + "'");
                                     }
                                     else OperateResult.AppendText(">>" + pr_code.Text + "未维护标签\n", Color.Black);

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_LabelCheck.cs

@@ -147,6 +147,8 @@ namespace UAS_MES.Make
                                     BaseUtil.SetFormValue(Controls, dt);
                                     //将SN,时间,结果记录在页面
                                     recordResult(SN, DateTime.Now.ToString(), "成功");
+                                    //记录日志
+                                    LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,ma_code.Text,User.UserLineCode,User.UserSourceCode,"标签核对","标签核对成功",SN,"");
                                     //IMEI核对成功
                                     //>> 请输入SN
                                     OperateResult.AppendText("<<IMEI核对成功\n", Color.Green);

+ 6 - 3
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -126,6 +126,7 @@ namespace UAS_MES.Make
                 {
                     LoadCheckQTY();
                     OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "采集成功", sn_code.Text, "");
                     //满箱更新状态为1
                     if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) + 1 == int.Parse(pr_outboxinnerqty.Text))
                     {
@@ -148,7 +149,7 @@ namespace UAS_MES.Make
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                     OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Green);
-                    Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                    Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                 }
                 else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "尚未封箱,请封箱后执行打印\n", Color.Red);
             }
@@ -294,6 +295,7 @@ namespace UAS_MES.Make
                                         dh.UpdateByCondition("Package", "pa_packageqty=pa_packageqty-1,pa_currentqty=pa_currentqty-1", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                                         //清除序列号箱号
                                         dh.UpdateByCondition("makeserial", "ms_outboxcode=''", "ms_id='" + oMsID + "'");
+                                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "取消采集成功", sn_code.Text, "");
                                         OperateResult.AppendText(">>已从该箱中移除序列号" + sn_code.Text + "\n", Color.Green);
                                         LoadGridData();
                                     }
@@ -306,7 +308,7 @@ namespace UAS_MES.Make
                     }
                     else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
                 }
-                else OperateResult.AppendText(">>"+ErrorMessage+"\n", Color.Red);
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
             }
         }
 
@@ -346,6 +348,7 @@ namespace UAS_MES.Make
             {
                 dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                 pa_status.Text = "1";
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "封箱成功", pa_outboxcode.Text, "");
                 OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "封箱成功\n", Color.Green);
             }
             else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "错误或者已封箱\n", Color.Red);
@@ -365,7 +368,7 @@ namespace UAS_MES.Make
                 OperateResult.AppendText(">>批次" + ob_checkno.Text + "送检成功\n", Color.Green);
                 LogicHandler.InsertMakeProcess(sn_code.Text, oMakeCode, User.UserSourceCode, "手动送检", "手动送检成功", User.UserCode);
                 //记录操作日志
-                LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "手动送检", "手动送检成功", "", ob_checkno.Text);
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "手动送检", "手动送检成功", "", ob_checkno.Text);
                 ob_checkno.Text = "";
             }
             else OperateResult.AppendText(">>必须封箱才能送检\n", Color.Red);

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

@@ -228,7 +228,7 @@ namespace UAS_MES.Make
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                     OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Green);
-                    Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                    Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
                 }
                 else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "尚未封箱,请封箱后执行打印\n", Color.Red);
             }

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

@@ -206,7 +206,7 @@ namespace UAS_MES.Make
             if (PrintLabel.Items.Count != 0)
             {
                 OperateResult.AppendText(">>打印箱号" + palletcode.Text + "\n", Color.Black);
-                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
+                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), indate[PrintLabel.SelectedIndex]);
             }
             else
                 OperateResult.AppendText(">>产品" + pa_prodcode.Text + "未维护打印标签\n", Color.Red);

+ 3 - 1
UAS-MES/FunctionCode/Make/Make_PalletWeigh.cs

@@ -142,6 +142,8 @@ namespace UAS_MES.Make
                         dh.ExecuteSql(sql.GetString(), "insert", pa_makecode.Text, info.Rows[0]["ma_id"].ToString(), User.CurrentStepCode, User.CurrentStepName, "称重成功,栈板号:" + palletcode.Text + ",重量:" + weight.Text + "克", User.UserName, info.Rows[0]["ma_wccode"].ToString(), User.UserLineCode, User.UserSourceCode, palletcode.Text);
                         //提示信息栏显示:<< 栈板号:XXXX,重量:xxxx 克,
                         OperateResult.AppendText("<<栈板号:" + palletcode.Text + ",重量:" + weight.Text + "克\n", Color.Green);
+                        //记录日志
+                        LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,pa_makecode.Text,User.UserLineCode,User.UserSourceCode,"栈板称重","重量:" + weight.Text+"克\n",palletcode.Text,"");
                         //刷新称重计数+1
                         weightedNum.Text = int.Parse(weightedNum.Text) + 1 + "";
                         recordResult(palletcode.Text, weight.Text, System.DateTime.Now.ToString());
@@ -156,7 +158,7 @@ namespace UAS_MES.Make
                                     palletcode.Text = "";
                                     return;
                                 }
-                                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
+                                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, palletcode.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
                             }
                             catch (Exception ex)
                             {

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

@@ -243,7 +243,7 @@ namespace UAS_MES.Make
                 //判定通过进行打印
                 //按照打印张数打印
                 OperateResult.AppendText("<<打印成功\n", Color.Green);
-                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
+                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
                 //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
                 LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode, "", User.UserLineCode, User.UserSourceCode, giftBox.Checked?"彩盒标补打印":"机身标补打印", "补打印成功", inputValue.Text, "");
                 //如果ms_downstatus<>0,则更新ms_downstatus=-1 where ms_id=?id,同时插入记录至表 MAKEDOWN
@@ -266,7 +266,7 @@ namespace UAS_MES.Make
                 }
                 //判断通过,打印
                 OperateResult.AppendText("<<打印成功\n", Color.Green);
-                Print.CodeSoft(lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
+                Print.CodeSoft(Tag.ToString(), lbl, PrintLabel.Text.Split(':')[1], PrintLabel.SelectedValue.ToString(), Printer.Text, inputValue.Text, int.Parse(printNum.Text), indate[PrintLabel.SelectedIndex]);
                 //打印成功,记录日志commandlog , cl_operate彩盒或者机身标补打印,cl_result补打印成功
                 //LogicHandler.DoCommandLog(User.UserCode, "", User.UserLineCode, User.UserSourceCode, "卡通箱标签补打印,箱号:"+ inputValue.Text, "补打印成功","", "");
                 sql.Clear();

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -429,6 +429,8 @@ namespace UAS_MES.Make
                         OperateResult.AppendText(">>序列号转换成功\n>>关联采集成功\n", Color.Green);
                         //写入日志
                         LogManager.DoLog("修改序列号:" + TSN + "为" + SN + "成功!" + "操作人:" + User.UserCode);
+                        //记录日志
+                        LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,oMakecode,User.UserLineCode,User.UserSourceCode,"序列烧录转换","转换成功",SN,"");
                         //完成该道工序 setFinish
                         LogicHandler.SetStepResult( ms_macode.Text, User.UserSourceCode, SN, "序列烧录转换", "序列烧录转换成功", User.UserCode, out errorMessage);
 

+ 2 - 0
UAS-MES/FunctionCode/Make/Make_SeqTransform.cs

@@ -214,6 +214,8 @@ namespace UAS_MES.Make
                                     OperateResult.AppendText(">>转换成功\n", Color.Green);
                                     //写入日志
                                     LogicHandler.SetStepResult( ma_code.Text, User.UserSourceCode, sncode.Text, "序列转换", "序列转换成功", User.UserCode, out errorMessage);
+                                    //记录日志
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "序列转换", "转换成功", bsncode, "");
                                     LogManager.DoLog("修改序列号:" + bsncode + "为" + sncode.Text + "成功!" + "操作人:" + User.UserCode);
                                     OperateResult.AppendText(">>请输入转换前的序列号\n", Color.Black);
                                     //置空

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

@@ -462,13 +462,13 @@ namespace UAS_MES.PublicMethod
                 return false;
         }
 
-        public static void DoCommandLog(string iCaller,string iUserCode, string iMakeCode, string iLineCode, string iSourceCode, string iOperate, string iResult, string iSncode, string iCheckno)
+        public static void DoCommandLog(string iCaller, string iUserCode, string iMakeCode, string iLineCode, string iSourceCode, string iOperate, string iResult, string iSncode, string iCheckno)
         {
             sql.Clear();
-            sql.Append("insert into commandlog(cl_id,:cl_caller,cl_man,cl_date,cl_linecode,cl_sourcecode,cl_makecode,cl_operate,");
-            sql.Append("cl_result,cl_sncode,cl_code) select commandlog_seq.nextval,:iUserCode,sysdate,:iLineCode ,");
-            sql.Append(":iSourceCode ,ms_makecode,:iOperate,:iResult,:iSncode,ms_checkno from makeserial where ms_sncode=:iSncode");
-            dh.ExecuteSql(sql.ToString(), "insert", iCaller, iUserCode, iLineCode, iSourceCode, iOperate, iResult, iSncode, iSncode);
+            sql.Append("insert into commandlog(cl_id,cl_caller,cl_man,cl_date,cl_linecode,cl_sourcecode,cl_makecode,cl_operate,");
+            sql.Append("cl_result,cl_sncode,cl_code) values( commandlog_seq.nextval,:cl_caller,:iUserCode,sysdate,:iLineCode ,");
+            sql.Append(":iSourceCode ,:iMakeCode,:iOperate,:iResult,:iSncode,:iCheckno)");
+            dh.ExecuteSql(sql.ToString(), "insert", iCaller, iUserCode, iLineCode, iSourceCode, iMakeCode, iOperate, iResult, iSncode, iCheckno);
         }
 
         /// <summary>
@@ -1359,7 +1359,7 @@ namespace UAS_MES.PublicMethod
                         if (dt.Rows[0]["ms_downstatus"].ToString() != "0")
                         {
                             ErrMessage = "序列号:" + iSonCode + "已下地,请先取消下地";
-                            return false ;
+                            return false;
                         }
                         if (dt.Rows[0]["ms_nextmacode"].ToString() != "")
                         {

+ 4 - 3
UAS-MES/PublicMethod/Print.cs

@@ -3,6 +3,7 @@ using LabelManager2;
 using System.Data;
 using System.Text;
 using System.IO;
+using UAS_MES.Entity;
 
 namespace UAS_MES.PublicMethod
 {
@@ -22,7 +23,7 @@ namespace UAS_MES.PublicMethod
         /// </summary>
         /// <param name="Url"></param>
         /// <param name="LabelCode"></param>
-        public static void CodeSoft(ApplicationClass lbl, string LabelName, string LabelCode, string PrinterName, string SnCode,int PrintNum,System.DateTime intime)
+        public static void CodeSoft(string iCaller, ApplicationClass lbl, string LabelName, string LabelCode, string PrinterName, string SnCode, int PrintNum, System.DateTime intime)
         {
             //打开模板路径
             doc = lbl.Documents.Open(ftpOperater.DownLoadTo + LabelName);
@@ -39,7 +40,7 @@ namespace UAS_MES.PublicMethod
                         string sql = dt.Rows[j]["lp_sql"].ToString();
                         sql = sql.Substring(0, sql.IndexOf("{")) + "'" + SnCode + "'";
                         doc.Variables.FormVariables.Item(i + 1).Value = dh.GetLabelParam(sql).ToString();
-                        sb.AppendLine("打印参数【" + doc.Variables.FormVariables.Item(i + 1).Name + "】赋值," + "取值SQL:" + sql  + ",取到值" + doc.Variables.FormVariables.Item(i + 1).Value);
+                        sb.AppendLine("打印参数【" + doc.Variables.FormVariables.Item(i + 1).Name + "】赋值," + "取值SQL:" + sql + ",取到值" + doc.Variables.FormVariables.Item(i + 1).Value);
                     }
                 }
             }
@@ -49,10 +50,10 @@ namespace UAS_MES.PublicMethod
             doc.Printer.SwitchTo(PrinterName);
             doc.PrintDocument(PrintNum);
             doc.Close();
+            LogicHandler.DoCommandLog(iCaller, User.UserCode, "", User.UserLineCode, User.UserSourceCode, "打印", "成功打印", SnCode, "");
             //讲文件最后写入时间改成数据库中拿到的时间
             info = new FileInfo(ftpOperater.DownLoadTo + LabelName);
             info.LastWriteTime = intime;
-            
         }
 
         public static void CodeSoft(ApplicationClass lbl, string LabelName, string LabelCode, string PrinterName, string SnCode)