| | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 随机生成1-10000的PLC任务号 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static string CreatePlcTaskId() |
| | | { |
| | | int iSeed = 10000; |
| | | return new Random(Guid.NewGuid().GetHashCode()).Next(1, iSeed).ToString(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 创建输送线任务号,随机生成(1, 3000)的PLC任务号 |
| | | /// </summary> |
| | |
| | | //从101-9999,为什么要从101开始,因为1-100作为手动任务下发。【EditBy shaocx,2022-05-10】 |
| | | return new Random(Guid.NewGuid().GetHashCode()).Next(101, iSeed).ToString(); |
| | | } |
| | | |
| | | public static string CreatePlcTaskId() |
| | | { |
| | | int iSeed = 9999; |
| | | //从101-9999,为什么要从101开始,因为1-100作为手动任务下发。【EditBy shaocx,2022-05-10】 |
| | | return new Random(Guid.NewGuid().GetHashCode()).Next(101, iSeed).ToString(); |
| | | } |
| | | } |
| | | } |