From d2ada1995c13be096b89e42b68855203c3d22b38 Mon Sep 17 00:00:00 2001
From: 仲国强 <519541279@qq.com>
Date: 星期四, 16 九月 2021 16:52:04 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/Sc_MouldOtherInBillController.cs |  137 +++++++++++++++++++++++++++++++++++++--------
 1 files changed, 113 insertions(+), 24 deletions(-)

diff --git a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs
index a862f37..4b5a1f4 100644
--- a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs
+++ b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs
@@ -13,7 +13,7 @@
     public class Sc_MouldOtherInBillController : ApiController
     {
         private json objJsonResult = new json();
-        public DataSet ds = new DataSet();
+        DataSet ds;
         public WebServer webserver = new WebServer();
         SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
 
@@ -21,35 +21,23 @@
         /// 鏍规嵁鍖呰鍗� 杩斿洖姝ゅ寘瑁呭崟鍐呯殑鐩稿叧淇℃伅
         /// </summary>
         /// <returns></returns>
+        /// 
 
-        /// <summary>
-        /// 妯″叿鍏朵粬鍏ュ簱鍗曞垪琛�
-        /// </summary>
-        /// <returns></returns>
+           #region 妯″叿鍏朵粬鍏ュ簱鍗曞垪琛�
+
         [Route("Sc_MouldOtherInBill/GetMouldOtherInBillList")]
         [HttpGet]
-        public object GetMouldOtherInBillList(string sWhere)
+        public object GetMouldProdOutBill(string sWhere)
         {
             try
             {
 
                 ds = Sc_MouldOtherInBillList_s(sWhere);
-                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;
-                }
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
             }
             catch (Exception ex)
             {
@@ -60,6 +48,107 @@
                 return objJsonResult;
             }
         }
+
+        public static DataSet Sc_GetMouldProdOutBill(string sWhere)
+        {
+            if (sWhere == null || sWhere.Equals(""))
+            {
+                return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldOtherInBillList ", "h_v_Sc_MouldOtherInBillList");
+            }
+            else
+            {
+                string sql1 = "select * from h_v_Sc_MouldOtherInBillList where 1 = 1 ";
+                string sql = sql1 + sWhere;
+                return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldOtherInBillList");
+            }
+
+        }
+        #endregion
+        ///// <summary>
+        ///// 杩斿洖妯″叿鍏朵粬鍏ュ簱鍗曞垪琛�
+        /////鍙傛暟锛歴tring sql銆�
+        /////杩斿洖鍊硷細object銆�
+        ///// </summary>
+        //[Route("Sc_MouldOtherInBill/GetMouldOtherInBillList")]
+        //[HttpGet]
+        //public object list(string sWhere)
+        //{
+        //    try
+        //    {
+        //        if (sWhere == null || sWhere.Equals(""))
+        //        {
+        //            ds = oCN.RunProcReturn("select * from Sc_MouldStockBillMain " + sWhere, "Sc_MouldStockBillMain");
+        //        }
+        //        else
+        //        {
+        //            string sql1 = "select * from Sc_MouldStockBillMain where 1 = 1 ";
+        //            string sql = sql1 + sWhere;
+        //            ds = oCN.RunProcReturn(sql, "Sc_MouldStockBillMain");
+        //        }
+        //        if (ds == null || ds.Tables[0].Rows.Count == 0)
+        //        {
+        //            objJsonResult.code = "0";
+        //            objJsonResult.count = 0;
+        //            objJsonResult.Message = "false锛�";
+        //            objJsonResult.data = null;
+        //            return objJsonResult;
+        //        }
+        //        else
+        //        {
+        //            objJsonResult.code = "1";
+        //            objJsonResult.count = 1;
+        //            objJsonResult.Message = "Sucess锛�";
+        //            objJsonResult.data = ds.Tables[0];
+        //            return objJsonResult;
+        //        }
+        //    }
+        //    catch (Exception e)
+        //    {
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 0;
+        //        objJsonResult.Message = "Exception锛�" + e.ToString();
+        //        objJsonResult.data = null;
+        //        return objJsonResult;
+        //    }
+        //}
+        ///// <summary>
+        ///// 妯″叿鍏朵粬鍏ュ簱鍗曞垪琛�
+        ///// </summary>
+        ///// <returns></returns>
+        //[Route("Sc_MouldOtherInBill/GetMouldOtherInBillList")]
+        //[HttpGet]
+        //public object GetMouldOtherInBillList(string sWhere)
+        //{
+        //    try
+        //    {
+
+        //        ds = Sc_MouldOtherInBillList_s(sWhere);
+        //        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 ex)
+        //    {
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 0;
+        //        objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+        //        objJsonResult.data = null;
+        //        return objJsonResult;
+        //    }
+        //}
 
         #region sql璇彞
 
@@ -181,8 +270,8 @@
                     //
                     if (oMould.DeleteBill(HItemID, ref DBUtility.ClsPub.sExeReturnInfo))
                     {
-                        //鍐欏叆鏃ュ織
-                        ClsPub.Add_Log("", "鍒犻櫎椤圭洰锛屼唬鐮侊細" + oMould.omodel.HNumber + ",鍚嶇О锛�" + oMould.omodel.HName, ClsPub.CurUserName);
+                        ////鍐欏叆鏃ュ織
+                        //ClsPub.Add_Log("", "鍒犻櫎椤圭洰锛屼唬鐮侊細" + oMould.omodel.hn + ",鍚嶇О锛�" + oMould.omodel.HName, ClsPub.CurUserName);
                         //鏇存柊涓婄骇涓� 鏈骇
                         objJsonResult.code = "1";
                         objJsonResult.count = 1;

--
Gitblit v1.9.1