From 87110c04df904eb4947587a34f3fc5a1eb45eb7e Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期日, 12 十月 2025 16:21:11 +0800
Subject: [PATCH] 入库单据开发导入入库单功能;
---
Wms/Wms/Controllers/BllAsnController.cs | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs
index d505a8f..f9aa4a9 100644
--- a/Wms/Wms/Controllers/BllAsnController.cs
+++ b/Wms/Wms/Controllers/BllAsnController.cs
@@ -162,6 +162,44 @@
return Ok(new { code = 1, msg = e.Message });
}
}
+ /// <summary>
+ /// 鍏ュ簱鍗曟嵁瀵煎叆
+ /// </summary>
+ /// <param name="models"></param>
+ /// <returns></returns>
+ [HttpPost]
+ public IActionResult ImportArrivalNotice(ArrivalNoticeVms models)
+ {
+ 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("鏈幏鍙栧埌鐢ㄦ埛淇℃伅");
+ }
+
+ 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)
--
Gitblit v1.8.0