1
HuBingJie
8 天以前 5da3a276b7847187a7c155ee069d3cd4c9e58074
´úÂë¹ÜÀí/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SpeStackerCraneJob/SpeStackerCraneJob.cs
@@ -20,6 +20,7 @@
using WIDESEA_Common.Log;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_DTO.Enum;
using WIDESEAWCS_ISystemServices;
@@ -48,15 +49,19 @@
        private readonly ITaskRepository _taskRepository;
        private readonly IRouterService _routerService;
        private readonly IAgvStationService _agvStationService;
        IRepository<AbnormalTask> _abnormalTask;
        IRgvoperainformService _rgvoperainformService;
        public SpeStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IAgvStationService agvStationService)
        public SpeStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IAgvStationService agvStationService, IRepository<AbnormalTask> abnormalTask, IRgvoperainformService rgvoperainformService)
        {
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
            _taskRepository = taskRepository;
            _routerService = routerService;
            _agvStationService = agvStationService;
            _abnormalTask = abnormalTask;
            _rgvoperainformService = rgvoperainformService;
        }
@@ -70,6 +75,9 @@
                if (speStackerCrane != null)
                {
                    GetStackerObject getStackerObject = new GetStackerObject(speStackerCrane);
                    _rgvoperainformService.LogAlarmToDatabase(speStackerCrane.DeviceCode);
                    if (getStackerObject.RGVInitializationValue == RGVInitialize.Initialized)
                    {
@@ -160,7 +168,17 @@
            }
            else if (getStackerObject.StaclerkJobJobStatusValue == RGV_Rgvtaskstutas.AbnormalCompletion && getStackerObject.CurrentRgvtaskid != 0 && getStackerObject.CurrentRgvtaskid != 30001)
            {
                string ErrorContent = RgvOperationService.AQMReadAlarminform();
                if (ErrorContent != null && ErrorContent != "")
                {
                    _abnormalTask.AddData(new AbnormalTask
                    {
                        TaskNum = getStackerObject.CurrentRgvtaskid,
                        ErrorContent = ErrorContent,
                        CreateDate = DateTime.Now,
                        Creater = "system",
                    });
                }
                //修改任务状态为异常完成                                              
                _taskService.HandleInAbnormal(getStackerObject.CurrentRgvtaskid);   
@@ -302,7 +320,7 @@
                }
                else if (getStackerObject.RGVCurrentlocation == RGVTaskdevice.WaitmomentTwo)    //则需要判断两个母车的位子
                {
                    //判断两个子车是否在堆垛机取货口
                    //判断两个母车是否在堆垛机取货口
                    //母车1
                    var mu1rgv = _agvStationService.GetMothervehicle(RGVTaskdevice.MotherCarDeviceCode);
@@ -642,7 +660,7 @@
                    => Findshippingtask(RGVTaskdevice, getStackerObject.RGVCurrentlocation),    //子车取货后,进行放货(已完成)
                ((int)RGVEquipment.OutRGVForklift, RgvEquipmentStatus.NoCargo)
                    => OutboundGateVehicle(RGVTaskdevice),              //出库口RGV取货(已完成)
                    => OutboundGateVehicle(RGVTaskdevice),          //出库口RGV取货(已完成)
                ((int)RGVEquipment.OutRGVForklift, RgvEquipmentStatus.HasCargo)
                    => _taskService.GetOutkouFinhuoTask(RGVTaskdevice.ChildPosiDeviceCode,