From 2a7ba2095fede6da921e696f2667cb896ba0bd8d Mon Sep 17 00:00:00 2001 From: bklLiudl <673013083@qq.com> Date: 星期日, 04 二月 2024 08:02:44 +0800 Subject: [PATCH] 平库创建储位 --- Wms/Wms/Controllers/SysController.cs | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 49 insertions(+), 1 deletions(-) diff --git a/Wms/Wms/Controllers/SysController.cs b/Wms/Wms/Controllers/SysController.cs index 94988f0..b159d44 100644 --- a/Wms/Wms/Controllers/SysController.cs +++ b/Wms/Wms/Controllers/SysController.cs @@ -1012,7 +1012,7 @@ } } /// <summary> - /// 娣诲姞鍌ㄤ綅淇℃伅 + /// 娣诲姞绔嬩綋搴撳偍浣嶄俊鎭� /// </summary> /// <param name="model">妯″瀷</param> /// <returns></returns> @@ -1057,6 +1057,54 @@ return Ok(new { code = 400, ErrorMsg = "鏁版嵁鏍煎紡閿欒" }); } } + + /// <summary> + /// 娣诲姞骞冲簱鍌ㄤ綅淇℃伅 + /// </summary> + /// <param name="model">妯″瀷</param> + /// <returns></returns> + [AllowAnonymous] + [HttpPost] + public async Task<IActionResult> AddPkStorageLocat(AddLocateVm model) + { + if (ModelState.IsValid) + { + try + { + //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴稩D + //var claimsIdentity = this.User.Identity as ClaimsIdentity; + //if (claimsIdentity == null) + //{ + // return Ok(new { code = 400, ErrorMsg = "涓鸿幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); + //} + //var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; + //if (string.IsNullOrWhiteSpace(userId)) + //{ + // return Ok(new { code = 400, ErrorMsg = "涓鸿幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); + //} + var bolls = await _locatSvc.AddPkStorageLocat(model, 1); + if (bolls > 0) + { + await _operation.InsertOperation("浠撳簱璁剧疆", "鍌ㄤ綅绠$悊", model.RoadwayNo, "娣诲姞", "娣诲姞鍌ㄤ綅淇℃伅 鍌ㄤ綅鍙凤細" + model.RoadwayNo, 1); + return Ok(new { code = 200, ErrorMsg = "娣诲姞鎴愬姛", data = bolls }); + } + else + { + return Ok(new { code = 400, ErrorMsg = "娣诲姞澶辫触", data = "" }); + } + + } + catch (Exception e) + { + return Ok(new { code = 400, ErrorMsg = "璇疯仈绯荤鐞嗗憳/" + e.Message }); + } + } + else //鏁版嵁鏍煎紡閿欒 + { + return Ok(new { code = 400, ErrorMsg = "鏁版嵁鏍煎紡閿欒" }); + } + } + /// <summary> /// 淇敼鍌ㄤ綅淇℃伅 /// </summary> -- Gitblit v1.8.0