示例#1
0
        /// <summary>
        /// 客户端下载文件生成处理
        /// </summary>
        /// <param name="yljgbm"></param>
        /// <param name="czList"></param>
        /// <returns></returns>
        public string downLoadFileCreate(string rndPrefix, string yljgbm, string czList, string dataType)
        {
            //lock (locker)
            //{
            string functionName = "downLoadInfoByParm";

            try
            {
                //2017-08-24 mq添加,用于判断时间间隔
                //if (CheckDownloadDataExpire.CanDirectDownload(GetDownloadDirPath(), dataType, GetInterval(), yljgbm))
                //{
                //    return CheckDownloadDataExpire.GetDownloadFilePath(dataType, yljgbm);
                //}
                DoServiceNew doservicenew = new DoServiceNew();
                string       resultStr    = doservicenew.DoDownLoadInfo(rndPrefix, yljgbm, czList, dataType);

                ////将生成的文件对应的保存到静态变量中
                //CheckDownloadDataExpire.AddDownloadInfo(new DownloadInfo(resultStr, dataType, yljgbm));

                //日志处理
                TxtLogger.Debug(string.Format("{0}:[{1}{2}]:[{3}]", functionName, yljgbm, "数据下载结束", resultStr));
                return(resultStr);
            }
            catch (Exception ex)
            {
                TxtLogger.Error(string.Format("{0}:[{1}{2}]:[{3}]", functionName, yljgbm, "数据下载错误", ex.Message));
                throw new Exception(string.Format("{1}:处理异常:{0}", ex.Message, functionName));
            }
            //}
        }
示例#2
0
        public string downLoadInfoByParm_upload(string rndPrefix, string yljgbm, string czList, string dataType)
        {
            string resultStr = "";

            try
            {
                DoServiceNew doservicenew = new DoServiceNew();
                resultStr = doservicenew.DoDownLoadInfo_create(rndPrefix, yljgbm, czList, dataType);
            }
            catch (Exception ex)
            {
                return(string.Format("0-{0}-{1}", "DoFileThread_create", ex.Message));
            }
            return(resultStr);
        }