From 1c2541b283ce6ba855e67c476412dffe2c693480 Mon Sep 17 00:00:00 2001 From: chengsc <11752@DESKTOP-DS49RCP> Date: 星期三, 11 六月 2025 13:56:23 +0800 Subject: [PATCH] Merge branch 'csc' --- Wms/Wms/Controllers/PdaAsnController.cs | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 108 insertions(+), 3 deletions(-) diff --git a/Wms/Wms/Controllers/PdaAsnController.cs b/Wms/Wms/Controllers/PdaAsnController.cs index 3987256..d8829bc 100644 --- a/Wms/Wms/Controllers/PdaAsnController.cs +++ b/Wms/Wms/Controllers/PdaAsnController.cs @@ -8,6 +8,7 @@ using Model.ModelVm; using Model.ModelVm.BllAsnVm; using Model.ModelVm.PdaVm; +using Model.ModelVm.SysVm; using Newtonsoft.Json; using System; using System.Security.Claims; @@ -193,6 +194,26 @@ } /// <summary> + /// 鏍规嵁绠辩爜鑾峰彇鏍囩绠辩爜淇℃伅锛堣溅闂村叆搴�-鑾峰彇WMS鐢熸垚鐨勭淇℃伅锛� + /// </summary> + /// <param name="boxNo">BoxNo:绠卞彿</param> + /// <returns></returns> + [HttpGet] + public IActionResult GetWmsBoxInfos(string boxNo) + { + try + { + var models = _PdaAsnSvc.GetWmsBoxInfos(boxNo); + + return Ok(new { code = 0, msg = "鏍囩绠辩爜淇℃伅", data = models }); + } + catch (Exception e) + { + return Ok(new { code = 1, msg = e.Message }); + } + } + + /// <summary> /// 鍒ゆ柇鎵樼洏鏄惁鍙敤 鍏敤鏂规硶 /// </summary> /// <param name="model">PalletNo锛氭墭鐩樻潯鐮�</param> @@ -243,6 +264,40 @@ } + /// <summary> + /// 缁戝畾鎵樼洏 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost] + public IActionResult ChejianIn(PdaPalletBindVm model) + { + try + { + + if (_userManager.UserId ==0) + { + throw new Exception("鏈幏鍙栧埌鐢ㄦ埛淇℃伅"); + } + + if (model.TableType == 0) + { + _PdaAsnSvc.ChejianIn(model.PalletNo,model.BoxNo,model.SkuQty,model.AreaNo, _userManager.UserId); + } + else if (model.TableType == 1) + { + _PdaAsnSvc.ChejianQtyIn(model.PalletNo,model.SkuNo,model.LotNo,model.SkuQty,model.AreaNo, _userManager.UserId); + } + + return Ok(new { code = 0, msg = "缁戝畾鎴愬姛!" }); + } + catch (Exception e) + { + return Ok(new { code = 1, msg = e.Message }); + } + } + + //---------------------------------------------鐢宠鍏ュ簱椤甸潰---------------------------------------------------------------------- @@ -269,8 +324,6 @@ #endregion - - #region 鍏敤鏂规硶 /// <summary> @@ -704,7 +757,6 @@ #endregion - #region 骞冲簱鍏ュ簱 /// <summary> /// 骞冲簱纭鍏ュ簱 @@ -822,5 +874,58 @@ #endregion + + #region 绾跨紪鏍囩 + /// <summary> + /// 骞冲簱纭鍏ュ簱 + /// </summary> + /// <param name="model">鐗╂枡缂栫爜锛涚墿鏂欏悕绉�</param> + /// <returns></returns> + [HttpPost] + public IActionResult GetSkuInfo(GetMaterialsVm model) + { + try + { + var models = _PdaAsnSvc.GetSkuInfo(model); + + return Ok(new { code = 0, msg = "鑾峰彇鐗╂枡淇℃伅鎴愬姛!", data = models }); + } + catch (Exception e) + { + return Ok(new { code = 1, msg = e.Message }); + } + } + + /// <summary> + /// 鐢熸垚鏂版爣绛� 骞惰繑鍥炴墦鍗版暟鎹� + /// </summary> + /// <param name="model">鏍囩淇℃伅</param> + /// <returns>鎵撳嵃鏁版嵁</returns> + [HttpPost] + public IActionResult AddLabels(LabelsVm 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("鏈幏鍙栧埌鐢ㄦ埛淇℃伅"); + } + model.userId = int.Parse(UserId); + var models = _PdaAsnSvc.AddLabels(model); + + return Ok(new { code = 0, msg = "绠辩爜鐢熸垚鎴愬姛!", data = models }); + } + catch (Exception e) + { + return Ok(new { code = 1, msg = e.Message }); + } + } + #endregion } } -- Gitblit v1.8.0