From 959aa7cefa8f416452444160cdd4edbea2cadae7 Mon Sep 17 00:00:00 2001 From: wanshenmean <cathay_xy@163.com> Date: 星期四, 07 十一月 2024 16:53:45 +0800 Subject: [PATCH] 合并冲突 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 36 ++++++++++++++++++++++++------------ 1 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs index 4529a37..db6dbf3 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs @@ -595,10 +595,20 @@ try { + + // 璋冪敤BaseDal.QueryFirstAsync鏂规硶锛屾煡璇换鍔� + var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == input.PalletCode); + if (task != null) + { + content = await UpdateExistingTask(input, task); + return content; + } // 鍒涘缓涓�涓猅rayCellsStatusDto瀵硅薄锛屽苟璧嬪�� TrayCellsStatusDto trayCells = new TrayCellsStatusDto() { - TrayBarcode = input.PalletCode + Software = "WMS", + TrayBarcode = input.PalletCode, + EquipmentCode = "ECH001-B" }; // 璋冪敤GetTrayCellStatusAsync鏂规硶锛岃幏鍙栨暣鐩樼數鑺� @@ -608,7 +618,7 @@ // 娣诲姞缁勭洏淇℃伅 // 灏哻ontent.Data杞崲涓篟esultTrayCellsStatus瀵硅薄 - var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.ToString()); + var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString()); var boxing = await CreateBoxingInfo(result, input.PalletCode); // 璋冪敤GetProcessApplyAsync鏂规硶锛岃幏鍙栧伐鑹鸿矾绾� @@ -620,8 +630,6 @@ // 璋冪敤GetProcessResponseAsync鏂规硶锛岃幏鍙栧伐鑹哄搷搴� var processResponse = await GetProcessResponseAsync(process, input.Position); - // 璋冪敤BaseDal.QueryFirstAsync鏂规硶锛屾煡璇换鍔� - var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == input.PalletCode); // 濡傛灉task涓嶄负null锛屽垯璋冪敤UpdateExistingTask鏂规硶锛屾洿鏂颁换鍔★紱鍚﹀垯璋冪敤CreateNewTask鏂规硶锛屽垱寤烘柊浠诲姟 content = task != null ? await UpdateExistingTask(input, task) : await CreateNewTask(processResponse, input); if (content.Status) @@ -659,7 +667,7 @@ SerialNumber = serialNoObj.SerialNo, OrderNo = serialNoObj.PositionNo.ToString(), Status = serialNoObj.SerialNoStatus, - MaterielCode = result.BindCode, + MaterielCode = serialNoObj.BindCode, Remark = result.TrayBarcodePropertys.ToJsonString(), }).ToList() }; @@ -671,6 +679,8 @@ // 鍒涘缓涓�涓狿rocessApplyDto瀵硅薄锛屽苟璧嬪�� return new ProcessApplyDto() { + EquipmentCode = "ECH001-B", + Software = "WMS", //WipOrderNo = result.BindCode, SerialNos = content.SerialNos.Select(item => new SerialNos { @@ -697,13 +707,13 @@ { case "1088": return SqlSugarHelper.Db.Queryable<Dt_EquipmentProcess>() - .Where(x => x.EquipmentType == "闄堝寲" && x.WipOrderNo == apply.WipOrderNo && x.ProductDesc == apply.ProductNo) + .Where(x => x.EquipmentType == "闄堝寲" && x.WipOrderNo == apply.WipOrderNo || x.ProductDesc == apply.ProductNo) .ToList(); case "1339": case "1406": return SqlSugarHelper.Db.Queryable<Dt_EquipmentProcess>() - .Where(x => x.EquipmentType == "闈欑疆" && x.WipOrderNo == apply.WipOrderNo && x.ProductDesc == apply.ProductNo) + .Where(x => x.EquipmentType == "闈欑疆" && x.WipOrderNo == apply.WipOrderNo || x.ProductDesc == apply.ProductNo) .ToList(); default: @@ -1235,6 +1245,8 @@ isUpdateStock = await _stockInfoRepository.AddDataNavAsync(stock); } + + // 娣诲姞鍘嗗彶浠诲姟 var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0; @@ -1387,15 +1399,15 @@ // 鍒涘缓WMS浠诲姟 WMSTaskDTO taskDTO = new WMSTaskDTO() { - TaskNum = 0, + TaskNum = task.TaskNum.Value, Grade = 1, - PalletCode = DateTime.Now.ToString("MMddHHmmss"), + PalletCode = task.PalletCode, RoadWay = task.Roadway, - SourceAddress = input.Position, + SourceAddress = task.SourceAddress, TargetAddress = task.Roadway, - TaskState = (int)TaskInStatusEnum.InNew, + TaskState = task.TaskState.Value, Id = 0, - TaskType = (int)TaskInboundTypeEnum.Inbound, + TaskType = task.TaskType, }; content.OK(data: taskDTO); } -- Gitblit v1.9.3