肖洋
2024-12-10 01ba2e2affa33320ef8aca6e033248388bb8f60e
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -96,7 +96,8 @@
                    var tokenInfos = _cacheService.Get<List<UserInfo>>("Cache_UserToken");
                    if (tokenInfos == null || !tokenInfos.Any())
                    {
                        throw new Exception(commonStackerCrane.DeviceName + "缓存中未找到Token缓存");
                        //throw new Exception(commonStackerCrane.DeviceName + "缓存中未找到Token缓存");
                        return Task.CompletedTask;
                    }
                    var userTokenIds = tokenInfos?.Select(x => x.Token_ID).ToList();
                    var userIds = tokenInfos?.Select(x => x.UserId).ToList();
@@ -151,7 +152,15 @@
                        if (device != null)
                        {
                            CommonConveyorLine_GW conveyorLine = (CommonConveyorLine_GW)device;
                            conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, task.PalletCode, task.TargetAddress);
                            var isResult = conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, task.PalletCode, task.TargetAddress);
                            if (!isResult)
                            {
                                var result = conveyorLine.GetValue<ConveyorLineDBName_After, string>(ConveyorLineDBName_After.ConveyorLineBarcode, task.TargetAddress);
                                if(result!= task.PalletCode)
                                {
                                    conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, task.PalletCode, task.TargetAddress);
                                }
                            }
                        }
                        else
                            return;