From d570cdca55f34f8860f48bb30c5bea5b1f61390c Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期二, 10 十月 2023 07:37:48 +0800
Subject: [PATCH] nothing
---
VueWebApi/Controllers/DeviceManagerController.cs | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 150 insertions(+), 12 deletions(-)
diff --git a/VueWebApi/Controllers/DeviceManagerController.cs b/VueWebApi/Controllers/DeviceManagerController.cs
index 058f743..78b82a2 100644
--- a/VueWebApi/Controllers/DeviceManagerController.cs
+++ b/VueWebApi/Controllers/DeviceManagerController.cs
@@ -180,7 +180,9 @@
[HttpGet]
public HttpResponseMessage WorkShopSelect()
{
- mes = DeviceManagerBLL.WorkShopSelect();
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var description = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
+ mes = DeviceManagerBLL.WorkShopSelect(stu_torgcode, description);
return TJson.toJson(mes);
}
#endregion
@@ -219,9 +221,11 @@
[HttpGet]
public HttpResponseMessage DeviceMangerSearch(string DeviceCode = null, string DeviceName = null, string Status = null, string WorkShop = null,string DeviceType=null,string DeviceGroup=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 description = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
int startNum = rows * (page - 1) + 1; //璧峰璁板綍rowNum
int endNum = rows * page; //缁撴潫璁板綍 rowNum
- mes = DeviceManagerBLL.DeviceMangerSearch(DeviceCode, DeviceName, Status, WorkShop, DeviceType, DeviceGroup, startNum, endNum, prop, order);
+ mes = DeviceManagerBLL.DeviceMangerSearch(stu_torgcode, description,DeviceCode, DeviceName, Status, WorkShop, DeviceType, DeviceGroup, startNum, endNum, prop, order);
return TJson.toJson(mes);
}
#endregion
@@ -413,9 +417,11 @@
[HttpGet]
public HttpResponseMessage DeviceCheckStandArdSearch(int page, int rows, string prop, string order,string checkstandcode = null, string checkstandname = null, string checkcontr = 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 = DeviceManagerBLL.DeviceCheckStandArdSearch(checkstandcode, checkstandname, checkcontr, startNum, endNum, prop, order);
+ mes = DeviceManagerBLL.DeviceCheckStandArdSearch(stu_torgcode, stu_torgtypecode,checkstandcode, checkstandname, checkcontr, startNum, endNum, prop, order);
return TJson.toJson(mes);
}
#endregion
@@ -491,7 +497,9 @@
[HttpGet]
public HttpResponseMessage DeviceCheckStanedAssociationEqp(string checkstand_code)
{
- mes = DeviceManagerBLL.DeviceCheckStanedAssociationEqp(checkstand_code);
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var description = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
+ mes = DeviceManagerBLL.DeviceCheckStanedAssociationEqp(stu_torgcode, description,checkstand_code);
return TJson.toJson(mes);
}
#endregion
@@ -507,8 +515,10 @@
[HttpPost]
public HttpResponseMessage SaveDeviceCheckStanedAssociationEqp(string checkstand_code, List<ObjectData> json)
{
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var stu_torgtypecode = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
- mes = DeviceManagerBLL.SaveDeviceCheckStanedAssociationEqp(checkstand_code, username, json);
+ mes = DeviceManagerBLL.SaveDeviceCheckStanedAssociationEqp(stu_torgcode, stu_torgtypecode,checkstand_code, username, json);
return TJson.toJson(mes);
}
#endregion
@@ -531,9 +541,11 @@
[HttpGet]
public HttpResponseMessage DeviceRepairStandArdSearch(int page, int rows, string prop, string order,string repairstandcode = null, string repairstandname = null, string repairstanddescr = 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 = DeviceManagerBLL.DeviceRepairStandArdSearch(repairstandcode, repairstandname, repairstanddescr, startNum, endNum, prop, order);
+ mes = DeviceManagerBLL.DeviceRepairStandArdSearch(stu_torgcode, stu_torgtypecode,repairstandcode, repairstandname, repairstanddescr, startNum, endNum, prop, order);
return TJson.toJson(mes);
}
#endregion
@@ -609,7 +621,9 @@
[HttpGet]
public HttpResponseMessage DeviceRepairStanedAssociationEqp(string repairstand_code)
{
- mes = DeviceManagerBLL.DeviceRepairStanedAssociationEqp(repairstand_code);
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var description = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
+ mes = DeviceManagerBLL.DeviceRepairStanedAssociationEqp(stu_torgcode, description,repairstand_code);
return TJson.toJson(mes);
}
#endregion
@@ -625,8 +639,10 @@
[HttpPost]
public HttpResponseMessage SaveDeviceRepairStanedAssociationEqp(string repairstand_code, List<ObjectData> json)
{
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var stu_torgtypecode = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
- mes = DeviceManagerBLL.SaveDeviceRepairStanedAssociationEqp(repairstand_code, username, json);
+ mes = DeviceManagerBLL.SaveDeviceRepairStanedAssociationEqp(stu_torgcode, stu_torgtypecode, repairstand_code, username, json);
return TJson.toJson(mes);
}
#endregion
@@ -651,6 +667,8 @@
[HttpGet]
public HttpResponseMessage DeviceCheckTakeSearch(int page, int rows, string prop, string order, string wkshopcode = null, string eqpcode = null, string eqpname = null,string stanedname=null,string checkuser=null,string checkdate=null)
{
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var description = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
string checkopendate = ""; //鐐规寮�濮嬫椂闂�
string checkclosedate = ""; //鐐规缁撴潫鏃堕棿
if (checkdate != "" && checkdate != null)
@@ -660,7 +678,7 @@
}
int startNum = rows * (page - 1) + 1; //璧峰璁板綍rowNum
int endNum = rows * page; //缁撴潫璁板綍 rowNum
- mes = DeviceManagerBLL.DeviceCheckTakeSearch(wkshopcode, eqpcode, eqpname, stanedname, checkuser, checkopendate, checkclosedate, startNum, endNum, prop, order);
+ mes = DeviceManagerBLL.DeviceCheckTakeSearch(stu_torgcode, description,wkshopcode, eqpcode, eqpname, stanedname, checkuser, checkopendate, checkclosedate, startNum, endNum, prop, order);
return TJson.toJson(mes);
}
#endregion
@@ -695,6 +713,8 @@
[HttpGet]
public HttpResponseMessage DeviceCheckTakeOutExcel(string wkshopcode = null, string eqpcode = null, string eqpname = null, string stanedname = null, string checkuser = null, string checkdate = null)
{
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var description = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
string checkopendate = ""; //鐐规寮�濮嬫椂闂�
string checkclosedate = ""; //鐐规缁撴潫鏃堕棿
if (checkdate != "" && checkdate != null)
@@ -702,7 +722,7 @@
checkopendate = checkdate.Split('~')[0].ToString();
checkclosedate = checkdate.Split('~')[1].ToString();
}
- mes = DeviceManagerBLL.DeviceCheckTakeOutExcel(wkshopcode, eqpcode, eqpname, stanedname, checkuser, checkopendate, checkclosedate);
+ mes = DeviceManagerBLL.DeviceCheckTakeOutExcel(stu_torgcode, description,wkshopcode, eqpcode, eqpname, stanedname, checkuser, checkopendate, checkclosedate);
return TJson.toJson(mes);
}
#endregion
@@ -728,6 +748,8 @@
[HttpGet]
public HttpResponseMessage DeviceRepairTakeSearch(int page, int rows, string prop, string order, string wkshopcode = null, string eqpcode = null, string eqpname = null, string stanedname = null, string repairuser = null, string repairdate = null,string repairresult=null)
{
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var description = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
string repairopendate = ""; //鐐规寮�濮嬫椂闂�
string repairclosedate = ""; //鐐规缁撴潫鏃堕棿
if (repairdate != "" && repairdate != null)
@@ -737,7 +759,7 @@
}
int startNum = rows * (page - 1) + 1; //璧峰璁板綍rowNum
int endNum = rows * page; //缁撴潫璁板綍 rowNum
- mes = DeviceManagerBLL.DeviceRepairTakeSearch(wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult, startNum, endNum, prop, order);
+ mes = DeviceManagerBLL.DeviceRepairTakeSearch(stu_torgcode, description, wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult, startNum, endNum, prop, order);
return TJson.toJson(mes);
}
#endregion
@@ -773,6 +795,8 @@
[HttpGet]
public HttpResponseMessage DeviceRepairTakeOutExcel(string wkshopcode = null, string eqpcode = null, string eqpname = null, string stanedname = null, string repairuser = null, string repairdate = null, string repairresult = null)
{
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var description = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
string repairopendate = ""; //鐐规寮�濮嬫椂闂�
string repairclosedate = ""; //鐐规缁撴潫鏃堕棿
if (repairdate != "" && repairdate != null)
@@ -780,7 +804,121 @@
repairopendate = repairdate.Split('~')[0].ToString();
repairclosedate = repairdate.Split('~')[1].ToString();
}
- mes = DeviceManagerBLL.DeviceRepairTakeOutExcel(wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult);
+ mes = DeviceManagerBLL.DeviceRepairTakeOutExcel(stu_torgcode, description,wkshopcode, eqpcode, eqpname, stanedname, repairuser, repairopendate, repairclosedate, repairresult);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+
+ #region[璁惧缁翠慨璁板綍鏌ヨ]
+ /// <summary>
+ /// 璁惧缁翠慨璁板綍鏌ヨ
+ /// </summary>
+ /// <param name="page">椤电爜</param>
+ /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+ /// <param name="prop">鎺掑簭瀛楁</param>
+ /// <param name="order">鎺掑簭瑙勫垯</param>
+ /// <param name="wkshopcode">杞﹂棿缂栫爜</param>
+ /// <param name="eqpcode">璁惧缂栫爜</param>
+ /// <param name="eqpname">璁惧鍚嶇О</param>
+ /// <param name="reportuser">鎶ヤ慨浜哄憳</param>
+ /// <param name="repairuser">缁翠慨浜哄憳</param>
+ /// <param name="vrifcatuser">楠岃瘉浜哄憳</param>
+ /// <param name="reportdate">鎶ヤ慨鏃堕棿</param>
+ /// <param name="repairdate">缁翠慨鏃堕棿</param>
+ /// <param name="vrifcatdate">楠岃瘉鏃堕棿</param>
+ /// <returns></returns>
+ [Route(template: "DeviceUpdateSearch")]
+ [HttpGet]
+ public HttpResponseMessage DeviceUpdateSearch(int page, int rows, string prop, string order, string wkshopcode = null, string eqpcode = null, string eqpname = null, string reportuser = null, string repairuser = null,string vrifcatuser=null, string reportdate = null, string repairdate = null,string vrifcatdate=null)
+ {
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var description = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
+ string reportopendate = ""; //鎶ヤ慨寮�濮嬫椂闂�
+ string reportclosedate = ""; //鎶ヤ慨缁撴潫鏃堕棿
+ string repairopendate = ""; //缁翠慨寮�濮嬫椂闂�
+ string repairclosedate = ""; //缁翠慨缁撴潫鏃堕棿
+ string vrifcatopendate = ""; //缁翠慨楠岃瘉寮�濮嬫椂闂�
+ string vrifcatclosedate = ""; //缁翠慨楠岃瘉缁撴潫鏃堕棿
+ if (reportdate != "" && reportdate != null)
+ {
+ reportopendate = reportdate.Split('~')[0].ToString();
+ reportclosedate = reportdate.Split('~')[1].ToString();
+ }
+ if (repairdate != "" && repairdate != null)
+ {
+ repairopendate = repairdate.Split('~')[0].ToString();
+ repairclosedate = repairdate.Split('~')[1].ToString();
+ }
+ if (vrifcatdate != "" && vrifcatdate != null)
+ {
+ vrifcatopendate = vrifcatdate.Split('~')[0].ToString();
+ vrifcatclosedate = vrifcatdate.Split('~')[1].ToString();
+ }
+ int startNum = rows * (page - 1) + 1; //璧峰璁板綍rowNum
+ int endNum = rows * page; //缁撴潫璁板綍 rowNum
+ mes = DeviceManagerBLL.DeviceUpdateSearch(stu_torgcode, description,wkshopcode, eqpcode, eqpname, reportuser, repairuser, vrifcatuser, reportopendate, reportclosedate, repairopendate, repairclosedate, vrifcatopendate, vrifcatclosedate, startNum, endNum, prop, order);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[璁惧缁翠慨璁板綍鏄庣粏鏌ヨ]
+ /// <summary>
+ /// 璁惧缁翠慨璁板綍鏄庣粏鏌ヨ
+ /// </summary>
+ /// <param name="repair_code">璁惧缁翠慨鍗曞彿</param>
+ /// <returns></returns>
+ [Route(template: "DeviceUpdateSubSearch")]
+ [HttpGet]
+ public HttpResponseMessage DeviceUpdateSubSearch(string repair_code)
+ {
+ mes = DeviceManagerBLL.DeviceUpdateSubSearch(repair_code);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[璁惧缁翠慨璁板綍瀵煎嚭]
+ /// <summary>
+ /// 璁惧缁翠慨璁板綍瀵煎嚭
+ /// </summary>
+ /// <param name="wkshopcode">杞﹂棿缂栫爜</param>
+ /// <param name="eqpcode">璁惧缂栫爜</param>
+ /// <param name="eqpname">璁惧鍚嶇О</param>
+ /// <param name="reportuser">鎶ヤ慨浜哄憳</param>
+ /// <param name="repairuser">缁翠慨浜哄憳</param>
+ /// <param name="vrifcatuser">楠岃瘉浜哄憳</param>
+ /// <param name="reportdate">鎶ヤ慨鏃堕棿</param>
+ /// <param name="repairdate">缁翠慨鏃堕棿</param>
+ /// <param name="vrifcatdate">楠岃瘉鏃堕棿</param>
+ /// <returns></returns>
+ [Route(template: "DeviceUpdateOutExcel")]
+ [HttpGet]
+ public HttpResponseMessage DeviceUpdateOutExcel(string wkshopcode = null, string eqpcode = null, string eqpname = null, string reportuser = null, string repairuser = null, string vrifcatuser = null, string reportdate = null, string repairdate = null, string vrifcatdate = null)
+ {
+ var stu_torgcode = HttpContext.Current.Request.Cookies["stu_torgcode"].Value.ToString(); //鎵�灞炵粍缁�
+ var description = HttpContext.Current.Request.Cookies["description"].Value.ToString(); //鎵�灞炵粍缁囩被鍨�
+ string reportopendate = ""; //鎶ヤ慨寮�濮嬫椂闂�
+ string reportclosedate = ""; //鎶ヤ慨缁撴潫鏃堕棿
+ string repairopendate = ""; //缁翠慨寮�濮嬫椂闂�
+ string repairclosedate = ""; //缁翠慨缁撴潫鏃堕棿
+ string vrifcatopendate = ""; //缁翠慨楠岃瘉寮�濮嬫椂闂�
+ string vrifcatclosedate = ""; //缁翠慨楠岃瘉缁撴潫鏃堕棿
+ if (reportdate != "" && reportdate != null)
+ {
+ reportopendate = reportdate.Split('~')[0].ToString();
+ reportclosedate = reportdate.Split('~')[1].ToString();
+ }
+ if (repairdate != "" && repairdate != null)
+ {
+ repairopendate = repairdate.Split('~')[0].ToString();
+ repairclosedate = repairdate.Split('~')[1].ToString();
+ }
+ if (vrifcatdate != "" && vrifcatdate != null)
+ {
+ vrifcatopendate = vrifcatdate.Split('~')[0].ToString();
+ vrifcatclosedate = vrifcatdate.Split('~')[1].ToString();
+ }
+ mes = DeviceManagerBLL.DeviceUpdateOutExcel(stu_torgcode, description,wkshopcode, eqpcode, eqpname, reportuser, repairuser, vrifcatuser, reportopendate, reportclosedate, repairopendate, repairclosedate, vrifcatopendate, vrifcatclosedate);
return TJson.toJson(mes);
}
#endregion
--
Gitblit v1.9.3