From bfa8577d2db5d4b2bd34a650c340c0b5b8125045 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期一, 05 九月 2022 14:50:50 +0800
Subject: [PATCH] 工序流转卡(汇报)

---
 WebAPI/Controllers/LMESController.cs |   69 ++++++++++++++++++++++++++++++++++
 1 files changed, 68 insertions(+), 1 deletions(-)

diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index 89db549..b74aeeb 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -128,6 +128,73 @@
         }
 
         /// <summary>
+        /// 杩斿洖宸ュ簭娴佽浆鍗★紙涓嬭揪锛夊垪琛�
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+
+        [Route("LEMS/MES_Sc_ProcessExchangeIssueBillList_Json")]
+        [HttpGet]
+        public object MES_Sc_ProcessExchangeIssueBillList_Json(string sWhere, string user)
+        {
+            DataSet ds;
+            try
+            {
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeIssueBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeIssueBillQuery");
+                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 = "寮傚父锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        /// <summary>
+        /// 涓嬭揪
+        /// </summary>
+        /// <returns></returns>
+        [Route("LEMS/MES_Sc_ProcessExchangeIssue")]
+        [HttpGet]
+        public object MES_Sc_ProcessExchangeIssue(string HGroupID, string HSourceID, string HEntryId) {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                ds = oCN.RunProcReturn($"exec REALESE_Sc_ProcessExchangeIssue '{HGroupID}','{HSourceID}','{HEntryId}' ", "REALESE_Sc_ProcessExchangeIssue");
+                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 = "寮傚父锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        /// <summary>
         /// 杩斿洖宸ュ簭鍑虹珯姹囨姤鍗曞垪琛�
         ///鍙傛暟锛歴tring sql銆�
         ///杩斿洖鍊硷細object銆�
@@ -389,7 +456,7 @@
                     return objJsonResult;
                 }
 
-                ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 1 = 1 " + sWhere + " order by HEntryID", "h_v_IF_ICMOBillList");
+                ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 1 = 1 " + sWhere + " order by 鍗曟嵁鍙� desc", "h_v_IF_ICMOBillList");
             }
             catch (Exception e)
             {

--
Gitblit v1.9.1