From ee4806a4b2ec94ec63b4cb9b58447d9863baebe5 Mon Sep 17 00:00:00 2001 From: wxw <Administrator@DESKTOP-5BIMHQ3> Date: 星期四, 27 三月 2025 09:02:41 +0800 Subject: [PATCH] 修改问题 --- Wms/Wms/Controllers/StatisticalController.cs | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-) diff --git a/Wms/Wms/Controllers/StatisticalController.cs b/Wms/Wms/Controllers/StatisticalController.cs index 8a87f0e..484963d 100644 --- a/Wms/Wms/Controllers/StatisticalController.cs +++ b/Wms/Wms/Controllers/StatisticalController.cs @@ -98,11 +98,11 @@ /// <param name="inspectStatus">璐ㄩ噺鐘舵��</param> /// <returns></returns> [HttpGet] - public IActionResult GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus, string ownerNo, string ownerName,string startTime,string endTIme) + public IActionResult GetBindList(string wareHouseName,string areaName,string locatNo,string palletNo, string lotNo) { try { - List<StockDetailDto> boxInfoList = _stockDetail.GetBindList(skuNo, skuName, palletNo, lotNo, boxNo, status, inspectMark, bitPalletMark, bitBoxMark, inspectStatus, ownerNo, ownerName, startTime, endTIme); + List<StockDetailDto> boxInfoList = _stockDetail.GetBindList(wareHouseName,areaName,locatNo,palletNo, lotNo); return Ok(new { data = boxInfoList, code = 0, msg = "鑾峰彇鎵樼洏鏄庣粏鎴愬姛" }); } catch (Exception e) @@ -434,5 +434,39 @@ } #endregion + + #region 浜屾ゼ涓氬姟 + /// <summary> + /// 娣诲姞鎵樼洏搴撳瓨鏄庣粏 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost] + public IActionResult InsertStockDetail(StockDetailDto model) + { + try + { + var claimsIdentity = this.User.Identity as ClaimsIdentity; + if (claimsIdentity == null) + { + throw new Exception("鏈幏鍙栧埌鐢ㄦ埛淇℃伅"); + } + string userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; + if (string.IsNullOrWhiteSpace(userId)) + { + throw new Exception("鏈幏鍙栧埌鐢ㄦ埛淇℃伅"); + } + + _stockDetail.InsertStockDetail(model.PalletNo, model.WareHouseNo, model.AreaNo, model.LocatNo, model.PalletStatus, model.SkuNo, model.SkuName, model.LotNo, int.Parse(userId)); + + return Ok(new { code = 0, count = 0, msg = "娣诲姞鎴愬姛", data = "" }); + } + catch (Exception e) + { + return Ok(new { code = 1, msg = e.Message }); + } + } + + #endregion } } -- Gitblit v1.8.0