From fcd7bdad6b26e30b0a2baa5fd5001875064f667b Mon Sep 17 00:00:00 2001
From: black-goat-me <226547893@qq.com>
Date: 星期五, 28 四月 2023 17:04:48 +0800
Subject: [PATCH] 物料、物料分类、仓库、部门增加审核、反审核、禁用、反禁用功能。

---
 WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs |   37 +++++++++++++++++++------------------
 1 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs b/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs
index f9c1df9..e9a1e7a 100644
--- a/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_PurchaseReturnController.cs
@@ -35,29 +35,30 @@
 
                 if (sWhere == null || sWhere.Equals(""))
                 {
-                    ds = oCN.RunProcReturn("select * from h_v_Kf_PurchaseReturnList ", "h_v_Kf_PurchaseReturnList");
+                    ds = oCN.RunProcReturn("select * from h_v_Kf_PurchaseReturnList order by hmainid desc", "h_v_Kf_PurchaseReturnList");
                 }
                 else
                 {
-                    string sql = "select * from h_v_Kf_PurchaseReturnList where 1 = 1 " + sWhere;
+                    string sql = "select * from h_v_Kf_PurchaseReturnList where 1 = 1 " + sWhere+ " order by hmainid desc";
                     ds = oCN.RunProcReturn(sql, "h_v_Kf_PurchaseReturnList");
                 }
-                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 = "Sucess锛�";
-                    objJsonResult.data = ds.Tables[0];
-                    return objJsonResult;
-                }
+
+                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+                //{
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+                //}
+                //else
+                //{
+                //objJsonResult.code = "0";
+                //objJsonResult.count = 0;
+                //objJsonResult.Message = "鏃犳暟鎹�";
+                //objJsonResult.data = null;
+                //return objJsonResult;
+                //}
             }
             catch (Exception e)
             {

--
Gitblit v1.9.1