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 | 136 +++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 129 insertions(+), 7 deletions(-)
diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs
index 9117497..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;
@@ -78,6 +82,30 @@
}
}
+ /// <summary>
+ /// 鑾峰彇鍏ュ簱鍗曟槑缁嗗墿浣欐墦鍗版暟閲�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpGet]
+ public IActionResult GetAsnDetailQtyList(int id)
+ {
+ try
+ {
+ var models = _arrivalNoticeSvc.GetAsnDetailQtyList(id);
+
+ 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 GetMaterialsList(GetMaterialsVm model)
{
@@ -110,7 +138,7 @@
}
model.CreateUser = int.Parse(UserId);
- string strMesage = _arrivalNoticeSvc.AddArrivalNotice(model);
+ string strMesage = _arrivalNoticeSvc.AddArrivalNotice(model, _config.WcsHost + _config.AddOrderTaskUrl);
if (strMesage == "")
{
@@ -118,7 +146,7 @@
}
if (strMesage.Contains("-1"))
{
- return Ok(new { code = 0, msg = strMesage });
+ return Ok(new { code = 1, msg = strMesage });
}
else
{
@@ -338,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 });
}
@@ -484,7 +512,7 @@
{
try
{
- var models = _PalletBindSvc.GetLocateList("W01",model.RoadwayNo,model.Row,model.Column,model.Layer,model.LocateNo,model.Page,model.Limit, out int count);
+ var models = _PalletBindSvc.GetLocateList("W01",model.RoadwayNo,model.Row,model.Column,model.Layer,model.LocateNo,model.BindId,model.Page,model.Limit, out int count);
return Ok(new { code = 0, count, msg = "鑾峰彇鎸囧畾鍌ㄤ綅淇℃伅", data = models });
}
@@ -892,7 +920,7 @@
{
return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
}
- var list = _BoxInfoSvc.AddLabelBox(model.Id, model.IsReset, decimal.Parse(model.ArriveQty), model.ProductionTime, model.ExpirationTime, model.StoreTime, int.Parse(userId));
+ var list = _BoxInfoSvc.AddLabelBox(model.Id, model.IsReset, decimal.Parse(model.ArriveQty), model.ProductionTime, model.ExpirationTime, model.StoreTime, model.SupplierLot, int.Parse(userId));
return Ok(new { code = 0, msg = "鐢熸垚绠辩爜鏍囩鎴愬姛", data = list });
}
catch (Exception e)
@@ -901,6 +929,100 @@
}
}
+
+ [HttpPost]
+ public IActionResult GetBuDaLabelList(BuDaLabelBoxVm 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 = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+ }
+ var list = _BoxInfoSvc.GetBuDaLabelList(model.BoxNo, model.EndBoxNo, model.BoxNo2, model.EndBoxNo2,model.Type,int.Parse(userId));
+ return Ok(new { code = 0, msg = "鑾峰彇琛ユ墦绠辩爜鏍囩淇℃伅", data = list });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { code = 1, count = 0, msg = e.Message });
+ }
+ }
+
+ //鏍规嵁鍏ュ簱鍗曞彿杩囧幓鍗曟嵁涓嬫墍鏈夋壒娆″彿
+ [HttpGet]
+ public IActionResult GetLotNoListByAsn(string asnNo)
+ {
+ try
+ {
+ var list = _BoxInfoSvc.GetLotNoListByAsn(asnNo);
+ return Ok(new { code = 0, msg = "鎴愬姛鑾峰彇鍗曟嵁涓嬫墍鏈夋壒娆″彿淇℃伅", data = list });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { code = 1, count = 0, msg = e.Message });
+ }
+ }
+
+ //鍒犻櫎鍗曟嵁涓嬪崟涓垨澶氫釜鎵规鐨勬爣绛�
+ [HttpPost]
+ public IActionResult DelLabelByAsnNo(LabelBoxInfoVm 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.DelLabelByAsnNo(model.AsnNo,model.LotNo,int.Parse(userId));
+ return Ok(new { code = 0, msg = "鍒犻櫎鎴愬姛", data = "" });
+ }
+ catch (Exception e)
+ {
+ 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