| | |
| | | |
| | | public partial class Dt_TaskService : ServiceBase<Dt_Task, IDt_TaskRepository>, IDt_TaskService |
| | | { |
| | | /// <summary> |
| | | /// 根据当前工序判断下一工序,送至对应工序 |
| | | /// </summary> |
| | | /// <param name="boxing">组盘</param> |
| | | /// <param name="area">区域</param> |
| | | /// <param name="input">请求参数</param> |
| | | /// <param name="resultTray">托盘电芯</param> |
| | | /// <returns></returns> |
| | | private async Task<WebResponseContent> ProcessBasedOnProcessCode(DtBoxingInfo boxing, Dt_AreaInfo area, RequestTaskDto input, ResultTrayCellsStatus resultTray) |
| | | { |
| | | if (boxing.ProcessCode == "OCVB") |
| | |
| | | var resultProcessApply = JsonConvert.DeserializeObject<ResultProcessApply>(content.Data.ToString()); |
| | | if (!resultProcessApply.Success) return content.Error("工艺申请失败"); |
| | | |
| | | var number = resultProcessApply.ProcessInfo.Where(x => x.ProcessCode == boxing.ProcessCode).FirstOrDefault().Number.ToInt32(); |
| | | var number = resultProcessApply.ProcessInfo.Where(x => x.ProcessCode.Contains(boxing.ProcessCode)).FirstOrDefault().Number.ToInt32(); |
| | | foreach (var item in resultProcessApply.ProcessInfo) |
| | | { |
| | | if (item.Number.ToInt32() == number + 1) |
| | |
| | | return wcsBasez + address; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 电芯NG送至NG口 |
| | | /// </summary> |
| | | private async Task<WebResponseContent> HandleErrorCells(RequestTaskDto input, Dt_AreaInfo area, List<SerialNoDto> serialNosError) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | // TODO 创建任务送至NG排出口 |
| | | var stationManagers = _stationManagerRepository.QueryData(x => x.stationType == 1 && x.stationChildCode == input.Position && x.stationArea == area.AreaCode).ToList(); |
| | | if (stationManagers.Count <= 0) |
| | | var stationManagers = _stationManagerRepository.QueryData(x => x.stationType == 1 && x.stationChildCode == input.Position && x.stationArea == area.AreaCode).FirstOrDefault(); |
| | | if (stationManagers == null) |
| | | { |
| | | throw new Exception("未找到NG入库站台配置"); |
| | | } |
| | | List<string> NGStation = stationManagers.Select(x => x.stationNGLocation).ToList(); |
| | | List<string> NGStation = stationManagers.Roadway.Split(',').ToList(); |
| | | if (NGStation.Count <= 0) |
| | | { |
| | | NGStation = stationManagers.Select(x => x.stationNGChildCode).ToList(); |
| | | NGStation = stationManagers.stationNGChildCode.Split(',').ToList(); |
| | | } |
| | | content = await CreateNewTask(input, NGStation, 2); |
| | | return content.Error("存在异常电芯"); |