From 3004bd5c7daa7d85ed691818ab96bde207aeeedc Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期一, 05 十二月 2022 16:45:26 +0800
Subject: [PATCH] Sop文件接口修改

---
 VueWebApi/DLL/DAL/ProductionManagementDAL.cs |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/VueWebApi/DLL/DAL/ProductionManagementDAL.cs b/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
index 9bcf340..7fffab8 100644
--- a/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
+++ b/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
@@ -776,6 +776,40 @@
         }
         #endregion
 
+        #region[MES宸ュ崟宸ュ簭浠诲姟鏌ョ湅SOP,鑾峰彇SOP鏂囦欢涓嬫媺鍒楄〃]
+        public static ToMessage SearchWorkStepSopList(string partcode, string routecode,string stepcode)
+        {
+            string sql = "";
+            var dynamicParams = new DynamicParameters();
+            try
+            {
+                //鑾峰彇SOP鏂囦欢淇℃伅
+                sql = @"select id,define_name,file_path   from TK_Sop_Matfile where materiel_code=@partcode and eqptype_code in(
+                        select distinct T.code  from TMateriel_Route A
+                        inner join TFlw_Rtdt B on A.route_code=B.rout_code
+                        inner join TFlw_Rteqp E on B.step_code=E.step_code
+                        inner join TEqpInfo  Q on E.eqp_code=Q.code
+                        inner join TEqpType T on Q.eqptype_code=T.code
+                        where A.materiel_code=@partcode and A.route_code=@routecode and B.step_code=@stepcode)";
+                dynamicParams.Add("@partcode", partcode);
+                dynamicParams.Add("@routecode", routecode);
+                dynamicParams.Add("@stepcode", stepcode);
+                var data = DapperHelper.selectdata(sql, dynamicParams);
+                mes.code = "200";
+                mes.Message = "鏌ヨ鎴愬姛!";
+                mes.data = data;
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.count = 0;
+                mes.Message = e.Message;
+                mes.data = null;
+            }
+            return mes;
+        }
+        #endregion
+
 
 
         #region[鐢熶骇寮�鎶ュ伐鎵爜鑾峰彇宸ュ崟瀵瑰簲宸ュ簭浠诲姟(鑷埗)]

--
Gitblit v1.9.3