renmingwang
2026-03-30 2a21c41c5a700641eb2f0ac2437144eeac94ff1c
修改移库获取分配货位方法,修改taskstate的字段值不匹配问题
已修改2个文件
49 ■■■■■ 文件已修改
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -831,28 +831,42 @@
        public Dt_Task RequestWMSTaskMovelibrary(Dt_Task _Task)
        {
            WebResponseContent content = new WebResponseContent();
            content = HttpHelperh.Get<WebResponseContent>($"{urlWMSMovelibraryTask}?TaskNum={_Task.TaskNum}");
            Dt_Task task = new Dt_Task();
            if (content.Status)
            try
            {
                if (content.Data != null)
                content = HttpHelperh.Get<WebResponseContent>($"{urlWMSMovelibraryTask}?TaskNum={_Task.TaskNum}");
                Dt_Task task = new Dt_Task();
                if (content.Status)
                {
                    task = JsonConvert.DeserializeObject<Dt_Task>(content.Data.ToString());
                    if (task.TaskNum != _Task.TaskNum)
                    if (content.Data != null)
                    {
                        task.Grade = 3;
                        BaseDal.AddData(task);
                        return task;
                    }
                    else
                    {
                        return _Task;
                        //task = JsonConvert.DeserializeObject<Dt_Task>(content.Data.ToString());
                        WMSTaskDTO dto = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString());
                        if (dto != null)
                        {
                            // è½¬æ¢ä¸ºDt_Task
                            task = _mapper.Map<Dt_Task>(dto);
                            task.TaskState = dto.TaskStatus;
                            if (task.TaskNum != _Task.TaskNum)
                            {
                                task.Grade = 3;
                                BaseDal.AddData(task);
                                return task;
                            }
                            else
                            {
                                return _Task;
                            }
                        }
                    }
                }
                return null;
            }
            return null;
            catch (Exception ex)
            {
                Console.WriteLine($"移库操作异常:{ex.Message}");
                return null;
            }
        }
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -178,7 +178,8 @@
                    if (dt_Stock == null) return content.Error($"货位编号:{Locatask}的浅货位库存异常,请检查!!!");
                    //进行获取新的库位
                    Dt_LocationInfo? Nextlocation = _basicService.LocationInfoService.GetLocation(DeepLocation.RoadwayNo);//获取到新库位
                    //Dt_LocationInfo? Nextlocation = _basicService.LocationInfoService.GetLocation(DeepLocation.RoadwayNo);//获取到新库位
                    Dt_LocationInfo? Nextlocation = _basicService.LocationInfoService.GetLocationSC01(DeepLocation.RoadwayNo);//获取到新库位
                    if (Nextlocation == null)
                    {
                        return content.Error($"货位分配失败,未找到可分配货位");