刘磊
2024-11-26 00bf7fd07edc7f23c29c00c1193f55defb88b71d
分容组盘 电芯属性获取
已修改1个文件
47 ■■■■ 文件已修改
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -386,25 +386,25 @@
                }
            }
            // 创建一个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 获取本地料框属性与整盘电芯属性获取的值进行对比,如果一致则继续,否则返回错误信息
@@ -413,9 +413,8 @@
            ////    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);
@@ -433,10 +432,10 @@
            ////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)
        {