From e69d3f70d1c82fdbf5cc0b39f55882a10361c0d6 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期日, 29 六月 2025 18:43:59 +0800 Subject: [PATCH] 小车锁定;排时根据产品器具清单获取模具; --- WebAPI/Controllers/条码管理/WEBSController.cs | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 108 insertions(+), 0 deletions(-) diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" index 74778b0..92184d2 100644 --- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" +++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" @@ -4403,6 +4403,114 @@ #endregion + #region 灏忚溅閿佸畾鍗� 涓婁紶鐢熷崟 + + /// <summary> + /// 灏忚溅閿佸畾鍗曟柊澧炰笂浼� + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SaveTrolleyPositionBill_Json2")] + [HttpPost] + public object set_SaveTrolleyPositionBill_Json([FromBody] JObject msg) + { + var _value = msg["msg"].ToString(); + string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); + string msg3 = sArray[1].ToString(); + string UserName = sArray[2].ToString(); + string OperationType = sArray[3].ToString(); + DBUtility.ClsPub.CurUserName = UserName; + ListModels oListModels = new ListModels(); + try + { + DAL.ClsKf_TrolleyPositionBill oBill = new DAL.ClsKf_TrolleyPositionBill(); + List<Model.ClsKf_TrolleyPositionBillMain> lsmain = new List<Model.ClsKf_TrolleyPositionBillMain>(); + msg2 = msg2.Replace("\\", ""); + msg2 = msg2.Replace("\n", ""); //\n + lsmain = oListModels.getObjectByJson_Kf_TrolleyPositionBillMain(msg2); + + foreach (Model.ClsKf_TrolleyPositionBillMain oItem in lsmain) + { + DBUtility.ClsPub.CurUserName = oItem.HMaker; + oItem.HBillType = "10004"; + oItem.HBillSubType = "10004"; + oItem.HBillStatus = 1; //鍗曟嵁鐘舵�侊紙1鏈锛�2瀹℃牳閫氳繃锛�3鍏抽棴锛�4浣滃簾锛�5瀹℃牳閫�鍥�,6瀹℃牳涓�,7宸查槄锛�8宸插洖澶嶏紝9缁撴锛�10楠岃瘉,11涓嬭揪锛�12寮�宸�,13鐢宠瀹℃壒,15鐢宠妫�楠岋紝16 鍒ゅ畾鍚堟牸锛�17鍒ゅ畾涓嶅悎鏍硷級 + oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); + oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); + oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); + if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + oBill.omodel = oItem; + } + + // 琛ㄤ綋鏁版嵁 + //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆� + msg3 = msg3.Substring(1, msg3.Length - 2); + msg3 = msg3.Replace("\\", ""); + msg3 = msg3.Replace("\n", ""); //\n + List<Model.ClsKf_TrolleyPositionBillSub> ls = new List<Model.ClsKf_TrolleyPositionBillSub>(); + ls = oListModels.getObjectByJson_Kf_TrolleyPositionBillSub(msg3); + int i = 0; + foreach (Model.ClsKf_TrolleyPositionBillSub oItemSub in ls) + { + i++; + oItemSub.HEntryID = i; + oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); + oItemSub.HCloseType = false; //鍏抽棴绫诲瀷 + + oBill.DetailColl.Add(oItemSub); + } + + //淇濆瓨 + //淇濆瓨瀹屾瘯鍚庡鐞� + bool bResult; + if (OperationType == "1") + { + bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); + } + else + { + bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); + objJsonResult.Verify = "N"; + } + + if (bResult) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = 1; + return objJsonResult; + } + } + catch (Exception e) + { + oCn.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "灏忚溅閿佸畾鍗曚笂浼犲け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + #endregion -- Gitblit v1.9.1