| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绑定托盘 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult BindPallet(PdaPalletBindVm 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("未获取到用户信息"); |
| | | } |
| | | _PdaAsnSvc.BindPallet(model, int.Parse(UserId),model.Origin); |
| | | |
| | | return Ok(new { code = 0, msg = "绑定成功!" }); |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除箱子信息 |
| | | /// </summary> |
| | | /// <param name="model">Id:箱子主键</param> |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 原料组托 |
| | | #region 组托 |
| | | /// <summary> |
| | | /// 根据箱码获取标签箱码信息 |
| | | /// </summary> |
| | |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 绑定托盘 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult BindPallet(PdaPalletBindVm 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("未获取到用户信息"); |
| | | } |
| | | _PdaAsnSvc.BindPallet(model, int.Parse(UserId), model.Origin); |
| | | |
| | | return Ok(new { code = 0, msg = "绑定成功!" }); |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |