From 6961765d761e4830b563b9689caaef978243acd8 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 13 六月 2022 15:39:27 +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