| | |
| | | using Model.ModelVm.BllCheckVm; |
| | | using Microsoft.Extensions.Logging; |
| | | using WMS.IBLL.IPdaServer; |
| | | using WMS.IBLL.IDataServer; |
| | | using Model.ModelDto.DataDto; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace Wms.Controllers |
| | | { |
| | |
| | | private readonly IArrivalNoticeServer _arrivalNoticeSvc; |
| | | private readonly IStockCheckServer _stockCheckSvc;//盘点单Svc |
| | | private readonly IPdaCrServer _daCrSvc;//PDA |
| | | public UpApiController(IOptions<ApiUrlConfig> setting,IExportNoticeServer exNoticeSvc,IArrivalNoticeServer arrivalNoticeServer,IStockCheckServer stockCheckSvc,IPdaCrServer daCrSvc) |
| | | private readonly IStockServer _stock; //库存 |
| | | public UpApiController(IOptions<ApiUrlConfig> setting,IExportNoticeServer exNoticeSvc,IArrivalNoticeServer arrivalNoticeServer,IStockCheckServer stockCheckSvc,IPdaCrServer daCrSvc,IStockServer stock) |
| | | { |
| | | _config = setting.Value; |
| | | _exNoticeSvc = exNoticeSvc; |
| | | _arrivalNoticeSvc = arrivalNoticeServer; |
| | | _stockCheckSvc = stockCheckSvc; |
| | | _daCrSvc = daCrSvc; |
| | | _stock = stock; |
| | | } |
| | | #endregion |
| | | |
| | |
| | | //包装信息接口 |
| | | |
| | | |
| | | /// <summary> |
| | | /// 数字孪生系统库存质量状态反馈 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public IActionResult ReLocateData(DigitalTwinModel model) |
| | | { |
| | | //记录log |
| | | var logStr = ""; |
| | | logStr = $@".\log\数字孪生\库位信息及质量状态反馈" + DateTime.Now.ToString("yyyyMMdd") + ".txt"; |
| | | var jsonData = JsonConvert.SerializeObject(model); |
| | | LogFile.SaveLogToFile($"库位信息及质量状态反馈:( {jsonData} ),", logStr); |
| | | |
| | | //获取库存信息 |
| | | List<ReLocateData> stocks = _stock.GetLocateList(); |
| | | |
| | | if (stocks.Count == 0) |
| | | { |
| | | var data = new HttpReturnModel { Success = "0", Message = "当前无库存" }; |
| | | return Ok(data); |
| | | } |
| | | return Ok(stocks); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | } |