From 32c0daf9a78039004bb6c39d578f7734f13d54b1 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期二, 10 十月 2023 10:54:47 +0800
Subject: [PATCH] 1.工单派发校验工价,工价未提前设置或设置部分,如果开关关闭时,不校验是否未设置 或者未设置全,工价复制表中都会写入,没有设置的工价就默认0 如果开关打开就必须要设置工价
---
VueWebApi/Controllers/ProductionManagementController.cs | 36 +++++++++++++++++++++++++++---------
1 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/VueWebApi/Controllers/ProductionManagementController.cs b/VueWebApi/Controllers/ProductionManagementController.cs
index 0b7ce26..c47f153 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
@@ -247,12 +264,13 @@
/// <param name="partcode">浜у搧缂栫爜</param>
/// <param name="routecode">宸ヨ壓璺嚎缂栫爜</param>
/// <param name="wkshopcode">杞﹂棿缂栫爜</param>
+ /// <param name="is_steprice">鏄惁宸ヤ环绠℃帶</param>
/// <returns></returns>
[Route(template: "SelectRouteOrWkshop")]
[HttpGet]
- public HttpResponseMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode)
+ public HttpResponseMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode,string is_steprice)
{
- mes = ProductionManagementBLL.SelectRouteOrWkshop(partcode, routecode, wkshopcode);
+ mes = ProductionManagementBLL.SelectRouteOrWkshop(partcode, routecode, wkshopcode, is_steprice);
return TJson.toJson(mes);
}
#endregion
@@ -622,11 +640,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 +692,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