| | |
| | | { |
| | | VOLContext context = new VOLContext(); |
| | | Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(context); |
| | | var station1 = stationinfoRepository.FindFirst(t => t.stationCode == task.agv_fromaddress); |
| | | var station2 = stationinfoRepository.FindFirst(t => t.stationCode == task.agv_toaddress); |
| | | |
| | | if (task.agv_taskstate == AGVTaskStateEnum.Complete1.ToString()) |
| | | { |
| | | 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; |
| | |
| | | } |
| | | else if (task.agv_taskstate == AGVTaskStateEnum.Complete.ToString()) |
| | | { |
| | | 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; |
| | |
| | | //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); |
| | | } |
| | | } |