From 738fb0b07c675e8d49e9ba2648b5508c6473a274 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 23 九月 2024 09:56:55 +0800
Subject: [PATCH] 条码自动生成功能:生成按钮增加权限,打印前需要取消当前打印机的打印队列

---
 PayM/bin/x86/Debug/SQLHelper.dll                                       |    0 
 SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt    |    1 +
 PayM/obj/x86/Debug/PayM.csproj.GenerateResource.cache                  |    0 
 PayM/bin/x86/Debug/DAL.dll                                             |    0 
 PayM/obj/x86/Debug/PayM.csproj.ResolveComReference.cache               |    0 
 PayM/bin/x86/Debug/DBUtility.pdb                                       |    0 
 PayM/bin/x86/Debug/Pub_Control.pdb                                     |    0 
 PayM/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache      |    0 
 PayM/obj/x86/Debug/Interop.gregn6Lib.dll                               |    0 
 WarM/条码打印/Gy_BarCodeBill_automaticallyByPLC_New.cs                     |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 PayM/bin/x86/Debug/AxInterop.gregn6Lib.dll                             |    0 
 PayM/bin/x86/Debug/Pub_Class.pdb                                       |    0 
 PayM/obj/x86/Debug/PayM.pdb                                            |    0 
 PayM/bin/x86/Debug/Pub_Control.dll                                     |    0 
 PayM/obj/x86/Debug/PayM.dll                                            |    0 
 WarM/WarM.csproj                                                       |    1 +
 PayM/bin/x86/Debug/Model.dll                                           |    0 
 PayM/bin/x86/Debug/Pub_Class.dll                                       |    0 
 PayM/bin/x86/Debug/SQLHelper.pdb                                       |    0 
 sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb                               |    0 
 PayM/bin/x86/Debug/Interop.gregn6Lib.dll                               |    0 
 sdk_dingding/TopSdk/bin/Debug/TopSdk.dll                               |    0 
 PayM/bin/x86/Debug/Model.pdb                                           |    0 
 PayM/bin/x86/Debug/BLL.dll                                             |    0 
 sdk_dingding/TopSdk/obj/Debug/TopSdk.dll                               |    0 
 PayM/obj/x86/Debug/AxInterop.gregn6Lib.dll                             |    0 
 PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache                 |    0 
 PayM/bin/x86/Debug/BLL.pdb                                             |    0 
 PayM/bin/x86/Debug/DAL.pdb                                             |    0 
 SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache |    0 
 PayM/bin/x86/Debug/PayM.dll                                            |    0 
 sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb                               |    0 
 PayM/bin/x86/Debug/PayM.pdb                                            |    0 
 PayM/bin/x86/Debug/DBUtility.dll                                       |    0 
 34 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/PayM/bin/x86/Debug/AxInterop.gregn6Lib.dll b/PayM/bin/x86/Debug/AxInterop.gregn6Lib.dll
index 170ae76..0d05fac 100644
--- a/PayM/bin/x86/Debug/AxInterop.gregn6Lib.dll
+++ b/PayM/bin/x86/Debug/AxInterop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/BLL.dll b/PayM/bin/x86/Debug/BLL.dll
index 596987b..f1f5f95 100644
--- a/PayM/bin/x86/Debug/BLL.dll
+++ b/PayM/bin/x86/Debug/BLL.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/BLL.pdb b/PayM/bin/x86/Debug/BLL.pdb
index f8aa6b9..5918ab2 100644
--- a/PayM/bin/x86/Debug/BLL.pdb
+++ b/PayM/bin/x86/Debug/BLL.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/DAL.dll b/PayM/bin/x86/Debug/DAL.dll
index b71e170..d7ea9ff 100644
--- a/PayM/bin/x86/Debug/DAL.dll
+++ b/PayM/bin/x86/Debug/DAL.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/DAL.pdb b/PayM/bin/x86/Debug/DAL.pdb
index 082a502..3947ac0 100644
--- a/PayM/bin/x86/Debug/DAL.pdb
+++ b/PayM/bin/x86/Debug/DAL.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/DBUtility.dll b/PayM/bin/x86/Debug/DBUtility.dll
index c759aa1..4c11bc3 100644
--- a/PayM/bin/x86/Debug/DBUtility.dll
+++ b/PayM/bin/x86/Debug/DBUtility.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/DBUtility.pdb b/PayM/bin/x86/Debug/DBUtility.pdb
index fb87bd4..74eb128 100644
--- a/PayM/bin/x86/Debug/DBUtility.pdb
+++ b/PayM/bin/x86/Debug/DBUtility.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/Interop.gregn6Lib.dll b/PayM/bin/x86/Debug/Interop.gregn6Lib.dll
index 4dcdcd2..c07a582 100644
--- a/PayM/bin/x86/Debug/Interop.gregn6Lib.dll
+++ b/PayM/bin/x86/Debug/Interop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/Model.dll b/PayM/bin/x86/Debug/Model.dll
index 69f34d6..fa85edd 100644
--- a/PayM/bin/x86/Debug/Model.dll
+++ b/PayM/bin/x86/Debug/Model.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/Model.pdb b/PayM/bin/x86/Debug/Model.pdb
index 32ca40b..6996dbc 100644
--- a/PayM/bin/x86/Debug/Model.pdb
+++ b/PayM/bin/x86/Debug/Model.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/PayM.dll b/PayM/bin/x86/Debug/PayM.dll
index 1c6d1df..0fcae3a 100644
--- a/PayM/bin/x86/Debug/PayM.dll
+++ b/PayM/bin/x86/Debug/PayM.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/PayM.pdb b/PayM/bin/x86/Debug/PayM.pdb
index 2f04f36..01048e3 100644
--- a/PayM/bin/x86/Debug/PayM.pdb
+++ b/PayM/bin/x86/Debug/PayM.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/Pub_Class.dll b/PayM/bin/x86/Debug/Pub_Class.dll
index cca09bf..8b5503e 100644
--- a/PayM/bin/x86/Debug/Pub_Class.dll
+++ b/PayM/bin/x86/Debug/Pub_Class.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/Pub_Class.pdb b/PayM/bin/x86/Debug/Pub_Class.pdb
index d4859ca..5f5bd65 100644
--- a/PayM/bin/x86/Debug/Pub_Class.pdb
+++ b/PayM/bin/x86/Debug/Pub_Class.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/Pub_Control.dll b/PayM/bin/x86/Debug/Pub_Control.dll
index 2482bf4..70a9e3d 100644
--- a/PayM/bin/x86/Debug/Pub_Control.dll
+++ b/PayM/bin/x86/Debug/Pub_Control.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/Pub_Control.pdb b/PayM/bin/x86/Debug/Pub_Control.pdb
index 8404990..1ada836 100644
--- a/PayM/bin/x86/Debug/Pub_Control.pdb
+++ b/PayM/bin/x86/Debug/Pub_Control.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/SQLHelper.dll b/PayM/bin/x86/Debug/SQLHelper.dll
index ac88659..d7120b6 100644
--- a/PayM/bin/x86/Debug/SQLHelper.dll
+++ b/PayM/bin/x86/Debug/SQLHelper.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/SQLHelper.pdb b/PayM/bin/x86/Debug/SQLHelper.pdb
index c57f334..8924c5d 100644
--- a/PayM/bin/x86/Debug/SQLHelper.pdb
+++ b/PayM/bin/x86/Debug/SQLHelper.pdb
Binary files differ
diff --git a/PayM/obj/x86/Debug/AxInterop.gregn6Lib.dll b/PayM/obj/x86/Debug/AxInterop.gregn6Lib.dll
index 170ae76..0d05fac 100644
--- a/PayM/obj/x86/Debug/AxInterop.gregn6Lib.dll
+++ b/PayM/obj/x86/Debug/AxInterop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/PayM/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index f36af01..e7d2350 100644
--- a/PayM/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+++ b/PayM/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary files differ
diff --git a/PayM/obj/x86/Debug/Interop.gregn6Lib.dll b/PayM/obj/x86/Debug/Interop.gregn6Lib.dll
index 4dcdcd2..c07a582 100644
--- a/PayM/obj/x86/Debug/Interop.gregn6Lib.dll
+++ b/PayM/obj/x86/Debug/Interop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache b/PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache
index 943e49f..25b3ae6 100644
--- a/PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache
+++ b/PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache
Binary files differ
diff --git a/PayM/obj/x86/Debug/PayM.csproj.GenerateResource.cache b/PayM/obj/x86/Debug/PayM.csproj.GenerateResource.cache
index 4b865a8..07e70f2 100644
--- a/PayM/obj/x86/Debug/PayM.csproj.GenerateResource.cache
+++ b/PayM/obj/x86/Debug/PayM.csproj.GenerateResource.cache
Binary files differ
diff --git a/PayM/obj/x86/Debug/PayM.csproj.ResolveComReference.cache b/PayM/obj/x86/Debug/PayM.csproj.ResolveComReference.cache
index f7bed52..95fdb21 100644
--- a/PayM/obj/x86/Debug/PayM.csproj.ResolveComReference.cache
+++ b/PayM/obj/x86/Debug/PayM.csproj.ResolveComReference.cache
Binary files differ
diff --git a/PayM/obj/x86/Debug/PayM.dll b/PayM/obj/x86/Debug/PayM.dll
index 1c6d1df..0fcae3a 100644
--- a/PayM/obj/x86/Debug/PayM.dll
+++ b/PayM/obj/x86/Debug/PayM.dll
Binary files differ
diff --git a/PayM/obj/x86/Debug/PayM.pdb b/PayM/obj/x86/Debug/PayM.pdb
index 2f04f36..01048e3 100644
--- a/PayM/obj/x86/Debug/PayM.pdb
+++ b/PayM/obj/x86/Debug/PayM.pdb
Binary files differ
diff --git a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache
new file mode 100644
index 0000000..b04aad7
--- /dev/null
+++ b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache
Binary files differ
diff --git a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
index b737a82..cd112e2 100644
--- a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
+++ b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
@@ -15,3 +15,4 @@
 D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache
 D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll
 D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb
+D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache
diff --git a/WarM/WarM.csproj b/WarM/WarM.csproj
index 329be51..0bdfff6 100644
--- a/WarM/WarM.csproj
+++ b/WarM/WarM.csproj
@@ -100,6 +100,7 @@
     <Reference Include="System.Drawing" />
     <Reference Include="System.EnterpriseServices" />
     <Reference Include="System.Management" />
+    <Reference Include="System.Printing" />
     <Reference Include="System.Web.Services" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New.cs"
index eeab9df..e9bd5a0 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New.cs"
@@ -14,6 +14,7 @@
 using System.IO;
 using System.Management;
 using System.Net.NetworkInformation;
+using System.Printing;
 
 namespace WarM
 {
@@ -407,6 +408,21 @@
         #region 鐢熸垚鎸夐挳
         private void bc_Click(object sender, EventArgs e)
         {
+            //瀹℃牳鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log_second("Gy_BarCodeBill_automaticallyByPLC_ProduceByHand", 1, false, DBUtility.ClsPub.CurUserName))
+            {
+                MessageBox.Show("鐢熸垚澶辫触锛屾棤鏉冮檺锛�");
+                return;
+            }
+
+            //娓呴櫎鎵撳嵃浠诲姟
+            string msg = "";
+            if (!clearPrinterTask(ref msg))
+            {
+                MessageBox.Show(msg);
+                return;
+            }
+
             this.Sub_SaveBill();
             Display();
 
@@ -1156,9 +1172,43 @@
             return false;
         }
 
+        //娓呴櫎鎸囧畾鎵撳嵃鏈轰换鍔�
+        private bool clearPrinterTask(ref string msg)
+        {
+            try
+            {
+                PrintServer localPrintServer = new LocalPrintServer();
+                PrintQueue pq = localPrintServer.GetPrintQueue(comboBox_PrinterParams.Text.Replace("(榛樿)", "").ToLower());
+                pq.Refresh();
+                PrintJobInfoCollection allPrintJobs = pq.GetPrintJobInfoCollection();
+                foreach (PrintSystemJobInfo printJob in allPrintJobs)
+                {
+                    printJob.Cancel();
+
+                }
+                return true;
+            }
+            catch(Exception ex)
+            {
+                msg = ex.Message;
+                return false;
+            }
+        }
+
         //鏍规嵁閫氳淇℃伅鐢熸垚鏉$爜骞舵墦鍗�
         private void timer2_Tick(object sender, EventArgs e)
         {
+            if (produceQty > 0)
+            {
+                //娓呴櫎鎵撳嵃浠诲姟
+                string msg = "";
+                if (!clearPrinterTask(ref msg))
+                {
+                    MessageBox.Show(msg);
+                    return;
+                }
+            }
+
             for (int i = 0; i < produceQty; i++)
             {
                 //鐢熸垚鏉$爜
diff --git a/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll b/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll
index fd65d3c..2aee8f6 100644
--- a/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll
+++ b/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll
Binary files differ
diff --git a/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb b/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb
index 5114937..2e26809 100644
--- a/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb
+++ b/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll b/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
index fd65d3c..2aee8f6 100644
--- a/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
+++ b/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb b/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
index 5114937..2e26809 100644
--- a/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
+++ b/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
Binary files differ

--
Gitblit v1.9.1