| | |
| | | using Model.ModelVm.PdaVm; |
| | | using System; |
| | | using System.Security.Claims; |
| | | using WMS.Entity.BllAsnEntity; |
| | | using WMS.IBLL.IPdaServer; |
| | | |
| | | namespace Wms.Controllers |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据托盘号或箱码获取托盘信息 |
| | | /// </summary> |
| | | /// <param name="model">PalletNo:托盘号</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetPalletBindInfo(BllPalletBind model) |
| | | { |
| | | try |
| | | { |
| | | var models = _PdaAsnSvc.GetPalletBindInfo(model); |
| | | |
| | | return Ok(new { code = 0, msg = "托盘信息", data = models }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除箱子信息 |
| | | /// </summary> |
| | | /// <param name="model">Id:箱子主键</param> |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除托盘信息 |
| | | /// </summary> |
| | | /// <param name="model">ID\托盘号</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult DelPalletBind(BllPalletBind model) |
| | | { |
| | | try |
| | | { |
| | | var claimsIdentity = this.User.Identity as ClaimsIdentity; |
| | | if (claimsIdentity == null) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; |
| | | if (string.IsNullOrWhiteSpace(UserId)) |
| | | { |
| | | throw new Exception("未获取到用户信息"); |
| | | } |
| | | |
| | | model.CreateUser = int.Parse(UserId); |
| | | |
| | | var strMsg = _PdaAsnSvc.DelPalletBind(model); |
| | | |
| | | 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 }); |
| | | } |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region 生产入库 |