using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEA_Core; using WIDESEA_DTO; namespace WIDESEA_StoragIntegrationServices { public partial class WCSService { /// /// 请求焊-涂直通/入库 /// /// /// public WebResponseContent GetPalletCodePosition(RequestTaskDto json) { WebResponseContent webResponseContent = new WebResponseContent(); try { //todo: 新增配置信息判断: 涂装生产? 涂装水位? var carInfo = _carBodyInfoRepository.QueryFirst(x => x.PVI == json.PVI); if (carInfo != null) throw new Exception($"无PVI{json.PVI}车身数据,无法过点"); var stationInfo = _stationManagerRepository.QueryFirst(x => x.stationChildCode == json.Position); if (stationInfo != null) throw new Exception($"未配置{json.Position}站点信息"); webResponseContent = _mesService.bindWorkOrder(json.Position, json.Rfid); if(!webResponseContent.Status) throw new Exception($"焊涂流向失败:MES工单绑定失败,RFID:{json.Rfid}"); } catch (Exception ex) { webResponseContent.Error($"请求焊-涂直通/入库失败:{ex.Message}"); } return webResponseContent; } } }