分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-04-16 e883d7e4bf057f7a2ed7cc001fe27083d82baa22
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/RestockHCJ.cs
@@ -9,12 +9,14 @@
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Entity.ToAGV;
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.Repositories;
using WIDESEA_WCS.WCSClient;
using WIDESEA_WMS.IRepositories;
using WIDESEA_WMS.IServices;
using WIDESEA_WMS.Repositories;
using static FreeSql.Internal.GlobalFilter;
namespace WIDESEA_WCS.JobsPart.Common
{
@@ -100,6 +102,27 @@
                            #endregion
                        }
                    }
                    else if (task.agv_tasktype == "TaskType_OutsourceInbound")//下料去外协口
                    {
                        if (task.agv_toaddress == "")
                        {
                            var TargetLocation = StationTask.GetEmptyLocation(stationinfoRepository);
                            if (TargetLocation != null)
                            {
                                if (agvtaskService.Find(x => x.agv_toaddress == TargetLocation.stationCode).Any()) continue;
                                var stationinfo = stationinfoRepository.Find(x => x.stationCode == task.agv_fromaddress).FirstOrDefault();
                                task.agv_taskstate = "Create";
                                task.agv_toaddress = TargetLocation.stationCode;
                                TargetLocation.location_state = LocationStateEnum.InBusy.ToString();
                                TargetLocation.billetID = stationinfo.billetID;
                                TargetLocation.stationType = task.agv_materielid;
                                TargetLocation.heatNumber = stationinfo.heatNumber;
                                TargetLocation.Number = task.jobID;
                                stationinfoRepository.Update(TargetLocation, true);
                                agvtaskService.Update(task, true);
                            }
                        }
                    }
                    else if (task.agv_tasktype == "TaskType_OutsourceOutbound" || task.agv_tasktype == "TaskType_Outbound")//外协库出库/AB库出库
                    {
                        if (task.agv_toaddress == "")