wangxinhui
2025-12-31 edc7293bf81729ebaa2d7cdd9a1f3aeaf567f538
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Completed.cs
@@ -13,6 +13,7 @@
using WIDESEA_Core;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.Task;
using WIDESEA_External.Model;
using WIDESEA_Model.Models;
namespace WIDESEA_TaskInfoService
@@ -34,7 +35,7 @@
                }
                else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                {
                    return await Task.FromResult(RelocationTaskCompleted(task));
                    return await Task.FromResult(OutboundTaskCompleted(task));
                }
                else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
                {
@@ -98,11 +99,33 @@
                Dt_Task wmsTask = BaseDal.QueryFirst(x=>x.TaskNum == task.TaskNum);
                if (wmsTask != null)
                {
                    wmsTask.PalletCode= task.PalletCode;
                    wmsTask.Roadway = task.Roadway;
                    wmsTask.TaskStatus = task.TaskState;
                    wmsTask.CurrentAddress = task.CurrentAddress;
                    wmsTask.NextAddress = task.NextAddress;
                    wmsTask.Dispatchertime = task.Dispatchertime;
                    wmsTask.TaskType = task.TaskType;
                    wmsTask.TargetAddress = task.TargetAddress;
                    BaseDal.UpdateData(wmsTask);
                    if (wmsTask.TaskType>=TaskTypeEnum.WFBYLInbound.ObjToInt() && wmsTask.TaskType <= TaskTypeEnum.PrintYLInbound.ObjToInt() && wmsTask.TaskStatus==TaskStatusEnum.AGV_TakeFinish.ObjToInt())
                    {
                        Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x=>x.PalletCode== wmsTask.PalletCode);
                        string request = _invokeERPService.ERPSemiProInUp(
                            new ERPProInUpModel()
                            {
                                PB_INV_PRODUCT_IN = new List<PB_INV_PRODUCT_INItem>()
                                {
                                    new PB_INV_PRODUCT_INItem()
                                    {
                                        WP_ID = 0,
                                        INV_BARCODE = wmsTask.PalletCode,
                                        REMARK = "半成品入库",
                                        QTY=(int)stockInfo.StockLength
                                    }
                                }
                            }) ?? throw new Exception("半成品入库接口请求失败");
                    }
                }
                return WebResponseContent.Instance.OK();
            }
@@ -120,7 +143,7 @@
        {
            try
            {
                Dt_ApiInfo? url = _apiInfoRepository.QueryData(x => x.ApiCode == APIEnum.FeedBackWCSTaskCompleted.ToString()).First();
                Dt_ApiInfo? url = _basicRepository.ApiInfoRepository.QueryData(x => x.ApiCode == APIEnum.FeedBackWCSTaskCompleted.ToString()).First();
                string? apiAddress = url.ApiAddress;
                if (string.IsNullOrEmpty(apiAddress))
                {