wangxinhui
10 天以前 34de141a574a430527a210394359c1199ccde7a3
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Ô­ÁÏ¿â/ConveyorLineJob_YL2ndFloor.cs
@@ -154,6 +154,8 @@
        {
            conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode);
            conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taskCommand.TargetAddress, childDeviceCode);
            conveyorLine.SetValue(ConveyorLineDBName.Weight, taskCommand.Weight, childDeviceCode);
            conveyorLine.SetValue(ConveyorLineDBName.Barcode, taskCommand.Barcode, childDeviceCode);
            conveyorLine.SetValue(ConveyorLineDBName.ResponState, 86, childDeviceCode);
            for (int i = 0; i < 6; i++)
@@ -161,7 +163,7 @@
                ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(childDeviceCode);
                if (command != null)
                {
                    if ( command.TaskNum == taskCommand.TaskNum && command.TargetAddress == taskCommand.TargetAddress)
                    if (command.TaskNum == taskCommand.TaskNum && command.TargetAddress == taskCommand.TargetAddress && command.Weight == taskCommand.Weight && command.Barcode == taskCommand.Barcode)
                    {
                        WriteInfo(conveyorLine.DeviceName, $"时间:【{DateTime.Now}】写入任务成功写入次数{i}写入任务【{JsonConvert.SerializeObject(taskCommand)}】");
                        return true;
@@ -171,6 +173,16 @@
                        conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode);
                        Thread.Sleep(100);
                    }
                    if (command.Barcode != taskCommand.Barcode)
                    {
                        conveyorLine.SetValue(ConveyorLineDBName.Barcode, taskCommand.Barcode, childDeviceCode);
                        Thread.Sleep(100);
                    }
                    if (command.TaskNum != taskCommand.TaskNum)
                    {
                        conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode);
                        Thread.Sleep(100);
                    }
                    if (command.TargetAddress != taskCommand.TargetAddress)
                    {
                        conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taskCommand.TargetAddress, childDeviceCode);