From f3779c3cbca0d737c7ef7eaf47c1330b355c2f00 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期四, 31 八月 2023 17:30:23 +0800
Subject: [PATCH] ERP订单删除功能
---
VueWebApi/Controllers/ProductionManagementController.cs | 31 ++++++++++++++++++++++++-------
1 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/VueWebApi/Controllers/ProductionManagementController.cs b/VueWebApi/Controllers/ProductionManagementController.cs
index 0b7ce26..5dbf07b 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
{
//瀹氫箟鍏ㄥ眬淇℃伅杩斿洖鍙橀噺
@@ -111,6 +111,23 @@
{
var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
mes = ProductionManagementBLL.ClosedErpOrder(erporderid, erpordercode, username);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[ERP璁㈠崟鍒犻櫎]
+ /// <summary>
+ /// ERP璁㈠崟鍒犻櫎
+ /// </summary>
+ /// <param name="erporderid">璁㈠崟id</param>
+ /// <param name="erpordercode">璁㈠崟鍙�</param>
+ /// <returns></returns>
+ [Route(template: "DeleteErpOrder")]
+ [HttpPost]
+ public HttpResponseMessage DeleteErpOrder(string erporderid, string erpordercode)
+ {
+ var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
+ mes = ProductionManagementBLL.DeleteErpOrder(erporderid, erpordercode, username);
return TJson.toJson(mes);
}
#endregion
@@ -622,11 +639,11 @@
string taskqty = obj["taskqty"].ToString(); //浠诲姟鏁伴噺
string startqty = obj["startqty"].ToString(); //寮�宸ユ暟閲�
string reportqty = obj["reportqty"].ToString(); //鎶ュ伐宸ユ暟閲�
- string ngqty = obj["ngqty"].ToString(); //涓嶈壇鏁伴噺
- string badcode = obj["badcode"].ToString(); //涓嶈壇鍘熷洜缂栫爜
+ string defectlist= obj["defectlist"].ToString();//涓嶈壇姹囨��
string remarks = obj["remarks"].ToString(); //澶囨敞
var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
- mes = ProductionManagementBLL.SavaMesOrderStepReport(mesordercode, partcode, stepseq, stepcode, eqpcode, inbarcode, reckway, usergroupcode, reportuser, taskqty, startqty, reportqty, ngqty, badcode, remarks, username);
+ List<ReportDefectList> defectobjs = JsonConvert.DeserializeObject<List<ReportDefectList>>(defectlist);
+ mes = ProductionManagementBLL.SavaMesOrderStepReport(mesordercode, partcode, stepseq, stepcode, eqpcode, inbarcode, reckway, usergroupcode, reportuser, taskqty, startqty, reportqty, defectobjs, remarks, username);
return TJson.toJson(mes);
}
#endregion
@@ -674,11 +691,11 @@
string inuser = obj["inuser"].ToString(); //鏀舵枡浜哄憳
string taskqty = obj["taskqty"].ToString(); //浠诲姟鏁伴噺
string sqty = obj["sqty"].ToString(); //鏀舵枡鏁伴噺
- string ngqty = obj["ngqty"].ToString(); //涓嶈壇鏁伴噺
- string badcode = obj["badcode"].ToString(); //涓嶈壇鍘熷洜缂栫爜
+ string defectlist = obj["defectlist"].ToString();//涓嶈壇姹囨��
string remarks = obj["remarks"].ToString(); //澶囨敞
var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
- mes = ProductionManagementBLL.SavaMesOrderStepIn(mesordercode, partcode, stepseq, stepcode, wxcode, inbarcode, inuser, taskqty, sqty, ngqty, badcode, remarks, username);
+ List<ReportDefectList> defectobjs = JsonConvert.DeserializeObject<List<ReportDefectList>>(defectlist);
+ mes = ProductionManagementBLL.SavaMesOrderStepIn(mesordercode, partcode, stepseq, stepcode, wxcode, inbarcode, inuser, taskqty, sqty, defectobjs, remarks, username);
return TJson.toJson(mes);
}
#endregion
--
Gitblit v1.9.3