From 88d14b74edc9430c061c10fee97746566ddaf85d Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 23 四月 2024 10:46:50 +0800
Subject: [PATCH] 自动生成条码_PLC:接收Socket通讯并自动生成条码、打印

---
 WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs |   62 ++++++++++++++++++++++++++++---
 1 files changed, 56 insertions(+), 6 deletions(-)

diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
index 3160d31..1910c73 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
@@ -411,13 +411,8 @@
         #endregion
 
 
-
-
-
         #endregion
 
-
-        #region 璁惧鐐规璁板綍鍗昉DA
 
         #region 鏍规嵁璁惧鏉$爜鏌ユ壘璁惧妗f淇℃伅PDA
         [Route("Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown")]
@@ -752,7 +747,62 @@
         }
         #endregion
 
-        #endregion
+        #region 璁惧鐐规閫炬湡棰勮鎶ヨ〃
 
+        [Route("Sb_EquipDotCheckWarning/Report")]
+        [HttpGet]
+        public object Report(string HYear,string HMonth,string HEquipTypeID, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //if (!DBUtility.ClsPub.Security_Log("Gy_EquipFileList", 1, false, user))
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+                if (HYear == null || HYear.Equals("") || HMonth == null || HMonth.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤锛屾湀浠�";
+                    objJsonResult.data = "";
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+                else
+                {
+                    string sql = "exec h_p_Sb_EquipDotCheckWarningReport " + HYear + "," + HMonth + "," + HEquipTypeID;
+                    ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipDotCheckWarningReport");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1