From 5b4fb9c56426b5096555560a44dd365b02853ad4 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期六, 17 六月 2023 13:14:54 +0800
Subject: [PATCH] 代码加组织过滤

---
 VueWebApi/Controllers/QualityManagementController.cs |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/VueWebApi/Controllers/QualityManagementController.cs b/VueWebApi/Controllers/QualityManagementController.cs
index 9b7e4fe..81b6add 100644
--- a/VueWebApi/Controllers/QualityManagementController.cs
+++ b/VueWebApi/Controllers/QualityManagementController.cs
@@ -124,12 +124,13 @@
         /// <summary>
         /// 宸ュ簭妫�楠屾爣鍑嗘柊澧炪�佺紪杈戣幏鍙栨楠岄」鐩笅鎷夊垪琛�
         /// </summary>
+        /// <param name="WorkShop">杞﹂棿缂栫爜</param>
         /// <returns></returns>
         [Route(template: "StepCheckItemSelect")]
         [HttpGet]
-        public HttpResponseMessage StepCheckItemSelect()
+        public HttpResponseMessage StepCheckItemSelect(string WorkShop)
         {
-           mes = QualityManagementBLL.StepCheckItemSelect();
+           mes = QualityManagementBLL.StepCheckItemSelect(WorkShop);
            return TJson.toJson(mes);
         }
         #endregion
@@ -184,9 +185,11 @@
         [HttpGet]
         public HttpResponseMessage StepCheckItemSearch(string itemcode = null, string itemname = null, string itemdescr = null, int page = 0, int rows = 0, string prop = null, string order = null)
         {
+            var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+            var stu_torgtypecode = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
             int startNum = rows * (page - 1) + 1;  //璧峰璁板綍rowNum
             int endNum = rows * page;   //缁撴潫璁板綍 rowNum
-            mes = QualityManagementBLL.StepCheckItemSearch(itemcode, itemname, itemdescr, startNum, endNum, prop, order);
+            mes = QualityManagementBLL.StepCheckItemSearch(stu_torgcode, stu_torgtypecode,itemcode, itemname, itemdescr, startNum, endNum, prop, order);
             return TJson.toJson(mes);
         }
         #endregion
@@ -201,12 +204,13 @@
         [HttpPost]
         public HttpResponseMessage AddUpdateStepCheckItem([FromBody] JObject obj)
         {
+            string wkshopcode = obj["wkshopcode"].ToString();    //杞﹂棿缂栫爜
             string checkitemcode = obj["checkitemcode"].ToString();    //宸ュ簭妫�楠岄」鐩唬鐮�
             string checkitemname = obj["checkitemname"].ToString(); //宸ュ簭妫�楠岄」鐩悕绉�
             string checkitemdescr = obj["checkitemdescr"].ToString(); //宸ュ簭妫�楠岄」鐩弿杩�
             string opertype = obj["OperType"].ToString();  //鎿嶄綔绫诲瀷
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
-            mes = QualityManagementBLL.AddUpdateStepCheckItem(checkitemcode, checkitemname, checkitemdescr, opertype, username);
+            mes = QualityManagementBLL.AddUpdateStepCheckItem(wkshopcode,checkitemcode, checkitemname, checkitemdescr, opertype, username);
             return TJson.toJson(mes);
         }
         #endregion
@@ -314,9 +318,11 @@
         [HttpGet]
         public HttpResponseMessage QualityInspectionSearch(string qualityinsptcode = null, string qualityinsptname = null, string status=null, string checktype=null,string sampltype=null,string suitobject = null, int page = 0, int rows = 0, string prop = null, string order = null)
         {
+            var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+            var stu_torgtypecode = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
             int startNum = rows * (page - 1) + 1;  //璧峰璁板綍rowNum
             int endNum = rows * page;   //缁撴潫璁板綍 rowNum
-            mes = QualityManagementBLL.QualityInspectionSearch(qualityinsptcode, qualityinsptname, status, checktype, sampltype, suitobject, startNum, endNum, prop, order);
+            mes = QualityManagementBLL.QualityInspectionSearch(stu_torgcode, stu_torgtypecode,qualityinsptcode, qualityinsptname, status, checktype, sampltype, suitobject, startNum, endNum, prop, order);
             return TJson.toJson(mes);
         }
         #endregion
@@ -346,6 +352,7 @@
         [HttpPost]
         public HttpResponseMessage QualityInspectionAddEditSave([FromBody] JObject obj)
         {
+            string wkshopcode= obj["wkshopcode"].ToString(); //杞﹂棿缂栫爜
             string qualityinsptcode = obj["qualityinsptcode"].ToString(); //璐ㄦ鏂规缂栫爜
             string qualityinsptname = obj["qualityinsptname"].ToString(); //璐ㄦ鏂规鍚嶇О
             string status = obj["status"].ToString(); //鏈夋晥鐘舵��
@@ -359,7 +366,7 @@
             string checkitem = obj["checkitem"].ToString(); //璐ㄦ鍒楄〃
             string type = obj["type"].ToString(); //鎿嶄綔绫诲瀷
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
-            mes = QualityManagementBLL.QualityInspectionAddEditSave(qualityinsptcode, qualityinsptname, status,checktype,sampmethod,sampscare,suitobject,suitpart,descr, stepcode, checkitem,type,username);
+            mes = QualityManagementBLL.QualityInspectionAddEditSave(wkshopcode,qualityinsptcode, qualityinsptname, status,checktype,sampmethod,sampscare,suitobject,suitpart,descr, stepcode, checkitem,type,username);
             return TJson.toJson(mes);
         }
         #endregion

--
Gitblit v1.9.3