コード例 #1
0
        public override bool AtWork()
        {
            apiManager = new ApiManager();

            int fileVerId = GetLastConversionFileVerId();
            if (fileVerId > 0)
            {
                EDoc2.Document.IEDoc2FileVer fileVer;
                apiManager.Api.DocumentManagement.GetFileVerById(fileVerId, out fileVer);
                int excpetTime = ComputeConversionTime(fileVer.File_Size);
                LogManagement.Log.Info(string.Format("正在转档版本文件:名称:{0}, 版本ID:{1}, 大小:{2}M, {3}分钟后将判断是否转档成功。",
                    fileVer.File_VerName, fileVer.File_VerId, fileVer.File_Size / 1024.0 / 1024.0, excpetTime));
                Thread.Sleep(1000 * 60 * excpetTime);
                bool exist = ExistConversionFileVerId(fileVerId);
                if (exist)
                {
                    LogManagement.Log.Info("转档失败");
                    return false;
                }
                else
                {
                    LogManagement.Log.Info("转档成功");
                    return true;
                }
            }
            return true;
        }
コード例 #2
0
 public EDoc2ConversionServiceDataRepairer()
     : base()
 {
     _apiManager = new ApiManager();
 }