分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-05-25 a1c916e4b05662b45d437c02db4effd40abe6296
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/HandleTask.cs
@@ -167,7 +167,8 @@
            if (task.agv_taskstate == AGVTaskStateEnum.Complete1.ToString())
            {
            var station2 = stationinfoRepository.FindFirst(t => t.stationCode == task.agv_toaddress);
                var station2 = stationinfoRepository.FindFirst(t => t.stationCode == task.agv_toaddress);
                if (station2 == null) throw new Exception("未找到终点地址!");
                ////空托任务需修改逻辑
                if (station2.stationCode.Contains("X"))
                    station2.quantity = 0;// task.agv_tasktype.Contains("TaskType_EmptyPallet") ? 0 : task.agv_qty; //task.agv_qty;
@@ -187,7 +188,8 @@
            }
            else if (task.agv_taskstate == AGVTaskStateEnum.Complete.ToString())
            {
            var station1 = stationinfoRepository.FindFirst(t => t.stationCode == task.agv_fromaddress);
                var station1 = stationinfoRepository.FindFirst(t => t.stationCode == task.agv_fromaddress);
                if (station1 == null) throw new Exception("未找到起点地址!");
                #region MyRegion
                //if (station1.stationCode.Contains("S"))
                //    station1.quantity = 0;
@@ -225,7 +227,8 @@
                    //if (!station1.stationCode.Contains("X") && !station1.stationCode.Contains("S") && !station1.stationCode.Contains("W01001004") && !station1.stationCode.Contains("W01001005"))
                    //    station1.tray_type = string.Empty;
                }
                station1.lastUpdateTime = DateTime.Now;
                if (!station1.stationCode.Contains("DD"))
                    station1.lastUpdateTime = DateTime.Now;
                stationinfoRepository.Update(station1, true);
            }
        }