服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-09-25 0fdb04b7c451d7c59b226c25425722afd3364916
Tiger.Business.MES/Common/WorkStep.cs
@@ -28,6 +28,9 @@
        #region Propertys & Variables
        public string ID { get; set; } = Guid.NewGuid().ToString("N");
        public string Name { get; set; }
        private DateTime BeginAt;
        private DateTime EndAt;
        public TimeSpan ElapsedTime => EndAt - BeginAt;
        public IWorkStep.NodeTypes NodeType { get; set; }
        public MES_WO_NODE Node { get; set; }
        public MES_WO_OPER OperSetting { get; set; }
@@ -75,6 +78,7 @@
        /// <returns></returns>
        public ApiAction<SubmitOutput> TryBegin(SubmitInput input)
        {
            BeginAt = DateTime.Now;
            return CurAction.TryBegin(input);
        }
@@ -103,7 +107,18 @@
        /// <returns></returns>
        public ApiAction<SubmitOutput> End(SubmitInput input)
        {
            return CurAction.End(input);
            var result = CurAction.End(input);
            EndAt = DateTime.Now;
            return result;
        }
        /// <summary>
        /// 获取工步当前耗时
        /// </summary>
        /// <returns></returns>
        public TimeSpan GetElapsedTime()
        {
            return DateTime.Now - BeginAt;
        }
        /// <summary>