From 8f4c7b6cf07296ef5f76eb398f583ac2c3e9a1ee Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期三, 15 十二月 2021 13:38:18 +0800
Subject: [PATCH] 工序流转卡模块,保存单据时取消是否在会计期间判断控制,新增条码档案列表批删调用方法

---
 WebAPI/Controllers/LMESController.cs |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index 96979c8..5549c82 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -60,27 +60,32 @@
             try
             {
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-                if (sWhere == null || sWhere.Equals(""))
+                ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere, "h_v_Sc_ProcessExchangeBillQuery");
+                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                 {
-                    ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery", "h_v_Sc_ProcessExchangeBillQuery");
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
                 }
                 else
                 {
-                    string sql1 = "select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 ";
-                    string sql = sql1 + sWhere;
-                    ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillQuery");
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
                 }
-
             }
             catch (Exception e)
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+                objJsonResult.Message = "寮傚父锛�" + e.ToString();
                 objJsonResult.data = null;
                 return objJsonResult;
             }
-            return GetObjectJson(ds);
         }
 
         /// <summary>

--
Gitblit v1.9.1