From 6fe3d6fc4e93f4cf31dc02d4f0cbc48d56c249b7 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期五, 30 六月 2023 13:35:23 +0800
Subject: [PATCH] 多车间模式接口过滤

---
 VueWebApi/Controllers/ProductionManagementController.cs |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/VueWebApi/Controllers/ProductionManagementController.cs b/VueWebApi/Controllers/ProductionManagementController.cs
index 382a4fe..b3f861c 100644
--- a/VueWebApi/Controllers/ProductionManagementController.cs
+++ b/VueWebApi/Controllers/ProductionManagementController.cs
@@ -17,7 +17,7 @@
 {
     [RoutePrefix(prefix: "api/ProductionManagement")]
     [ControllerGroup("鐢熶骇绠$悊", "鍦ㄧ嚎鎺ュ彛")]
-    [ChannelActionFilter]
+    //[ChannelActionFilter]
     public class ProductionManagementController : ApiController
     {
         //瀹氫箟鍏ㄥ眬淇℃伅杩斿洖鍙橀噺
@@ -470,12 +470,13 @@
         /// <param name="OperType">鎿嶄綔绫诲瀷锛氳嚜鍒�(ZZ)/澶栧崗(WX)</param>
         /// <param name="SelectType">鎿嶄綔绫诲瀷锛氬鍗忓彂鏂欐爣璇�(OUT)/澶栧崗鏀舵枡鏍囪瘑(IN)</param>
         /// <param name="orderstepqrcode">鎵弿浜岀淮鐮佷俊鎭�</param>
+        /// <param name="stu_torgcode">鎵�灞炵粍缁囩紪鐮�</param>
         /// <returns></returns>
         [Route(template: "MesOrderStepStart")]
         [HttpGet]
-        public HttpResponseMessage MesOrderStepStart(string OperType, string orderstepqrcode, string SelectType = null)
+        public HttpResponseMessage MesOrderStepStart(string OperType,string stu_torgcode, string orderstepqrcode, string SelectType = null)
         {
-            mes = ProductionManagementBLL.MesOrderStepStart(OperType, SelectType, orderstepqrcode);
+            mes = ProductionManagementBLL.MesOrderStepStart(OperType, stu_torgcode, SelectType, orderstepqrcode);
             return TJson.toJson(mes);
         }
         #endregion
@@ -522,7 +523,8 @@
         [HttpGet]
         public HttpResponseMessage MesOrderGroupSelectUser(string usergroupcode)
         {
-            mes = ProductionManagementBLL.MesOrderGroupSelectUser(usergroupcode);
+            var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+            mes = ProductionManagementBLL.MesOrderGroupSelectUser(stu_torgcode,usergroupcode);
             return TJson.toJson(mes);
         }
         #endregion
@@ -699,14 +701,15 @@
         /// <summary>
         /// 宸ュ簭妫�楠屾壂鐮佽幏鍙栦换鍔′俊鎭�
         /// </summary>
+        /// <param name="stu_torgcode">鎵�灞炵粍缁囩紪鐮�</param>
         /// <param name="orderstepqrcode">鎵弿宸ュ簭浜岀淮鐮佷俊鎭�</param>
         /// <param name="checktype">妫�楠屾柟寮廎irstCheck锛堥妫�锛� PatroCheck(宸℃)  EndCheck(瀹屽伐妫�)</param>
         /// <returns></returns>
         [Route(template: "MesOrderStepCheckSearch")]
         [HttpGet]
-        public HttpResponseMessage MesOrderStepCheckSearch(string orderstepqrcode, string checktype)
+        public HttpResponseMessage MesOrderStepCheckSearch(string stu_torgcode, string orderstepqrcode, string checktype)
         {
-            mes = ProductionManagementBLL.MesOrderStepCheckSearch(orderstepqrcode, checktype);
+            mes = ProductionManagementBLL.MesOrderStepCheckSearch(stu_torgcode,orderstepqrcode, checktype);
             return TJson.toJson(mes);
         }
         #endregion
@@ -735,6 +738,7 @@
         [HttpPost]
         public HttpResponseMessage SaveMesOrderStepCheckItem([FromBody] JObject obj)
         {
+            string stu_torgcode = obj["stu_torgcode"].ToString(); //鎵�灞炵粍缁囩紪鍙�
             string wocode = obj["wocode"].ToString(); //宸ュ崟缂栧彿
             string partcode = obj["partcode"].ToString(); //浜у搧缂栫爜
             string stepcode = obj["stepcode"].ToString(); //宸ュ簭缂栫爜
@@ -748,7 +752,7 @@
             string ngqty = obj["ngqty"].ToString();//涓嶅悎鏍兼暟閲�
             string checkitemcont = obj["checkitemcont"].ToString(); //妫�楠岄」鐩暟鎹�
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
-            mes = ProductionManagementBLL.SaveMesOrderStepCheckItem(wocode, partcode, stepcode, checkstandcode, check_type, sampmethod, qualitystatus, labqty, sampleqty, goodqty, ngqty, checkitemcont, username);
+            mes = ProductionManagementBLL.SaveMesOrderStepCheckItem(stu_torgcode,wocode, partcode, stepcode, checkstandcode, check_type, sampmethod, qualitystatus, labqty, sampleqty, goodqty, ngqty, checkitemcont, username);
             return TJson.toJson(mes);
         }
         #endregion

--
Gitblit v1.9.3