schangxiang@126.com
2025-04-01 de7dbe7cf85aa01abb64040aae1c04dfba74c135
CC/iWareCommon/BusinessHelper/BusinessHelper.cs
@@ -111,15 +111,7 @@
        }
        /// <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>
@@ -135,9 +127,16 @@
        /// <returns></returns>
        public static string CreatePlcTaskIdForSrmTask()
        {
            int iSeed = 99999;
            int iSeed = 9999;
            //从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(100, iSeed).ToString();
        }
    }
}