| | |
| | | } |
| | | #endregion |
| | | |
| | | #region MyRegion |
| | | |
| | | /// <summary> |
| | | /// 获取单据明细显示的物料 |
| | | /// </summary> |
| | | /// <param name="model">Type:单据类型</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetArrivalNoticesInfo(ArrivalNoticeVm model) |
| | | { |
| | | try |
| | | { |
| | | var models = _PdaAsnSvc.GetArrivalNoticesInfo(model); |
| | | |
| | | return Ok(new { code = 0, msg = "入库单信息", data = models }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 公用方法 |
| | | /// <summary> |
| | | /// 获取单据列表 |
| | |
| | | var models = _PdaAsnSvc.GetArrivalNotices(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">ASNNo:入库单号</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetArrivalNotice(ArrivalNoticeVm model) |
| | | { |
| | | try |
| | | { |
| | | var models = _PdaAsnSvc.GetArrivalNotice(model); |
| | | |
| | | if (models == null) |
| | | { |
| | | return Ok(new { code = 1, msg = "入库单信息", data = models }); |
| | | } |
| | | else |
| | | { |
| | | return Ok(new { code = 0, msg = "入库单信息", data = models }); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 验证储位(地码)是否可用 |
| | | /// </summary> |
| | | /// <param name="model">LocatNo储位地址</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult CheckLocatNo(PalletBindVm model) |
| | | { |
| | | try |
| | | { |
| | | var result = _PdaAsnSvc.CheckLocatNo(model.LocatNo); |
| | | |
| | | return Ok(new { code = 0, msg = "验证成功!", data = result }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 零箱入库 |
| | |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据箱码获取标签最小追溯码信息 |
| | | /// </summary> |
| | | /// <param name="model">BoxNo:箱号</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult GetBindBoxInfo2s(BoxInfoVm model) |
| | | { |
| | | try |
| | | { |
| | | var models = _PdaAsnSvc.GetBindBoxInfo2s(model); |
| | | |
| | | return Ok(new { code = 0, msg = "标签箱码信息", data = models }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | |
| | | [HttpPost] |
| | | public IActionResult GetBindArrivalNoticeDetails(ArrivalNoticeVm model) |
| | | { |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 平库入库 |
| | | /// <summary> |
| | | /// 平库确认入库 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public IActionResult ConfirmInStock(PalletBindVm 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); |
| | | _PdaAsnSvc.ConfirmInStock(model); |
| | | |
| | | return Ok(new { code = 0, msg = "入库成功!" }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = e.Message }); |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |