From 3fb978e25d7ea25038e56ec1db950189b413718b Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期六, 04 三月 2023 11:17:30 +0800
Subject: [PATCH] 1.工单派发选择工艺路线或选择生产车间时判断绑定条件接口开发 2.组织架构删除update改为delete 3.工艺路线新增else if改为if
---
VueWebApi/Controllers/ProductionManagementController.cs | 96 +++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 91 insertions(+), 5 deletions(-)
diff --git a/VueWebApi/Controllers/ProductionManagementController.cs b/VueWebApi/Controllers/ProductionManagementController.cs
index b851546..76eb730 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
{
//瀹氫箟鍏ㄥ眬淇℃伅杩斿洖鍙橀噺
@@ -87,8 +87,9 @@
string markqty = obj["markqty"].ToString(); //涓嬪崟鏁伴噺
string ordernum = obj["ordernum"].ToString(); //涓嬪崟鍗曟暟
string relse_qty = obj["relse_qty"].ToString(); //宸蹭笅鍗曟暟閲�
+ string saleOrderDeliveryDate = obj["saleOrderDeliveryDate"].ToString(); //浜や粯鏃堕棿
var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
- mes = ProductionManagementBLL.MarkSaveErpOrder(erporderid,erpordercode, partcode, wkshopcode, warehousecode, erpqty, markqty, ordernum, relse_qty, username);
+ mes = ProductionManagementBLL.MarkSaveErpOrder(erporderid,erpordercode, partcode, wkshopcode, warehousecode, erpqty, markqty, ordernum, relse_qty, saleOrderDeliveryDate, username);
return TJson.toJson(mes);
}
#endregion
@@ -188,6 +189,38 @@
}
#endregion
+ #region銆愮敓浜х鐞嗐�佸伐鍗曟柊澧炪�佺紪杈戞椂,閫夋嫨鎺掔▼鏄椂鑾峰彇鐗╂枡娓呭崟鐗堟湰鍙枫��
+ /// <summary>
+ /// 鐢熶骇绠$悊銆佸伐鍗曟柊澧炪�佺紪杈戞椂,閫夋嫨鎺掔▼鏄椂鑾峰彇鐗╂枡娓呭崟鐗堟湰鍙�
+ /// </summary>
+ /// <param name="partnumber">浜у搧缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "JobCreationSonAddVison")]
+ [HttpGet]
+ public HttpResponseMessage JobCreationSonAddVison(string partnumber)
+ {
+ mes = ProductionManagementBLL.JobCreationSonAddVison(partnumber);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[宸ュ崟娲惧彂閫夋嫨宸ヨ壓璺嚎鎴栭�夋嫨鐢熶骇杞﹂棿鏃跺垽鏂粦瀹氭潯浠禲
+ /// <summary>
+ /// 宸ュ崟娲惧彂閫夋嫨宸ヨ壓璺嚎鎴栭�夋嫨鐢熶骇杞﹂棿鏃跺垽鏂粦瀹氭潯浠�
+ /// </summary>
+ /// <param name="partcode">浜у搧缂栫爜</param>
+ /// <param name="routecode">宸ヨ壓璺嚎缂栫爜</param>
+ /// <param name="wkshopcode">杞﹂棿缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "SelectRouteOrWkshop")]
+ [HttpGet]
+ public HttpResponseMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode)
+ {
+ mes = ProductionManagementBLL.SelectRouteOrWkshop(partcode, routecode, wkshopcode);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
#region[MES宸ュ崟鏂板銆佺紪杈戞彁浜
/// <summary>
/// MES宸ュ崟鏂板銆佺紪杈戞彁浜�
@@ -210,10 +243,10 @@
string planenddate = obj["planenddate"].ToString(); //璁″垝瀹屾垚鏃堕棿
string orderlev = obj["orderlev"].ToString(); //宸ュ崟绛夌骇
string is_aps = obj["is_aps"].ToString(); //鏄惁鎺掍骇
- string bom_id = obj["bom_id"].ToString(); //Bom涓籭d
+ string bom_id = obj["bom_id"].ToString(); //鐗╂枡娓呭崟id
string opertype = obj["OperType"].ToString(); //鎿嶄綔绫诲瀷
var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
- mes = ProductionManagementBLL.AddUpdateMesOrder(mesorderstus, sourceorder, ordertype, mesordercode, partcode, mesqty, routecode, wkshopcode, planstartdate, planenddate, orderlev, username, opertype, is_aps);
+ mes = ProductionManagementBLL.AddUpdateMesOrder(mesorderstus, sourceorder, ordertype, mesordercode, partcode, mesqty, routecode, wkshopcode, planstartdate, planenddate, orderlev, username, opertype, is_aps, bom_id);
return TJson.toJson(mes);
}
#endregion
@@ -492,6 +525,7 @@
string stepseq = obj["stepseq"].ToString(); //宸ュ簭搴忓彿
string stepcode = obj["stepcode"].ToString(); //宸ュ簭缂栫爜
string eqpcode = obj["eqpcode"].ToString(); //璁惧缂栫爜
+ string reckway = obj["reckway"].ToString(); //璁′欢鏂瑰紡(鐝粍:group銆佷釜浜�:person)
string usergroupcode = obj["usergroupcode"].ToString(); //鐝粍缂栫爜
string reportuser = obj["reportuser"].ToString(); //鎶ュ伐浜哄憳
string taskqty = obj["taskqty"].ToString(); //浠诲姟鏁伴噺
@@ -501,7 +535,7 @@
string badcode = obj["badcode"].ToString(); //涓嶈壇鍘熷洜缂栫爜
string remarks = obj["remarks"].ToString(); //澶囨敞
var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
- mes = ProductionManagementBLL.SavaMesOrderStepReport(mesordercode, partcode, stepseq, stepcode, eqpcode, usergroupcode, reportuser, taskqty, startqty, reportqty, ngqty, badcode, remarks, username);
+ mes = ProductionManagementBLL.SavaMesOrderStepReport(mesordercode, partcode, stepseq, stepcode, eqpcode, reckway,usergroupcode, reportuser, taskqty, startqty, reportqty, ngqty, badcode, remarks, username);
return TJson.toJson(mes);
}
#endregion
@@ -709,6 +743,56 @@
#endregion
+
+ #region[浜ц兘瑙勫垝鏂规璁剧疆鏌ヨ]
+ /// <summary>
+ /// 浜ц兘瑙勫垝鏂规璁剧疆鏌ヨ
+ /// </summary>
+ /// <returns></returns>
+ [Route(template: "CapacityPlanningSetupSearch")]
+ [HttpGet]
+ public HttpResponseMessage CapacityPlanningSetupSearch()
+ {
+ mes = ProductionManagementBLL.CapacityPlanningSetupSearch();
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[浜ц兘瑙勫垝鏂规璁剧疆鏂板]
+ /// <summary>
+ /// 浜ц兘瑙勫垝鏂规璁剧疆鏂板
+ /// </summary>
+ /// <param name="obj">鎻愪氦鏁版嵁</param>
+ /// <returns></returns>
+ [Route(template: "CapacityPlanningSetupAddUpdate")]
+ [HttpPost]
+ public HttpResponseMessage CapacityPlanningSetupAddUpdate([FromBody] JObject obj)
+ {
+ string capacitylist = obj["capacitylist"].ToString(); //鎻愪氦鏁版嵁
+ string username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
+ JavaScriptSerializer Serializer = new JavaScriptSerializer();
+ List<CapacityPlanningSetup> objs = Serializer.Deserialize<List<CapacityPlanningSetup>>(capacitylist);
+ mes = ProductionManagementBLL.CapacityPlanningSetupAddUpdate(username, objs);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[浜ц兘瑙勫垝鏂规璁剧疆鍒犻櫎]
+ /// <summary>
+ /// 浜ц兘瑙勫垝鏂规璁剧疆鍒犻櫎
+ /// </summary>
+ /// <param name="CapSetupCode">鏂规缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "CapacityPlanningSetupDelete")]
+ [HttpPost]
+ public HttpResponseMessage CapacityPlanningSetupDelete(string capsetupcode)
+ {
+ string username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
+ mes = ProductionManagementBLL.CapacityPlanningSetupDelete(username, capsetupcode);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
#region[浜ц兘瑙勫垝鏌ヨ]
/// <summary>
/// 浜ц兘瑙勫垝鏌ヨ
@@ -825,6 +909,8 @@
#endregion
+
+
#region[鑷姩鎺掔▼宸ュ崟鏌ヨ]
/// <summary>
/// 鑷姩鎺掔▼宸ュ崟鏌ヨ
--
Gitblit v1.9.3