dengjunjie
2026-03-06 80f2457f459b32054543b05d7856c40e4c51e664
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -81,7 +81,7 @@
            _hKLocationInfoService = hKLocationInfoService;
            _apiInfoService = apiInfoService;
            _trackloginfoService = trackloginfoService;
            _stationMangerService=stationMangerService;
            _stationMangerService = stationMangerService;
        }
        public WebResponseContent ReceiveWMSTask([NotNull] List<WMSTasksDTO> taskDTOs)
        {
@@ -1044,8 +1044,10 @@
        /// <exception cref="NotImplementedException"></exception>
        public WebResponseContent IQCResult(IQCResultDTO iQC)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                #region å®¹å™¨ä¸Šæž¶
                Dt_StationManger stationManger = _stationMangerService.Repository.QueryFirst(x => x.StationCode == iQC.StationCode) ?? throw new Exception($"未找到站台【{iQC.StationCode}】信息");
                Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(FOURBOToccupyStation)) ?? throw new Exception("未找到站点容器上架接口配置信息!请检查接口配置");
                FOURBOToccupyStation fOURBOToccupyStation = new FOURBOToccupyStation()
@@ -1056,6 +1058,32 @@
                string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOToccupyStation.Serialize());
                FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
                if (fOURBOTReturn.returnCode != 0) throw new Exception(fOURBOTReturn.returnUserMsg);
                #endregion
                #region åˆ›å»ºå››å‘车任务
                var task = BaseDal.QueryFirst(x => x.PalletCode == iQC.ContainerCode && x.SourceAddress == iQC.StationCode && x.TaskState == (int)TaskStatusEnum.New);
                #endregion
                #region å‘¼å«å››å‘车
                apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(FOURBOTnewMovePodTask)) ?? throw new Exception("未找到四向车任务下发接口配置信息!请检查接口配置");
                FOURBOTnewMovePodTask fOURBOTnewMovePodTask = new()
                {
                    priority = task.Grade,
                    podID = task.PalletCode,
                    //desNodeID = task.SourceAddress,
                    desExt = new
                    {
                        unload = 0//是否放下容器,0否1是
                    },
                    desStationCodes = task.SourceAddress,
                    desType = 5
                };
                response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize());
                fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
                content.Data = fOURBOTReturn;
                if (fOURBOTReturn.returnCode != 0) throw new Exception(fOURBOTReturn.returnUserMsg);
                task.TaskState = (int)TaskStatusEnum.Execut;
                BaseDal.UpdateData(task);
                #endregion
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)