| | |
| | | } |
| | | } |
| | | |
| | | // 创建一个TrayCellsStatusDto对象,并赋值 |
| | | //TrayCellsStatusDto trayCells = new TrayCellsStatusDto() |
| | | //{ |
| | | // Software = "WMS", |
| | | // TrayBarcode = input.PalletCode, |
| | | // //EquipmentCode = "EQ_CWJZ01" |
| | | // EquipmentCode = input.EquiCodeMOM |
| | | //}; |
| | | //创建一个TrayCellsStatusDto对象,并赋值 |
| | | TrayCellsStatusDto trayCells = new TrayCellsStatusDto() |
| | | { |
| | | Software = "WMS", |
| | | TrayBarcode = input.PalletCode, |
| | | //EquipmentCode = "EQ_CWJZ01" |
| | | EquipmentCode = input.EquiCodeMOM |
| | | }; |
| | | |
| | | //// 调用GetTrayCellStatusAsync方法,获取整盘电芯 |
| | | //content = await GetTrayCellStatusAsync(trayCells); |
| | | //// 如果状态为false,则返回content |
| | | //if (!content.Status) return content; |
| | | // 调用GetTrayCellStatusAsync方法,获取整盘电芯 |
| | | content = await GetTrayCellStatusAsync(trayCells); |
| | | // 如果状态为false,则返回content |
| | | if (!content.Status) return content; |
| | | |
| | | //// 添加组盘信息 |
| | | //// 将content.Data转换为ResultTrayCellsStatus对象 |
| | | //var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString()); |
| | | //if (result.SerialNos.Count <= 0) |
| | | // return content.Error(result.MOMMessage); |
| | | // 添加组盘信息 |
| | | // 将content.Data转换为ResultTrayCellsStatus对象 |
| | | var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString()); |
| | | if (result.SerialNos.Count <= 0) |
| | | return content.Error(result.MOMMessage); |
| | | |
| | | //Console.WriteLine(result); |
| | | //// TODO 获取本地料框属性与整盘电芯属性获取的值进行对比,如果一致则继续,否则返回错误信息 |
| | |
| | | //// return content.Error("料框属性不存在"); |
| | | |
| | | //// 调用CreateBoxingInfo方法,创建组盘信息 |
| | | |
| | | //var boxing = await CreateBoxingInfo(result, input.PalletCode); |
| | | //if (boxing == null) return content.Error("组盘失败"); |
| | | var boxing = CreateBoxingInfo(result, input.PalletCode); |
| | | if (boxing == null) return content.Error("组盘失败"); |
| | | |
| | | //// 调用GetProcessApplyAsync方法,获取工艺路线 |
| | | //ProcessApplyDto process = await GetProcessApplyAsync(input, result); |
| | |
| | | ////var processResponse = await GetProcessResponseAsync(process, input.Position); |
| | | // 调用CreateNewTask方法,创建新任务 |
| | | content = await CreateNewTask(input); |
| | | //if (content.Status) |
| | | //{ |
| | | // var isBox = await _boxingInfoRepository.AddDataNavAsync(boxing); |
| | | //} |
| | | if (content.Status) |
| | | { |
| | | var isBox = await _boxingInfoRepository.AddDataNavAsync(boxing); |
| | | } |
| | | } |
| | | catch (Exception err) |
| | | { |