wangxinhui
2 天以前 6d3ea08855337c0cfcc60df2903d3431611c7097
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/Ò»ÆÚÏßÌå/ConveyorLineJob1.cs
@@ -44,7 +44,8 @@
        private readonly IRouterRepository _routerRepository;
        private readonly IRouterService _routerService;
        private readonly IRouterExtension _routerExtension;
        private static string BarCode1 = "";
        private static string BarCode2 = "";
        public ConveyorLineJob1(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension)
        {
            _cacheService = cacheService;
@@ -90,6 +91,8 @@
                                //上报WMS料箱到达
                                if (pickBarCode.IsNotEmptyOrNull())
                                {
                                    if (device.DeviceCode == "CL1" && BarCode1!= pickBarCode)
                                    {
                                    WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode);
                                    if (content.Status)
                                    {
@@ -98,6 +101,21 @@
                                    else
                                    {
                                        WriteError(device.DeviceCode, $"{station.PickStationCode}拣选申请上报WMS错误{pickBarCode},信息{content.Message}");
                                        }
                                        BarCode1 = pickBarCode;
                                    }
                                    if (device.DeviceCode == "CL2" && BarCode1 != pickBarCode)
                                    {
                                        WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode);
                                        if (content.Status)
                                        {
                                            WriteInfo(device.DeviceCode, $"{station.PickStationCode}拣选申请上报成功{pickBarCode}");
                                        }
                                        else
                                        {
                                            WriteError(device.DeviceCode, $"{station.PickStationCode}拣选申请上报WMS错误{pickBarCode},信息{content.Message}");
                                        }
                                        BarCode2 = pickBarCode;
                                    }
                                }
                                else
@@ -115,7 +133,7 @@
                            if (InTake==256 && InBarCode.IsNotEmptyOrNull())
                            {
                                //申请入库任务
                                Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == InBarCode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt() && x.TaskState != TaskStatusEnum.CL_Executing.ObjToInt());
                                Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == InBarCode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt() && x.TaskState != TaskStatusEnum.CL_Executing.ObjToInt() && x.DeviceCode==device.DeviceCode);
                                if (task != null) continue;
                                WebResponseContent content = _taskService.RequestInTask(station.StationCode, InBarCode);