/// <summary>
        /// 插入附件信息
        /// </summary>
        /// <param name="rm">附件id</param>
        /// <param name="db"></param>
        private void insertAppendix(AppendixModel am, JSZX_ResourceEntities db)
        {
            T_Res_Appendix tra = new T_Res_Appendix();

            tra.ID                = am.Id;
            tra.RES_ID            = am.Res_Id;
            tra.FILE_NAME         = am.FileName;
            tra.UPLOAD_TIME       = am.GetUploadTime();
            tra.AUTHOR            = am.Author;
            tra.ACTIVE_TIME_START = am.GetStartTime();
            tra.ACTIVE_TIME_END   = am.GetEndTime();
            tra.IS_FOREVER        = am.getIsForever();

            tra.CREATEID   = am.CreateId;
            tra.CREATETIME = DateTime.Now;

            tra.DEL_FLG  = "0";
            tra.FILE_URL = am.FileUrl;
            tra.TYPE_FLG = am.TypeFlg;

            db.T_Res_Appendix.Add(tra);

            T_ToChange change = new T_ToChange();

            change.ID             = Guid.NewGuid().ToString();
            change.FileName       = am.Id;
            change.SourceFilePath = am.FileUrl;
            change.TargetFilePath = Constant.DISK_ADDRESS + Constant.UPLOADDIRECTORY + "\\" + Constant.SWFDIRECTORY;

            string sql = "update JSZX_Resource.dbo.T_Res_Appendix set READ_URL=@TargetFilePath,[IMAGE]=@FileFirstImg,[PAGECOUNT]=@PageCount where ID='" + am.Id + "'";

            change.RetSql   = sql;
            change.TaskTime = DateTime.Now;

            db.T_ToChange.Add(change);
        }
        /// <summary>
        /// 大文件上传数据保存
        /// </summary>
        /// <param name="model"></param>
        /// <param name="db"></param>
        /// <returns></returns>
        public Boolean JavaUploadSaveData(JavaUploadModel model, JSZX_ResourceEntities db)
        {
            try
            {
                #region 资源
                T_Resource rModel = new T_Resource();
                rModel.ID            = model.ID;
                rModel.NAME          = model.Name;
                rModel.TYPE_ID       = model.TypeID;
                rModel.INTRODUCTION  = model.Introduction;
                rModel.LABEL         = model.Label;
                rModel.NOTE          = model.Note;
                rModel.STATUS        = "0";
                rModel.DEL_FLG       = "0";
                rModel.ORIGIN_FLG    = "1";
                rModel.SHARE_FLG     = "1";
                rModel.EXCELLENT_FLG = "0";
                rModel.CREATEID      = model.CreateID;
                rModel.CREATETIME    = DateTime.Now;
                db.T_Resource.Add(rModel);
                #endregion

                #region 附件
                if (model.FileUrl != null && model.FileUrl.Length > 0)
                {
                    #region 循环插入附件
                    for (int i = 0; i < model.FileUrl.Length; i++)
                    {
                        string path     = model.FileUrl[i];
                        string fileType = Constant.GetFileType(System.IO.Path.GetExtension(path));
                        string fileID   = System.IO.Path.GetFileNameWithoutExtension(path);

                        T_Res_Appendix aModel = new T_Res_Appendix();
                        aModel.ID                = fileID;
                        aModel.RES_ID            = model.ID;
                        aModel.FILE_NAME         = model.FileName[i];
                        aModel.UPLOAD_TIME       = DateTime.Now;
                        aModel.AUTHOR            = model.Author;
                        aModel.ACTIVE_TIME_START = StringToDateTime(model.ActiveTimeStart);
                        aModel.ACTIVE_TIME_END   = StringToDateTime(model.ActiveTimeEnd);
                        aModel.CREATEID          = model.CreateID;
                        aModel.CREATETIME        = DateTime.Now;
                        aModel.DEL_FLG           = "0";
                        aModel.FILE_URL          = path;
                        aModel.TYPE_FLG          = fileType;
                        aModel.IS_FOREVER        = model.isForever == "1" ? true : false;
                        db.T_Res_Appendix.Add(aModel);

                        #region 转换任务
                        T_ToChange change = new T_ToChange();
                        change.ID             = Guid.NewGuid().ToString();
                        change.FileName       = fileID;
                        change.SourceFilePath = path;
                        change.TargetFilePath = Constant.DISK_ADDRESS + Constant.UPLOADDIRECTORY + "\\" + Constant.SWFDIRECTORY;
                        string sql = "update JSZX_Resource.dbo.T_Res_Appendix set READ_URL=@TargetFilePath,[IMAGE]=@FileFirstImg,[PAGECOUNT]=@PageCount where ID='" + fileID + "'";
                        change.RetSql   = sql;
                        change.TaskTime = DateTime.Now;
                        db.T_ToChange.Add(change);
                        #endregion
                    }
                    #endregion
                    db.SaveChanges();
                    return(true);
                }
                else
                {
                    clsLog.ErrorLog("Resource", "ShareResource", "Error! 缺少必要的附件!");
                    return(false);
                }
                #endregion
            }
            catch (Exception ex)
            {
                clsLog.ErrorLog("Resource", "JavaUploadSaveData", "Error! " + ex.Message);
                return(false);
            }
        }