From 8a83e6f21af0a764950e45b2565a370fff74daa5 Mon Sep 17 00:00:00 2001 From: chengsc <11752@DESKTOP-DS49RCP> Date: 星期四, 08 五月 2025 16:47:45 +0800 Subject: [PATCH] Merge branch 'csc' --- Wms/Wms/Controllers/PdaAsnController.cs | 116 +++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 83 insertions(+), 33 deletions(-) diff --git a/Wms/Wms/Controllers/PdaAsnController.cs b/Wms/Wms/Controllers/PdaAsnController.cs index e9c7604..1522b14 100644 --- a/Wms/Wms/Controllers/PdaAsnController.cs +++ b/Wms/Wms/Controllers/PdaAsnController.cs @@ -1,13 +1,20 @@ 锘縰sing Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; +using Model.InterFaceModel; +using Model.ModelDto.BllAsnDto; using Model.ModelDto.DataDto; using Model.ModelVm; using Model.ModelVm.BllAsnVm; using Model.ModelVm.PdaVm; +using Newtonsoft.Json; using System; using System.Security.Claims; using Utility; +using Utility.Tools; +using WMS.BLL.LogServer; using WMS.Entity.BllAsnEntity; +using WMS.Entity.DataEntity; using WMS.IBLL.IPdaServer; namespace Wms.Controllers @@ -18,10 +25,12 @@ public class PdaAsnController : ControllerBase { private readonly IPdaAsnServer _PdaAsnSvc; + private readonly UserManager _userManager; - public PdaAsnController(IPdaAsnServer pdaAsnSvc) + public PdaAsnController(IPdaAsnServer pdaAsnSvc,UserManager userManager) { - _PdaAsnSvc = pdaAsnSvc; + _PdaAsnSvc = pdaAsnSvc; + _userManager = userManager; } @@ -33,8 +42,6 @@ /// 缁戝畾鎵樼洏 /// </summary> /// <param name="model"></param> - /// <returns></returns> - /// <returns></returns> /// <returns></returns> [HttpPost] [UnitOfWork] @@ -94,33 +101,6 @@ var models = _PdaAsnSvc.GetNoPasteAsnNoStrList(); return Ok(new { code = 0, msg = "鍏ュ簱鍗曚俊鎭�", data = models }); - } - catch (Exception e) - { - return Ok(new { code = 1, msg = e.Message }); - } - } - - /// <summary> - /// 鍒ゆ柇鎵樼洏鏄惁鍙敤 - /// </summary> - /// <param name="model">PalletNo锛氭墭鐩樻潯鐮�</param> - /// <returns></returns> - [HttpPost] - public IActionResult IsEnablePalletNo(PalletBindVm model) - { - try - { - var strMsg = _PdaAsnSvc.IsEnablePalletNo(model.PalletNo); - - if (strMsg == "") - { - return Ok(new { code = 0, msg = "鎵樼洏鍙敤!" }); - } - else - { - return Ok(new { code = 1, msg = strMsg }); - } } catch (Exception e) { @@ -208,11 +188,81 @@ } } - + /// <summary> + /// 鍒ゆ柇鎵樼洏鏄惁鍙敤 鍏敤鏂规硶 + /// </summary> + /// <param name="model">PalletNo锛氭墭鐩樻潯鐮�</param> + /// <returns></returns> + [HttpPost] + public IActionResult IsEnablePalletNo(PalletBindVm model) + { + try + { + var strMsg = _PdaAsnSvc.IsEnablePalletNo(model.PalletNo); - //---------------------------------------------缁勬墭鏀惰揣椤甸潰---------------------------------------------------------------------- + if (strMsg == "") + { + return Ok(new { code = 0, msg = "鎵樼洏鍙敤!" }); + } + else + { + return Ok(new { code = 1, msg = strMsg }); + } + } + catch (Exception e) + { + return Ok(new { code = 1, msg = e.Message }); + } + } + /// <summary> + /// 鏍规嵁鍗曟嵁鑾峰彇鏍囩鏁伴噺 + /// </summary> + /// <param name="model">ASNNo锛氬叆搴撳崟銆丄SNDetailNo锛氬叆搴撳崟鏄庣粏鍙�</param> + /// <returns></returns> + [HttpPost] + public IActionResult GetBoxCountByAsn(PalletBindVm model) + { + try + { + var list = _PdaAsnSvc.GetBoxCountByAsn(model.ASNNo,model.ASNDetailNo); + + + return Ok(new { code = 0, msg = "鏍规嵁鍗曟嵁鑾峰彇鏍囩鏁伴噺", data= list}); + + } + catch (Exception e) + { + return Ok(new { code = 1, msg = e.Message }); + } + } + + + //---------------------------------------------鐢宠鍏ュ簱椤甸潰---------------------------------------------------------------------- + + + /// <summary> + /// 淇濆瓨鎸囧畾鐨勫偍浣� + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost] + public IActionResult SaveAppointLocate(PalletBindVm model) + { + try + { + _PdaAsnSvc.SaveAppointLocate(model.PalletNo, model.LocatNo, _userManager.UserId); + + return Ok(new HttpReturnModel{ Success = "0", Message = "鏍规嵁鍗曟嵁鑾峰彇鏍囩鏁伴噺" }); + + } + catch (Exception e) + { + return Ok(new HttpReturnModel { Success = "1", Message = e.Message }); + } + } + #endregion -- Gitblit v1.8.0