From f782426e6efdc4a2e2439ca542f89a67f73de9ad Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 05 十二月 2025 09:08:37 +0800
Subject: [PATCH] 小卫香囊标签生成,蓝牙测试数据对接;根据检验方案主内码获取检验项目,注释方案为0判断

---
 WebAPI/Controllers/BaseSet/Gy_MaterialController.cs |   47 ++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 64dca09..5e293cd 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -1808,12 +1808,12 @@
                 }
                 if (sWhere == null || sWhere.Equals(""))
                 {
-                    ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere + "order by 鏃ユ湡 desc", "h_v_Gy_MouldFileList");
+                    ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere + "order by 鏉$爜缂栧彿 desc", "h_v_Gy_MouldFileList");
                 }
                 else
                 {
                     string sql1 = "select * from h_v_Gy_MouldFileList where 1 = 1 ";
-                    string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
+                    string sql = sql1 + sWhere + "order by 鏉$爜缂栧彿 desc";
                     ds = oCN.RunProcReturn(sql, "h_v_Gy_MouldFileList");
                 }
 
@@ -4905,11 +4905,23 @@
             try
             {
                 ds = oCN.RunProcReturn($"select * from Gy_BarCodeBill where HBarCode='{HbarCode}' ", "Gy_Material");
-                objJsonResult.code = "0";
-                objJsonResult.count = 1;
-                objJsonResult.Message = "鎴愬姛";
-                objJsonResult.data = ds.Tables[0];
-                return objJsonResult;
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏌ユ壘澶辫触锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+                
             }
             catch (Exception)
             {
@@ -4921,5 +4933,26 @@
                 return objJsonResult;
             }
         }
+
+
+        [Route("Gy_BarCodeBillList/GetBarCodeBillPermission")]
+        [HttpGet]
+        public object GetBarCodeBillPermission(string user)
+        {
+            if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBillList_Print", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+                objJsonResult.data = 0;
+                return objJsonResult;
+            }
+            else
+            {
+                objJsonResult.data = 1;
+                return objJsonResult;
+            }
+                
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1