From 33572be8da5fd6534b56e1e22d70e8cf56f5fe41 Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期日, 27 四月 2025 17:00:11 +0800
Subject: [PATCH] 开发料桶转运功能
---
Wms/Wms/Controllers/DownApiController.cs | 213 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 203 insertions(+), 10 deletions(-)
diff --git a/Wms/Wms/Controllers/DownApiController.cs b/Wms/Wms/Controllers/DownApiController.cs
index a4e3fb8..5f20b40 100644
--- a/Wms/Wms/Controllers/DownApiController.cs
+++ b/Wms/Wms/Controllers/DownApiController.cs
@@ -21,6 +21,7 @@
using Microsoft.Extensions.Logging;
using ZXing.QrCode.Internal;
using Model.ModelVm.BllCheckVm;
+using Model.ModelVm.SysVm;
namespace Wms.Controllers
{
@@ -40,7 +41,8 @@
private readonly IWaveMageServer _waveSvc;//浠诲姟鍚屾Svc
private readonly IRcsServer _rcsserver;//RCS鐩稿叧浠诲姟
private readonly INoticeServer _noticeSvc;//浜屾ゼ鍗曟嵁鐩稿叧
- public DownApiController(IOptions<ApiUrlConfig> setting, IExportNoticeServer exNoticeSvc, IPalletBindServer asnPalletBindSvc, IStockCheckServer crCheckSvc, ITaskServer taskSvc, IBllTaskSyncServer taskSyncSvc, IWaveMageServer waveSvc, IRcsServer rcsserver, INoticeServer noticeSvc)
+ private readonly IHopperTransportServer _hopper;//浜屾ゼ鍗曟嵁鐩稿叧
+ public DownApiController(IOptions<ApiUrlConfig> setting, IExportNoticeServer exNoticeSvc, IPalletBindServer asnPalletBindSvc, IStockCheckServer crCheckSvc, ITaskServer taskSvc, IBllTaskSyncServer taskSyncSvc, IWaveMageServer waveSvc, IRcsServer rcsserver, INoticeServer noticeSvc, IHopperTransportServer hopper)
{
_config = setting.Value;
_exNoticeSvc = exNoticeSvc;
@@ -51,6 +53,7 @@
_waveSvc = waveSvc;
_rcsserver = rcsserver;
_noticeSvc = noticeSvc;
+ _hopper = hopper;
}
#region WMS鎺ュ彛 璋冪敤涓嬫父绯荤粺鎺ュ彛
@@ -642,15 +645,6 @@
}
#endregion
-
- #region PDA
-
- //绌烘墭鎸囦护涓嬪彂锛堝嚭搴擄級
-
-
- #endregion
-
-
#region 浜屾ゼ涓氬姟
/// <summary>
/// RCS鍙《
@@ -1122,5 +1116,204 @@
}
}
#endregion
+
+ #region JC37 鏂欐枟杞繍3銆�4妤间笟鍔�
+
+ /// <summary>
+ /// 鑾峰彇鍖哄煙鏍规嵁瑙掕壊
+ /// </summary>
+ /// <param name=""></param>
+ /// <returns></returns>
+ [HttpGet]
+ public IActionResult GetAreaListByUser()
+ {
+ 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 model = _hopper.GetAreaListByUser(int.Parse(userId));
+
+ return Ok(new { data = model, code = 0, msg = "" });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { data = "", code = 1, msg = e.Message });
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇鍌ㄤ綅鏍规嵁鍖哄煙
+ /// </summary>
+ /// <param name="areaNo"></param>
+ /// <returns></returns>
+ [HttpGet]
+ public IActionResult GetLocatByArea(string areaNo)
+ {
+ try
+ {
+ var model = _hopper.GetLocatByArea(areaNo);
+
+ return Ok(new { data = model, code = 0, msg = "" });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { data = "", code = 1, msg = e.Message });
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇缃愮被鍨嬫牴鎹尯鍩�
+ /// </summary>
+ /// <param name="areaNo"></param>
+ /// <returns></returns>
+ [HttpGet]
+ public IActionResult GetPlnStatusByArea(string areaNo)
+ {
+ try
+ {
+ var model = _hopper.GetPlnStatusByArea(areaNo);
+
+ return Ok(new { data = model, code = 0, msg = "" });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { data = "", code = 1, msg = e.Message });
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇鐗╂枡鏍规嵁缃愮被鍨�
+ /// </summary>
+ /// <param name="palletStatus"></param>
+ /// <returns></returns>
+ [HttpGet]
+ public IActionResult GetSkuByStatus(string palletStatus)
+ {
+ try
+ {
+ var model = _hopper.GetSkuByStatus(palletStatus);
+
+ return Ok(new { data = model, code = 0, msg = "" });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { data = "", code = 1, msg = e.Message });
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇鎵规鏍规嵁鐗╂枡
+ /// </summary>
+ /// <param name="skuNo"></param>
+ /// <returns></returns>
+ [HttpGet]
+ public IActionResult GetLotNoBySku(string skuNo)
+ {
+ try
+ {
+ var model = _hopper.GetLotNoBySku(skuNo);
+
+ return Ok(new { data = model, code = 0, msg = "" });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { data = "", code = 1, msg = e.Message });
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇鐗╂枡
+ /// </summary>
+ /// <returns></returns>
+ [HttpGet]
+ public IActionResult GetSku()
+ {
+ try
+ {
+ var model = _hopper.GetSku();
+
+ return Ok(new { data = model, code = 0, msg = "" });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { data = "", code = 1, msg = e.Message });
+ }
+ }
+
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name=""></param>
+ /// <returns></returns>
+ [HttpPost]
+ public IActionResult jiaoLiaoHopper(HopperModel 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 = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+ }
+ _hopper.jiaoLiaoHopper(model.AreaNo,model.LocateNo,model.PlnStatus,model.Standard,model.SkuNo,model.LotNo,"", int.Parse(userId));
+
+ return Ok(new { data = model, code = 0, msg = "" });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { data = "", code = 1, msg = e.Message });
+ }
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name=""></param>
+ /// <returns></returns>
+ [HttpPost]
+ public IActionResult jiaoCheHopper(HopperModel 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 = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+ }
+ _hopper.jiaoCheHopper(model.AreaNo, model.LocateNo,model.PlnNo, model.PlnStatus, model.Weight , model.SkuNo, model.LotNo, int.Parse(userId));
+
+ return Ok(new { data = model, code = 0, msg = "" });
+ }
+ catch (Exception e)
+ {
+ return Ok(new { data = "", code = 1, msg = e.Message });
+ }
+ }
+
+
+ #endregion
+
}
}
--
Gitblit v1.8.0