From 0c8fcf1e070b79dbaf90349ed416523ceea1187e Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期日, 28 九月 2025 09:25:27 +0800
Subject: [PATCH] 四维尔防错:根据plc信号打印条码,打印时增加日志
---
WarM/条码打印/Gy_BarCodeBill_automaticallyByPLC_New.cs | 14 ++++++++++++++
WarM/条码打印/Gy_BarCodeBill_automaticallyByPLC_New_Change.cs | 14 ++++++++++++++
WarM/WarM.csproj | 4 ++++
WarM/条码打印/Gy_BarCodeBill_automaticallyByPLC_New_Change.designer.cs | 1 -
WarM/条码打印/Gy_BarCodeBill_automaticallyByPLC_New.designer.cs | 1 -
5 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/WarM/WarM.csproj b/WarM/WarM.csproj
index c214bba..be3c898 100644
--- a/WarM/WarM.csproj
+++ b/WarM/WarM.csproj
@@ -1330,6 +1330,10 @@
<Project>{0a4ef483-d8d3-49a5-8378-974ef7993365}</Project>
<Name>SQLHelper</Name>
</ProjectReference>
+ <ProjectReference Include="..\WebAPI\WebAPI.csproj">
+ <Project>{5b60ce0c-963c-4dc2-91b3-0b471aac5438}</Project>
+ <Name>WebAPI</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="閲戣澏浠撳簱绠$悊\" />
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 daf7c8f..6e4fbaa 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"
@@ -15,6 +15,8 @@
using System.Management;
using System.Net.NetworkInformation;
using System.Printing;
+using WebAPI;
+using Newtonsoft.Json;
namespace WarM
{
@@ -424,7 +426,11 @@
}
this.Sub_SaveBill();
+ LogService.Write("==============================================================================================");
+ LogService.Write("鑾峰彇鎵撳嵃鍒楄〃銆�" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "銆�");
Display();
+ LogService.Write("鑾峰彇鎵撳嵃鍒楄〃缁撴潫銆�" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "銆�");
+ LogService.Write("==============================================================================================");
if (radioButton_IsPrint_Yes.Checked == true)
{
@@ -1241,7 +1247,11 @@
this.Sub_SaveBill();
//鑾峰彇闇�瑕佹墦鍗扮殑鏁版嵁
+ LogService.Write("==============================================================================================");
+ LogService.Write("鑾峰彇鎵撳嵃鍒楄〃銆�" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "銆�");
Display();
+ LogService.Write("鑾峰彇鎵撳嵃鍒楄〃缁撴潫銆�" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "銆�");
+ LogService.Write("==============================================================================================");
if (radioButton_IsPrint_Yes.Checked == true)
{
@@ -1272,6 +1282,8 @@
//鑾峰彇闇�瑕佹墦鍗扮殑鏁版嵁骞跺瓨鏀惧湪瀛愯〃grdList
private void Display()
{
+ LogService.Write("鎵撳嵃鍒楄〃鎼滅储璇彞锛氥�恠elect * from h_v_IF_BarCodeBillList Where HinterID=" + HInterID.ToString() + " order by HItemID銆�");
+
//璁剧疆妗f鍒楄〃閫夐」鍗¤〃鏍兼暟鎹�
DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList Where HinterID=" + HInterID.ToString() + " order by HItemID", "h_v_IF_BarCodeBillList", ref DBUtility.ClsPub.sExeReturnInfo);
//鐢熸垚棣栬鏍囬
@@ -1288,6 +1300,8 @@
DBUtility.Xt_BaseBillFun.DisplayGrid(grdList, this.Name + "grdList", s, FrCol);
//鐢荤嚎
//GraphLine();
+
+ LogService.Write("鎵撳嵃鍒楄〃鏁版嵁锛氥��" + JsonConvert.SerializeObject(DSet.Tables[0]) + "銆�");
}
//鑾峰彇宸ュ崟褰撳ぉ鐗╂枡鐢熸垚鐨勬潯鐮佽褰�
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New.designer.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New.designer.cs"
index 36b690e..572068e 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New.designer.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New.designer.cs"
@@ -306,7 +306,6 @@
this.bc.Text = "鐢熸垚";
this.bc.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.bc.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
- this.bc.Visible = false;
this.bc.Click += new System.EventHandler(this.bc_Click);
//
// DelRow
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New_Change.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New_Change.cs"
index b132f92..596bb28 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New_Change.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New_Change.cs"
@@ -17,6 +17,8 @@
using System.Printing;
using uPLibrary.Networking.M2Mqtt;
using uPLibrary.Networking.M2Mqtt.Messages;
+using WebAPI;
+using Newtonsoft.Json;
namespace WarM
{
@@ -429,7 +431,11 @@
}
this.Sub_SaveBill();
+ LogService.Write("==============================================================================================");
+ LogService.Write("鑾峰彇鎵撳嵃鍒楄〃銆�" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "銆�");
Display();
+ LogService.Write("鑾峰彇鎵撳嵃鍒楄〃缁撴潫銆�" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "銆�");
+ LogService.Write("==============================================================================================");
if (radioButton_IsPrint_Yes.Checked == true)
{
@@ -1166,7 +1172,11 @@
this.Sub_SaveBill();
//鑾峰彇闇�瑕佹墦鍗扮殑鏁版嵁
+ LogService.Write("==============================================================================================");
+ LogService.Write("鑾峰彇鎵撳嵃鍒楄〃銆�" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "銆�");
Display();
+ LogService.Write("鑾峰彇鎵撳嵃鍒楄〃缁撴潫銆�" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "銆�");
+ LogService.Write("==============================================================================================");
if (radioButton_IsPrint_Yes.Checked == true)
{
@@ -1197,6 +1207,8 @@
//鑾峰彇闇�瑕佹墦鍗扮殑鏁版嵁骞跺瓨鏀惧湪瀛愯〃grdList
private void Display()
{
+ LogService.Write("鎵撳嵃鍒楄〃鎼滅储璇彞锛氥�恠elect * from h_v_IF_BarCodeBillList Where HinterID=" + HInterID.ToString() + " order by HItemID銆�");
+
//璁剧疆妗f鍒楄〃閫夐」鍗¤〃鏍兼暟鎹�
DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList Where HinterID=" + HInterID.ToString() + " order by HItemID", "h_v_IF_BarCodeBillList", ref DBUtility.ClsPub.sExeReturnInfo);
//鐢熸垚棣栬鏍囬
@@ -1213,6 +1225,8 @@
DBUtility.Xt_BaseBillFun.DisplayGrid(grdList, this.Name + "grdList", s, FrCol);
//鐢荤嚎
//GraphLine();
+
+ LogService.Write("鎵撳嵃鍒楄〃鏁版嵁锛氥��" + JsonConvert.SerializeObject(DSet.Tables[0]) + "銆�");
}
//鑾峰彇宸ュ崟褰撳ぉ鐗╂枡鐢熸垚鐨勬潯鐮佽褰�
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New_Change.designer.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New_Change.designer.cs"
index cf91cce..aeaf411 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New_Change.designer.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill_automaticallyByPLC_New_Change.designer.cs"
@@ -315,7 +315,6 @@
this.bc.Text = "鐢熸垚";
this.bc.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.bc.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
- this.bc.Visible = false;
this.bc.Click += new System.EventHandler(this.bc_Click);
//
// DelRow
--
Gitblit v1.9.1