| | |
| | | private readonly IPdaSoServer _pdaSoSvc;//空托出库Svc |
| | | private readonly IPdaAsnServer _paAsnSvc;//空托跺绑定 |
| | | private readonly IStockServer _stockSvc;//AGV任务完成箅 |
| | | private readonly IPdaCrServer _pdaCrServer; // PDA任务调度 |
| | | |
| | | public DownApiController(IOptions<ApiUrlConfig> setting, IExportNoticeServer exNoticeSvc, IPalletBindServer asnPalletBindSvc, IStockCheckServer crCheckSvc, ITaskServer taskSvc, IPdaSoServer pdaSoSvc,IPdaAsnServer paAsnSvc,IStockServer stockSvc) |
| | | public DownApiController(IOptions<ApiUrlConfig> setting, IExportNoticeServer exNoticeSvc, IPalletBindServer asnPalletBindSvc, IStockCheckServer crCheckSvc, ITaskServer taskSvc, IPdaSoServer pdaSoSvc,IPdaAsnServer paAsnSvc,IStockServer stockSvc,IPdaCrServer pdaCrServer) |
| | | { |
| | | _config = setting.Value; |
| | | _exNoticeSvc = exNoticeSvc; |
| | |
| | | _taskSvc = taskSvc; |
| | | _pdaSoSvc = pdaSoSvc; |
| | | _paAsnSvc = paAsnSvc; |
| | | _stockSvc = stockSvc; |
| | | _stockSvc = stockSvc; |
| | | _pdaCrServer = pdaCrServer; |
| | | } |
| | | |
| | | #region WMS接口 调用下游系统接口 |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | |
| | | if (model.TaskTyp == "mid") //AGV到达入库口,请求放货 |
| | | { |
| | | //下发WCS放货请求 |
| | | var ret = _taskSvc.GetWcsPuttype(model.CurrentCallCode,_config.WcsHost + _config.MesBeiLiaoUrl); |
| | | var ret = _taskSvc.GetWcsPuttype(model.TaskCode,model.CurrentCallCode,_config.WcsHost + _config.HttpInRequest); |
| | | if (ret.Contains("-1")) |
| | | { |
| | | logStr = $@".\log\WCS\任务反馈" + DateTime.Now.ToString("yyyyMMdd") + ".txt"; |
| | |
| | | } |
| | | else if (model.TaskTyp == "end")//AGV放货到入库口完成 |
| | | { |
| | | _stockSvc.ArriveFinish(model.TaskCode); |
| | | _stockSvc.ArriveFinish(model.TaskCode,_config.WcsHost + _config.HttpInFinish); |
| | | |
| | | |
| | | } |
| | | |
| | | break; |
| | |
| | | var jsonData = JsonConvert.SerializeObject(model); |
| | | LogFile.SaveLogToFile($"WCS任务反馈执行通知:( {jsonData} ),", logStr); |
| | | |
| | | //下发AGV入库任务 |
| | | var taskType = _taskSvc.GetTaskType(model.TaskNo); |
| | | //下发AGV继续执行 |
| | | _pdaCrServer.AgvContinue(model.TaskNo,_config.AgvHost+_config.ContinueTask); |
| | | |
| | | |
| | | return Ok(new OutCommanAgvDto { Code = "0", Message = "成功"}); |