From 95255ca3442f07dee956391309b4f7b8001fc599 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 25 九月 2023 09:19:32 +0800
Subject: [PATCH] 审核,关闭,作废功能,作业指导书

---
 WebAPI/Controllers/基础资料/基础资料/Gy_SOPBillController.cs |   95 +++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 86 insertions(+), 9 deletions(-)

diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillController.cs"
index e6769f8..98ed206 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillController.cs"
@@ -31,15 +31,6 @@
         {
             try
             {
-                //缂栬緫鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log_second("Gy_Material", 1, false, user))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
                 string sql1 = string.Format(@"select * from h_v_Sc_WorkOrderList where 寮�宸ユ爣璁� = 1 and HMainID='" + sWhere + "'");
                
                 ds = oCN.RunProcReturn(sql1, "h_v_Sc_WorkOrderList");
@@ -102,5 +93,91 @@
             }
         }
 
+        /// <summary>
+        /// 杩斿洖褰撳墠鐢熶骇璧勬簮鐢熶骇鐘舵�佷笅鐨勫伐鍗曞垪琛�
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Sc_ICMOBill/list2")]
+        [HttpGet]
+        public object list2(string HSourceID, string user,string HMainID)
+        {
+            try
+            {
+                var sWhere = "";
+                if (Convert.ToInt32(HMainID) != 0 && HMainID.ToString() != "")
+                {
+                    sWhere += " and HMainID = " + HMainID;
+                }
+                string sql1 = string.Format(@"select * from h_v_Sc_ICMOBillList_ToSop where 鐘舵�� = '寮�宸�' and HSourceID='" + HSourceID + "'" + sWhere);
+
+                ds = oCN.RunProcReturn(sql1, "h_v_Sc_ICMOBillList_ToSop");
+
+
+                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>
+        /// 杩斿洖鐢熶骇宸ヤ綅鍒楄〃淇℃伅
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Gy_SourceWorkStationSet_ToSop/Soplist")]
+        [HttpGet]
+        public object Soplist(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+               
+                string sql1 = string.Format(@"select * from h_v_Gy_SourceWorkStationSetList where 1 = 1");
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_Gy_SourceWorkStationSetList");
+                }
+                else
+                {
+                    string sql = sql1 + sWhere + " order by HItemID ";
+                    ds = oCN.RunProcReturn(sql, "h_v_Gy_SourceWorkStationSetList");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1