| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.Extensions.Options; |
| | | using Model.ModelVm; |
| | | using Model.ModelVm.BllAsnVm; |
| | | using Model.ModelVm.PdaVm; |
| | | using System; |
| | | using System.Security.Claims; |
| | | using Wms.Tools; |
| | | using WMS.Entity.BllAsnEntity; |
| | | using WMS.IBLL.IPdaServer; |
| | | |
| | |
| | | { |
| | | #region 依赖注入 |
| | | private readonly IPdaAsnServer _PdaAsnSvc; |
| | | private readonly ApiUrlConfig _config; //接口交互路径 |
| | | |
| | | public PdaAsnController(IPdaAsnServer pdaAsnSvc) |
| | | public PdaAsnController(IPdaAsnServer pdaAsnSvc, IOptions<ApiUrlConfig> setting) |
| | | { |
| | | _PdaAsnSvc = pdaAsnSvc; |
| | | _PdaAsnSvc = pdaAsnSvc; |
| | | _config = setting.Value; |
| | | } |
| | | #endregion |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | var models = _PdaAsnSvc.GetBindBoxInfos(model); |
| | | var models = _PdaAsnSvc.GetBindBoxInfos(model, _config.BoxHost + _config.FuMaGetBoxUrl, _config.BoxHost + _config.FuMaGetTokenUrl); |
| | | |
| | | return Ok(new { code = 0, msg = "标签箱码信息", data = models }); |
| | | } |
| | |
| | | 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, _config.BoxHost + _config.FuMaGetBoxUrl, _config.BoxHost + _config.FuMaGetTokenUrl); |
| | | |
| | | 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) |
| | | { |