From 1401f0156b5338a110f1d3a803a3c09c134b7e0d Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期六, 23 三月 2024 16:53:02 +0800
Subject: [PATCH] Merge branch 'wxw'
---
Wms/Wms/Controllers/SysController.cs | 80 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 80 insertions(+), 0 deletions(-)
diff --git a/Wms/Wms/Controllers/SysController.cs b/Wms/Wms/Controllers/SysController.cs
index b159d44..1ec3250 100644
--- a/Wms/Wms/Controllers/SysController.cs
+++ b/Wms/Wms/Controllers/SysController.cs
@@ -735,6 +735,50 @@
return Ok(new { code = 1, msg = e.Message });
}
}
+
+ /// <summary>
+ /// 娣诲姞鍖哄煙淇℃伅
+ /// </summary>
+ /// <param name="model">妯″瀷</param>
+ /// <returns></returns>
+ [HttpPost]
+ public IActionResult InsertStorageArea(SysStorageArea 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 = "涓鸿幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+ }
+ model.CreateUser = int.Parse(userId);
+ string bolls = _areaSvc.InsertStorageArea(model);
+ var arr = bolls.Split(":");
+ if (arr[0] != "-1")
+ {
+ SysStorageArea area = _areaSvc.GetStorageMaxArea();
+ _operation.InsertOperation("浠撳簱璁剧疆", "鍖哄煙绠$悊", area.AreaNo, "娣诲姞", "娣诲姞鍖哄煙淇℃伅 鍖哄煙鍙凤細" + area.AreaNo, Convert.ToInt32(userId));
+ return Ok(new { code = 0, msg = bolls, data = "" });
+ }
+ else
+ {
+ return Ok(new { code = 1, msg = bolls, data = "" });
+ }
+
+ }
+ catch (Exception e)
+ {
+ return Ok(new { code = 1, msg = e.Message });
+ }
+
+ }
+
/// <summary>
/// 淇敼鍖哄煙淇℃伅
/// </summary>
@@ -1492,6 +1536,7 @@
#region 鍌ㄤ綅鍥句緥
+ #region 绔嬪簱
/// <summary>
/// 鏍规嵁浠撳簱 鎺�
/// </summary>
@@ -1608,6 +1653,41 @@
});
}
+
+
+ #endregion
+
+ #region 骞冲簱
+
+ /// <summary>
+ /// 鏍规嵁浠撳簱 鎺�
+ /// </summary>
+ /// <param name="wareHouseNo">浠撳簱</param>
+ /// <param name="row">鎺�</param>
+ /// <param name="depth">娣卞害</param>
+ /// <returns></returns>
+ [HttpGet]
+ public IActionResult GetFlatLibraryLegend(string wareHouseNo, string row)
+ {
+ //鑾峰彇鍌ㄤ綅淇℃伅
+ List<SysStorageLocat> storagelist = _locatSvc.GetFlatLibraryLegend(wareHouseNo, row);
+
+ //Dictionary<string, int> dic = new Dictionary<string, int>()
+ //{
+ // "B01"
+ //};
+
+ return Ok(new
+ {
+ data = storagelist,
+ //dic,
+ code = 0,
+ msg = ""
+ });
+ }
+
+ #endregion
+
/// <summary>
/// 鏍规嵁鍌ㄤ綅鍦板潃鑾峰彇鍌ㄤ綅涓婄殑鎵樼洏鍜岀墿鍝佷俊鎭�
/// </summary>
--
Gitblit v1.8.0