From bd14d44a46cd191d0deb15b6f752f9477b818398 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期五, 22 九月 2023 17:53:46 +0800
Subject: [PATCH] 修改车间看板判断条件
---
VueWebApi/Controllers/QualityManagementController.cs | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 103 insertions(+), 9 deletions(-)
diff --git a/VueWebApi/Controllers/QualityManagementController.cs b/VueWebApi/Controllers/QualityManagementController.cs
index 9f77797..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
@@ -166,7 +167,6 @@
}
#endregion
-
#region[宸ュ簭妫�楠岄」鐩垪琛ㄦ煡璇
@@ -185,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
@@ -202,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
@@ -226,8 +229,6 @@
return TJson.toJson(mes);
}
#endregion
-
-
#region[宸ュ簭妫�楠岃褰曞垪琛ㄦ煡璇
@@ -251,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
@@ -292,7 +295,98 @@
[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
+
+
+ #region[璐ㄦ鏂规鍒楄〃鏌ヨ]
+ /// <summary>
+ /// 璐ㄦ鏂规鍒楄〃鏌ヨ
+ /// </summary>
+ /// <param name="qualityinsptcode">璐ㄦ鏂规缂栫爜</param>
+ /// <param name="qualityinsptname">璐ㄦ鏂规鍚嶇О</param>
+ /// <param name="status">鏈夋晥鐘舵��</param>
+ /// <param name="checktype">璐ㄦ绫诲瀷</param>
+ /// <param name="sampltype">鎶芥牱鏂瑰紡</param>
+ /// <param name="suitobject">閫傜敤瀵硅薄</param>
+ /// <param name="page">椤电爜</param>
+ /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+ /// <param name="prop">鎺掑簭瀛楁</param>
+ /// <param name="order">鎺掑簭瑙勫垯</param>
+ /// <returns></returns>
+ [Route(template: "QualityInspectionSearch")]
+ [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(stu_torgcode, stu_torgtypecode,qualityinsptcode, qualityinsptname, status, checktype, sampltype, suitobject, startNum, endNum, prop, order);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[璐ㄦ鏂规鏌ョ湅缂栬緫]
+ /// <summary>
+ /// 璐ㄦ鏂规鏌ョ湅缂栬緫
+ /// </summary>
+ /// <param name="qualityinsptcode">璐ㄦ鏂规缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "QualityInspectionSeeEdit")]
+ [HttpGet]
+ public HttpResponseMessage QualityInspectionSeeEdit(string qualityinsptcode)
+ {
+ mes = QualityManagementBLL.QualityInspectionSeeEdit(qualityinsptcode);
+ 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