wxw
2025-10-13 cfdbd0eadeb5dbe4ff8872bb67f43ae8f323a799
Wms/Wms/Controllers/BllAsnController.cs
@@ -162,6 +162,48 @@
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        /// <summary>
        /// 入库单据导入
        /// </summary>
        /// <param name="models"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult ImportArrivalNotice(ArrivalNoticeVms models)
        {
            try
            {
                if (models.ListArrivalNotice.Count > 50)
                {
                    throw new Exception("单次导入最多50条数据");
                }
                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("未获取到用户信息");
                }
                models.CreateUser = int.Parse(UserId);
                string strMessage = _arrivalNoticeSvc.ImportArrivalNotice(models);
                if (strMessage.Contains("-1"))
                {
                    return Ok(new { code = 1, msg = strMessage });
                }
                else
                {
                    return Ok(new { code = 0, msg = strMessage });
                }
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        [HttpPost]
        public IActionResult EditArrivalNotice(ArrivalNoticeVm model)