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/QualityManagementController.cs | 69 +++++++++++++++++++++++++++++++---
1 files changed, 62 insertions(+), 7 deletions(-)
diff --git a/VueWebApi/Controllers/QualityManagementController.cs b/VueWebApi/Controllers/QualityManagementController.cs
index 15a7e4a..d108e32 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
@@ -248,9 +252,11 @@
[HttpGet]
public HttpResponseMessage StepCheckTableSearch(string wocode = null, string partcode = null, string partname = null, string partapec = null, string stepname = null,string standname=null, string checktype = null, string checkresult = 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.StepCheckTableSearch(wocode, partcode, partname,partapec,stepname,standname,checktype,checkresult, startNum, endNum, prop, order);
+ mes = QualityManagementBLL.StepCheckTableSearch(stu_torgcode, stu_torgtypecode,wocode, partcode, partname,partapec,stepname,standname,checktype,checkresult, startNum, endNum, prop, order);
return TJson.toJson(mes);
}
#endregion
@@ -289,7 +295,9 @@
[HttpGet]
public HttpResponseMessage StepCheckTableOutExcel(string wocode = null, string partcode = null, string partname = null, string partapec = null, string stepname = null, string standname = null, string checktype = null, string checkresult = null,string prop = null, string order = null)
{
- mes = QualityManagementBLL.StepCheckTableOutExcel(wocode, partcode, partname, partapec, stepname, standname, checktype, checkresult, prop, order);
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var stu_torgtypecode = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
+ mes = QualityManagementBLL.StepCheckTableOutExcel(stu_torgcode, stu_torgtypecode, wocode, partcode, partname, partapec, stepname, standname, checktype, checkresult, prop, order);
return TJson.toJson(mes);
}
#endregion
@@ -314,9 +322,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
@@ -335,5 +345,50 @@
return TJson.toJson(mes);
}
#endregion
+
+ #region[璐ㄦ鏂规鏂板/缂栬緫鎻愪氦]
+ /// <summary>
+ /// 璐ㄦ鏂规鏂板/缂栬緫鎻愪氦
+ /// </summary>
+ /// <param name="obj">鎻愪氦鏁版嵁</param>
+ /// <returns></returns>
+ [Route(template: "QualityInspectionAddEditSave")]
+ [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(); //鏈夋晥鐘舵��
+ string checktype = obj["checktype"].ToString(); //妫�楠岀被鍨�
+ string sampmethod = obj["sampmethod"].ToString(); //鎶芥鏂瑰紡
+ string sampscare = obj["sampscare"].ToString(); //鍥哄畾鎶芥(鏍锋湰鏁�) 姣斾緥鎶芥(鐧惧垎姣�)
+ string suitobject = obj["suitobject"].ToString(); //閫傜敤瀵硅薄
+ string suitpart = obj["suitpart"].ToString(); //閫傜敤鐗╂枡(缂栫爜)鎴栬�呯墿鏂欑被鍨�(缂栫爜)
+ string descr = obj["descr"].ToString(); //妫�楠屾柟妗堟弿杩�
+ string stepcode = obj["stepcode"].ToString(); //宸ュ簭缂栫爜(棣栨銆佸贰妫�銆佸畬宸ユ楠�)
+ string checkitem = obj["checkitem"].ToString(); //璐ㄦ鍒楄〃
+ string type = obj["type"].ToString(); //鎿嶄綔绫诲瀷
+ var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
+ mes = QualityManagementBLL.QualityInspectionAddEditSave(wkshopcode,qualityinsptcode, qualityinsptname, status,checktype,sampmethod,sampscare,suitobject,suitpart,descr, stepcode, checkitem,type,username);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[璐ㄦ鏂规鍒犻櫎]
+ /// <summary>
+ /// 璐ㄦ鏂规鍒犻櫎
+ /// </summary>
+ /// <param name="qualityinsptcode">璐ㄦ鏂规缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "QualityInspectionDelete")]
+ [HttpPost]
+ public HttpResponseMessage QualityInspectionDelete(string qualityinsptcode)
+ {
+ var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
+ mes = QualityManagementBLL.QualityInspectionDelete(qualityinsptcode,username);
+ return TJson.toJson(mes);
+ }
+ #endregion
}
}
--
Gitblit v1.9.3