From 4fc8ed6e9749869833ac07f00904955961cd6e70 Mon Sep 17 00:00:00 2001
From: jhz <jinghz@oceic.com>
Date: 星期四, 01 九月 2022 09:11:05 +0800
Subject: [PATCH] 2

---
 WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs |   49 ++++++++++++++++++++++++++++++-------------------
 1 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
index 867097a..bd3e253 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
@@ -82,30 +82,31 @@
 
                 if (sWhere == null || sWhere.Equals(""))
                 {
-                    ds = oCN.RunProcReturn("select * from h_v_IF_SeOutStockBillList " + sWhere, "h_v_IF_SeOutStockBillList");
+                    ds = oCN.RunProcReturn("select * from h_v_IF_SeOutStockBillList order by hmainid desc", "h_v_IF_SeOutStockBillList");
                 }
                 else
                 {
                     string sql1 = "select * from h_v_IF_SeOutStockBillList where 1 = 1 ";
-                    string sql = sql1 + sWhere;
+                    string sql = sql1 + sWhere+ " order by hmainid desc";
                     ds = oCN.RunProcReturn(sql, "h_v_IF_SeOutStockBillList");
                 }
-                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)
             {
@@ -122,10 +123,20 @@
         /// <returns></returns>
         [Route("Xs_SeOutStockBill/DeltetSeOutStockBill")]
         [HttpGet]
-        public object DeltetSeOutStockBill(string HInterID)
+        public object DeltetSeOutStockBill(string HInterID,string user)
         {
             try
             {
+                //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Xs_SeOutStockBill_Drop", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愬垹闄�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 oCN.BeginTran();
                 oCN.RunProc("Delete From Xs_SeOutStockBillMain where HInterID = " + HInterID);
                 oCN.RunProc("Delete From Xs_SeOutStockBillSub where HInterID = " + HInterID);

--
Gitblit v1.9.1