From 236ce686ed03f6cb786a5acd7492339bc2ea16ad Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期五, 07 二月 2025 11:03:14 +0800
Subject: [PATCH] Merge branch 'zwc'
---
Wms/Wms/Controllers/BllAsnController.cs | 45 ++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs
index 3336b84..d73c8ce 100644
--- a/Wms/Wms/Controllers/BllAsnController.cs
+++ b/Wms/Wms/Controllers/BllAsnController.cs
@@ -9,6 +9,8 @@
using WMS.IBLL.IBllAsnServer;
using WMS.IBLL.ILogServer;
using Model.ModelVm.BllAsnVm;
+using Wms.Tools;
+using Microsoft.Extensions.Options;
namespace Wms.Controllers
{
@@ -18,6 +20,7 @@
public class BllAsnController : ControllerBase
{
#region 渚濊禆娉ㄥ叆
+ private readonly ApiUrlConfig _config; //鎺ュ彛浜や簰璺緞
private readonly IArrivalNoticeServer _arrivalNoticeSvc; // 鍏ュ簱鍗曟嵁Svc
private readonly IPalletBindServer _PalletBindSvc; // 鎵樼洏缁戝畾Svc
private readonly IBllBoxInfoServer _BoxInfoSvc;
@@ -29,8 +32,9 @@
#endregion
#region 鏋勯�犲嚱鏁�
- public BllAsnController(IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc,IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc,IOperationASNServer logSvc, IPalletUnbindServer palletUnbind,IAuditLogServer auditLog,IBllLabelBoxNoServer labelBox)
+ public BllAsnController(IOptions<ApiUrlConfig> setting, IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc,IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc,IOperationASNServer logSvc, IPalletUnbindServer palletUnbind,IAuditLogServer auditLog,IBllLabelBoxNoServer labelBox)
{
+ _config = setting.Value;
_arrivalNoticeSvc = arrivalNoticeSvc;
_PalletBindSvc = palletBindSvc;
_BoxInfoSvc = bllBoxInfoSvc;
@@ -97,6 +101,11 @@
return Ok(new { code = 1, msg = e.Message });
}
}
+ /// <summary>
+ /// 鑾峰彇娣诲姞鏄庣粏鏁版嵁婧�
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
[HttpPost]
public IActionResult GetMaterialsList(GetMaterialsVm model)
{
@@ -129,7 +138,7 @@
}
model.CreateUser = int.Parse(UserId);
- string strMesage = _arrivalNoticeSvc.AddArrivalNotice(model);
+ string strMesage = _arrivalNoticeSvc.AddArrivalNotice(model, _config.WcsHost + _config.AddOrderTaskUrl);
if (strMesage == "")
{
@@ -357,11 +366,11 @@
}
[HttpGet]
- public IActionResult GetBoxInfoByBoxNo(string boxNo, string boxNo3)
+ public IActionResult GetBoxInfoByBoxNo(string bindNo, string boxNo, string boxNo3)
{
try
{
- var models = _PalletBindSvc.GetBoxInfoByBoxNo(boxNo, boxNo3);
+ var models = _PalletBindSvc.GetBoxInfoByBoxNo(bindNo,boxNo, boxNo3);
return Ok(new { code = 0, count= models.Count, msg = "绠辨敮鏄庣粏淇℃伅", data = models });
}
@@ -986,7 +995,33 @@
return Ok(new { code = 1, count = 0, msg = e.Message });
}
}
-
+
+
+ //缂栬緫鏍囩鏁伴噺
+ [HttpPost]
+ public IActionResult EditLabelQty(EditLabelQtyVm model)
+ {
+ try
+ {
+ //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴稩D
+ var claimsIdentity = this.User.Identity as ClaimsIdentity;
+ if (claimsIdentity == null)
+ {
+ return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+ }
+ var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
+ if (string.IsNullOrWhiteSpace(userId))
+ {
+ return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+ }
+ _BoxInfoSvc.EditLabelQty(model.Id, model.Qty, int.Parse(userId));
+ return Ok(new { code = 0, msg = "缂栬緫鎴愬姛", data = "" });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { code = 1, count = 0, msg = e.Message });
+ }
+ }
#endregion
}
--
Gitblit v1.8.0