Beispiel #1
0
        ///// <summary>
        ///// 添加概述模块(用于县公司)
        ///// </summary>
        ///// <param name="document"></param>
        ///// <param name="ischild"></param>
        //public virtual void Addintro(DocX document,bool ischild) { }


        /// <summary>
        /// 添加组织机构模块(省公司和市公司)
        /// </summary>
        /// <param name="document"></param>
        public virtual void Addorganization(DocX document, NumoftitleHelper title)
        {
            try
            {
                Paragraph pagebreak = document.InsertParagraph();
                pagebreak.InsertPageBreakAfterSelf();//分页符
                title.Less2Zero();
                var h1_2 = document.InsertParagraph(title.num2title() + "组织机构");
                h1_2.StyleName = "Heading2";
                using (FontFamily fontfamily = new FontFamily("宋体"))
                {
                    h1_2.Color(Color.Black).FontSize(16).Font(fontfamily);
                }
                Table t = table.tableHelper.organizationTable(document, Childcompany, PathManager.getSingleton().GetOrganizationpicPath(CompanyID, false));
                t.Alignment = Alignment.center;
                t.AutoFit   = AutoFit.Contents;
                if (t != null)
                {
                    document.InsertTable(t);
                }
            }
            catch (System.Exception ex)
            {
                LogHelper.WriteLog(typeof(CreateCompany), ex);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 添加房地信息总汇模块(作为省公司下级的市公司)
        /// </summary>
        /// <param name="document"></param>
        /// <param name="childcityName"></param>
        public void Addfdxx(DocX document, string childcityName, NumoftitleHelper title)
        {
            try
            {
                Table t = tableHelper.Template_city(document);
                t = tableHelper.inserttable_city(t, lstFM);
                if (t == null)
                {
                    return;
                }
                title.Less2Zero();
                var h1_3 = document.InsertParagraph(title.num2title() + "房地信息总汇");
                h1_3.StyleName = "Heading2";
                using (FontFamily fontfamily = new FontFamily("宋体"))
                {
                    h1_3.Color(Color.Black).FontSize(16).Font(fontfamily);
                }
                //表格描述
                var tbltitle = document.InsertParagraph(childcityName + "房地信息汇总表");
                tbltitle.FontSize(14).Alignment = Alignment.center;

                t.Alignment = Alignment.center;
                t.AutoFit   = AutoFit.Contents;
                document.InsertTable(t);
            }
            catch (Exception ex)
            {
                LogHelper.WriteLog(typeof(CreateCityCompany), ex);
            }
        }
Beispiel #3
0
        /// <summary>
        /// 添加概述模块
        /// </summary>
        /// <param name="document"></param>
        public override void Addintro(DocX document, NumoftitleHelper title)
        {
            try
            {
                title.Less1Zero();
                var h1 = document.InsertParagraph(title.num1title() + "概述");
                h1.StyleName = "Heading1";
                using (FontFamily fontfamily = new FontFamily("宋体"))
                {
                    h1.Color(Color.Black).FontSize(22).Font(fontfamily);
                }

                string    s = txt.txtHelper.readtxt(PathManager.getSingleton().GetIntrotxtPath(CompanyID, false));
                Paragraph p = document.InsertParagraph(s);
                using (FontFamily fontfamily = new FontFamily("宋体"))
                {
                    p.Font(fontfamily).FontSize(14);
                }
                Picture   p1  = picture.picHelper.getPic(document, PathManager.getSingleton().GetIntropicPath(CompanyID, false), 330, 650);
                Paragraph pic = document.InsertParagraph();
                pic.AppendPicture(p1).Alignment = Alignment.center;
            }
            catch (System.Exception ex)
            {
                LogHelper.WriteLog(typeof(CreateCountryCompany), ex);
            }
        }
Beispiel #4
0
        ///// <summary>
        ///// 添加市公司的组织机构模块
        ///// </summary>
        ///// <param name="document"></param>
        //public override void Addorganization(DocX document)
        //{
        //    var h1_2 = document.InsertParagraph("组织机构");
        //    h1_2.StyleName = "Heading2";
        //    Table t = table.tableHelper.organizationTable(document, Childcompany, path.pathHelper.GetOrganizationpicPath(CompanyID));
        //    document.InsertTable(t);
        //}

        /// <summary>
        /// 添加组织机构模块(作为省公司下级的市公司)
        /// </summary>
        /// <param name="document"></param>
        /// <param name="childcityID"></param>
        public void Addorganization(DocX document, int childcityID, NumoftitleHelper title)
        {
            List <Companymodel> cchildcityID = DBhelper.GetChildcompany(childcityID);

            Table t = table.tableHelper.organizationTable(document, cchildcityID, PathManager.getSingleton().GetOrganizationpicPath(childcityID, false));//childcountryID

            t.Alignment = Alignment.center;
            t.AutoFit   = AutoFit.Contents;
            if (t == null)
            {
                return;
            }

            title.Less2Zero();
            var h1_2 = document.InsertParagraph(title.num2title() + "组织机构");

            h1_2.InsertPageBreakBeforeSelf();
            h1_2.StyleName = "Heading2";
            using (FontFamily fontfamily = new FontFamily("宋体"))
            {
                h1_2.Color(Color.Black).FontSize(16).Font(fontfamily);
            }

            document.InsertTable(t);
        }
Beispiel #5
0
        /// <summary>
        /// 插入总平面分布图模块
        /// </summary>
        /// <param name="document"></param>
        /// <param name="ischild">判断是否作为市级公司的下级</param>
        public void insertZPMFBT(DocX document, bool ischild, bool istrainings, NumoftitleHelper title)
        {
            try
            {
                Paragraph h1_2;
                Picture   p = picHelper.getPic(document, PathManager.getSingleton().GetZPMFBpicPath(parcelID, false), 677, 769);
                if (p == null)
                {
                    return;
                }
                if (ischild)
                {
                    title.Less3Zero();
                    h1_2           = document.InsertParagraph(title.num3title() + "总平面分布图");
                    h1_2.StyleName = "Heading3";
                    using (FontFamily fontfamily = new FontFamily("宋体"))
                    {
                        h1_2.Color(Color.Black).FontSize(14).Font(fontfamily);
                    }
                }
                else if (istrainings)
                {
                    title.Less4Zero();
                    h1_2           = document.InsertParagraph(title.num4title() + "总平面分布图");
                    h1_2.StyleName = "Heading4";
                    using (FontFamily fontfamily = new FontFamily("宋体"))
                    {
                        h1_2.Color(Color.Black).FontSize(14).Font(fontfamily);
                    }
                }
                else
                {
                    title.Less2Zero();
                    h1_2           = document.InsertParagraph(title.num2title() + "总平面分布图");
                    h1_2.StyleName = "Heading2";
                    using (FontFamily fontfamily = new FontFamily("宋体"))
                    {
                        h1_2.Color(Color.Black).FontSize(16).Font(fontfamily);
                    }
                }
                h1_2.AppendLine();
                var   Pic = document.InsertParagraph();
                Table t   = tableHelper.parcelpicTabel(document, p, "总平面分布图");
                //picHelper.insert(document, Pic, path.pathHelper.GetZPMFBpicPath(CompanyID, Parcelname), 521, 567);
                Pic.InsertTableAfterSelf(t).Alignment = Alignment.center;
                t.Alignment = Alignment.center;
                t.AutoFit   = AutoFit.Contents;
                Pic.AppendLine();

                //var ownershipPic = document.InsertParagraph();
                //ownershipPic.AppendLine("房屋所有权证");
                //picHelper.insert(document, landusePic, Environment.CurrentDirectory + "\\公司\\国网江苏省电力公司高邮市供电公司\\" + Name + "\\房屋所有权证.jpg");//todo:图片路径要改活
            }
            catch (System.Exception ex)
            {
                LogHelper.WriteLog(typeof(parcelHelper), ex);
            }
        }
Beispiel #6
0
 /// <summary>
 /// 插入鸟瞰图模块
 /// </summary>
 /// <param name="document"></param>
 /// <param name="ischild">判断是否作为市级公司的下级</param>
 public void insertNKT(DocX document, bool ischild, bool istrainings, NumoftitleHelper title)
 {
     try
     {
         Paragraph h1_3;
         Picture   p_Orth  = picHelper.getPic(document, PathManager.getSingleton().GetAerialviewpicPath(parcelID, "正射", false), 308, 443);
         Picture   p_front = picHelper.getPic(document, PathManager.getSingleton().GetAerialviewpicPath(parcelID, "前", false), 308, 443);
         Picture   p_rear  = picHelper.getPic(document, PathManager.getSingleton().GetAerialviewpicPath(parcelID, "后", false), 308, 443);
         Picture   p_left  = picHelper.getPic(document, PathManager.getSingleton().GetAerialviewpicPath(parcelID, "左", false), 308, 443);
         Picture   p_right = picHelper.getPic(document, PathManager.getSingleton().GetAerialviewpicPath(parcelID, "右", false), 308, 443);
         if (p_Orth == null || p_front == null || p_rear == null || p_left == null || p_right == null)
         {
             return;
         }
         if (ischild)
         {
             title.Less3Zero();
             h1_3           = document.InsertParagraph(title.num3title() + "鸟瞰图(航拍)");
             h1_3.StyleName = "Heading3";
             using (FontFamily fontfamily = new FontFamily("宋体"))
             {
                 h1_3.Color(Color.Black).FontSize(14).Font(fontfamily);
             }
         }
         else if (istrainings)
         {
             title.Less4Zero();
             h1_3           = document.InsertParagraph(title.num4title() + "鸟瞰图(航拍)");
             h1_3.StyleName = "Heading4";
             using (FontFamily fontfamily = new FontFamily("宋体"))
             {
                 h1_3.Color(Color.Black).FontSize(14).Font(fontfamily);
             }
         }
         else
         {
             title.Less2Zero();
             h1_3           = document.InsertParagraph(title.num2title() + "鸟瞰图(航拍)");
             h1_3.StyleName = "Heading2";
             using (FontFamily fontfamily = new FontFamily("宋体"))
             {
                 h1_3.Color(Color.Black).FontSize(16).Font(fontfamily);
             }
         }
         h1_3.AppendLine();
         var   AerialViewPic = document.InsertParagraph();
         Table t             = tableHelper.AerialviewpicTable(document, p_Orth, p_front, p_rear, p_left, p_right);
         t.Alignment = Alignment.center;
         t.AutoFit   = AutoFit.Contents;
         AerialViewPic.InsertTableAfterSelf(t).Alignment = Alignment.center;
         AerialViewPic.AppendLine();
     }
     catch (System.Exception ex)
     {
         LogHelper.WriteLog(typeof(parcelHelper), ex);
     }
 }
Beispiel #7
0
 /// <summary>
 /// 插入场地涉外管线布置图
 /// </summary>
 /// <param name="document"></param>
 /// <param name="ischild">判断是否作为市级公司的下级</param>
 public void insertGXT(DocX document, bool ischild, bool istrainings, NumoftitleHelper title)
 {
     try
     {
         Paragraph h1_5;
         Picture   p = picHelper.getPic(document, PathManager.getSingleton().GetPipelinepicPath(parcelID, false), 700, 619);
         if (p == null)
         {
             return;
         }
         if (ischild)
         {
             title.Less3Zero();
             h1_5           = document.InsertParagraph(title.num3title() + "场地涉外管线布置图");
             h1_5.StyleName = "Heading3";
             using (FontFamily fontfamily = new FontFamily("宋体"))
             {
                 h1_5.Color(Color.Black).FontSize(14).Font(fontfamily);
             }
         }
         else if (istrainings)
         {
             title.Less4Zero();
             h1_5           = document.InsertParagraph(title.num4title() + "场地涉外管线布置图");
             h1_5.StyleName = "Heading4";
             using (FontFamily fontfamily = new FontFamily("宋体"))
             {
                 h1_5.Color(Color.Black).FontSize(14).Font(fontfamily);
             }
         }
         else
         {
             title.Less2Zero();
             h1_5           = document.InsertParagraph(title.num2title() + "场地涉外管线布置图");
             h1_5.StyleName = "Heading2";
             using (FontFamily fontfamily = new FontFamily("宋体"))
             {
                 h1_5.Color(Color.Black).FontSize(16).Font(fontfamily);
             }
         }
         var   Pic = document.InsertParagraph();
         Table t   = tableHelper.pipelinepicTable(document, p);
         t.Alignment = Alignment.center;
         t.AutoFit   = AutoFit.Window;
         Pic.InsertTableAfterSelf(t).Alignment = Alignment.center;
         //picHelper.insert(document, Pic, path.pathHelper.GetPipelinepicPath(CompanyID, Parcelname), 536, 457);
     }
     catch (System.Exception ex)
     {
         LogHelper.WriteLog(typeof(parcelHelper), ex);
     }
 }
Beispiel #8
0
 /// <summary>
 /// 添加宗地描述模块(作为市公司的下级)
 /// </summary>
 /// <param name="document"></param>
 /// <param name="childcountryID"></param>
 public void Addparcels(DocX document, Companymodel childcountry, NumoftitleHelper title)
 {
     foreach (Parcelmodel pm in lstPM)
     {
         parcelHelper phelper = new parcelHelper(pm, (int)childcountry.ID);//添加各个地块的信息
         if (childcountry.property == "培训单位" || childcountry.property == "直属单位")
         {
             phelper.insertInfo(document, lstFM, lstPM, false, true, title);
         }
         else
         {
             phelper.insertInfo(document, lstFM, lstPM, true, false, title);
         }
     }
 }
Beispiel #9
0
        /// <summary>
        /// 创建县公司文档(作为市公司的下级)
        /// </summary>
        /// <param name="document"></param>
        /// <param name="childcountryName"></param>
        /// <param name="childcountryID"></param>
        public void createword(DocX document, Companymodel childcountry, NumoftitleHelper title)
        {
            lstFM = FDXXtbl_country.GetInfo((int)childcountry.ID);
            FM    = FDXXtbl_country.GetTotalInfo((int)childcountry.ID);
            lstPM = FDXXtbl_country.Parcels(lstFM);
            lstBM = FDXXtbl_country.Buildings(lstFM);

            if (!childcountry.name.Contains("本部"))
            {
                Addintro(document, childcountry, title); //不是市公司本部,则添加概述
            }
            Addloc(document, childcountry, title);       //添加位置分布图
            Addfdxx(document, childcountry, title);      //添加房地信息统计
            Addparcels(document, childcountry, title);   //添加宗地描述

            document.Save();
        }
Beispiel #10
0
        /// <summary>
        /// 添加概述模块(作为市公司的下级)
        /// </summary>
        /// <param name="document"></param>
        /// <param name="childcountryID"></param>
        /// <param name="ischild"></param>
        public void Addintro(DocX document, Companymodel childcountry, NumoftitleHelper title)
        {
            try
            {
                Paragraph h1;
                string    s = txt.txtHelper.readtxt(PathManager.getSingleton().GetIntrotxtPath((int)childcountry.ID, false));
                if (s == "")
                {
                    return;             //概述文件缺少,就不添加概述
                }
                if (childcountry.property == "直属单位" || childcountry.property == "培训单位")
                {
                    title.Less3Zero();
                    h1           = document.InsertParagraph(title.num3title() + "概述");
                    h1.StyleName = "Heading3";
                    using (FontFamily fontfamily = new FontFamily("宋体"))
                    {
                        h1.Color(Color.Black).FontSize(14).Font(fontfamily);
                    }
                }
                else
                {
                    title.Less2Zero();
                    h1           = document.InsertParagraph(title.num2title() + "概述");
                    h1.StyleName = "Heading2";
                    using (FontFamily fontfamily = new FontFamily("宋体"))
                    {
                        h1.Color(Color.Black).FontSize(16).Font(fontfamily);
                    }
                }

                Paragraph p = document.InsertParagraph(s);
                using (FontFamily fontfamily = new FontFamily("宋体"))
                {
                    p.Font(fontfamily).FontSize(14);
                }
                Picture   p1  = picture.picHelper.getPic(document, PathManager.getSingleton().GetIntropicPath((int)childcountry.ID, false), 330, 650);
                Paragraph pic = document.InsertParagraph();
                pic.AppendPicture(p1).Alignment = Alignment.center;
            }
            catch (System.Exception ex)
            {
                LogHelper.WriteLog(typeof(CreateCountryCompany), ex);
            }
        }
Beispiel #11
0
 /// <summary>
 /// 添加市公司本部和县级公司模块(作为省公司下级的市公司)
 /// </summary>
 /// <param name="document"></param>
 /// <param name="childcountryID"></param>
 public void Addcountrycompanies(DocX document, int childcountryID, NumoftitleHelper title)
 {
     try
     {
         List <Companymodel> CChildcompany = DBhelper.GetChildcompany(childcountryID);
         foreach (Companymodel ccm in CChildcompany)//让市公司本部优先生成
         {
             if (ccm.property == "本部")
             {
                 title.Less1Zero();
                 var h1 = document.InsertParagraph(title.num1title() + ccm.name);
                 h1.StyleName = "Heading1";
                 using (FontFamily fontfamily = new FontFamily("宋体"))
                 {
                     h1.Color(Color.Black).FontSize(22).Font(fontfamily);
                 }
                 h1.InsertPageBreakBeforeSelf();
                 CreateCountryCompany ccc = new CreateCountryCompany();
                 ccc.createword(document, ccm, title);
                 break;
             }
         }
         foreach (Companymodel ccm in CChildcompany)
         {
             if (ccm.property != "本部")
             {
                 title.Less1Zero();
                 var h1 = document.InsertParagraph(title.num1title() + ccm.name);
                 h1.StyleName = "Heading1";
                 using (FontFamily fontfamily = new FontFamily("宋体"))
                 {
                     h1.Color(Color.Black).FontSize(22).Font(fontfamily);
                 }
                 h1.InsertPageBreakBeforeSelf();
                 CreateCountryCompany ccc = new CreateCountryCompany();
                 ccc.createword(document, ccm, title);
             }
         }
     }
     catch (System.Exception ex)
     {
         LogHelper.WriteLog(typeof(CreateCityCompany), ex);
     }
 }
Beispiel #12
0
 /// <summary>
 /// 添加组织机构模块
 /// </summary>
 /// <param name="document"></param>
 public override void Addorganization(DocX document, NumoftitleHelper title)
 {
     try
     {
         title_province.Less2Zero();
         var h1_2 = document.InsertParagraph(title.num2title() + CompanyName + "组织机构");
         h1_2.StyleName = "Heading2";
         using (FontFamily fontfamily = new FontFamily("宋体"))
         {
             h1_2.Color(Color.Black).FontSize(16).Font(fontfamily);
         }
         Paragraph pic = document.InsertParagraph();
         pic.InsertPicture(picture.picHelper.getPic(document, PathManager.getSingleton().GetOrganizationpicPath(CompanyID, false), 1306, 936)).Alignment = Alignment.center;
     }
     catch (System.Exception ex)
     {
         LogHelper.WriteLog(typeof(CreateProvinceCompany), ex);
     }
 }
Beispiel #13
0
 /// <summary>
 /// 添加位置分布图模块(作为市公司的下级)
 /// </summary>
 /// <param name="document"></param>
 /// <param name="childcountryID"></param>
 public void Addloc(DocX document, Companymodel childcountry, NumoftitleHelper title)
 {
     try
     {
         Paragraph h2;
         Picture   p1 = picture.picHelper.getPic(document, PathManager.getSingleton().GetLocpicPath((int)childcountry.ID, false), 384, 864);
         if (p1 == null)
         {
             return;             //如果图片文件不存在,则跳过这个模块
         }
         if (childcountry.property == "直属单位" || childcountry.property == "培训单位")
         {
             title.Less3Zero();
             h2           = document.InsertParagraph(title.num3title() + "位置分布图");
             h2.StyleName = "Heading3";
             using (FontFamily fontfamily = new FontFamily("宋体"))
             {
                 h2.Color(Color.Black).FontSize(14).Font(fontfamily);
             }
         }
         else
         {
             title_country.Less2Zero();
             h2           = document.InsertParagraph(title.num2title() + "位置分布图");
             h2.StyleName = "Heading2";
             using (FontFamily fontfamily = new FontFamily("宋体"))
             {
                 h2.Color(Color.Black).FontSize(16).Font(fontfamily);
             }
         }
         Table t = tableHelper.locpicTable(document, p1);
         t.Alignment = Alignment.center;
         t.AutoFit   = AutoFit.Contents;
         Paragraph pic = document.InsertParagraph();
         pic.InsertTableAfterSelf(t).Alignment = Alignment.center;
     }
     catch (System.Exception ex)
     {
         LogHelper.WriteLog(typeof(CreateCountryCompany), ex);
     }
 }
Beispiel #14
0
        /// <summary>
        /// 创建市公司文档(作为省公司下级的市公司)
        /// </summary>
        /// <param name="document"></param>
        /// <param name="childcityName"></param>
        /// <param name="childcityID"></param>
        public void createword(DocX document, string childcityName, int childcityID, NumoftitleHelper title)
        {
            try
            {
                lstFM = FDXXtbl_city.GetInfo(childcityID);

                Addcover(document, childcityName);                     //添加封面

                Addintro(document, childcityName, childcityID, title); //添加概述

                Addorganization(document, childcityID, title);         //添加组织机构

                Addfdxx(document, childcityName, title);               //添加房地信息总汇

                Addcountrycompanies(document, childcityID, title);     //添加市公司本部和县级公司
            }
            catch (System.Exception ex)
            {
                LogHelper.WriteLog(typeof(CreateCityCompany), ex);
            }
        }
Beispiel #15
0
        /// <summary>
        /// 添加房地信息统计模块(作为市公司的下级)
        /// </summary>
        /// <param name="document"></param>
        /// <param name="childcountryName"></param>
        /// <param name="childcountryID"></param>
        public void Addfdxx(DocX document, Companymodel childcountry, NumoftitleHelper title)
        {
            try
            {
                Paragraph h3;

                if (childcountry.property == "直属单位" || childcountry.property == "培训单位")
                {
                    title.Less3Zero();
                    h3           = document.InsertParagraph(title.num3title() + "房地信息统计");
                    h3.StyleName = "Heading3";
                    using (FontFamily fontfamily = new FontFamily("宋体"))
                    {
                        h3.Color(Color.Black).FontSize(14).Font(fontfamily);
                    }
                }
                else
                {
                    title.Less2Zero();
                    h3           = document.InsertParagraph(title.num2title() + "房地信息统计");
                    h3.StyleName = "Heading2";
                    using (FontFamily fontfamily = new FontFamily("宋体"))
                    {
                        h3.Color(Color.Black).FontSize(16).Font(fontfamily);
                    }
                }
                //文字描述
                var p = document.InsertParagraph();
                p.Append(childcountry.name + "市公司现有各类用房");
                p.AppendBookmark((int)childcountry.ID + "各类用房栋数");
                p.Append("栋,占地总面积");
                p.AppendBookmark((int)childcountry.ID + "占地总面积");
                p.Append("平方米,总建筑面积");
                p.AppendBookmark((int)childcountry.ID + "总建筑面积");
                p.Append("平方米。其中");
                p.AppendBookmark((int)childcountry.ID + "各类用房面积");
                p.Append(";建成投运10年内的房屋面积为");
                p.AppendBookmark((int)childcountry.ID + "十年内房屋面积");
                p.Append("平方米,建成投运10-20年的房屋面积为");
                p.AppendBookmark((int)childcountry.ID + "十到二十年内房屋面积");
                p.Append("平方米,建成投运20-30年的房屋面积为");
                p.AppendBookmark((int)childcountry.ID + "二十到三十年内房屋面积");
                p.Append("平方米,建成投运30年以上的房屋面积为");
                p.AppendBookmark((int)childcountry.ID + "三十年以上房屋面积");
                p.Append("平方米。");
                finishBM(document, (int)childcountry.ID);//完成书签内容

                //表格描述
                var tbltitle = document.InsertParagraph("房地信息汇总表");
                tbltitle.FontSize(14).Alignment = Alignment.center;
                Table t = tableHelper.Template_country(document);
                t           = tableHelper.inserttable_country(t, lstFM, FM);
                t           = tableHelper.combineCells(t, lstPM, lstBM);
                t.Alignment = Alignment.center;
                t.AutoFit   = AutoFit.Contents;
                document.InsertTable(t);
            }
            catch (System.Exception ex)
            {
                LogHelper.WriteLog(typeof(CreateCountryCompany), ex);
            }
        }
Beispiel #16
0
        /// <summary>
        /// 插入宗地图模块
        /// </summary>
        /// <param name="document"></param>
        /// <param name="ischild">判断是否作为市级公司的下级</param>
        public void insertZDT(DocX document, bool ischild, bool istrainings, NumoftitleHelper title)
        {
            try
            {
                Paragraph h1_1;
                Picture   p = picHelper.getPic(document, PathManager.getSingleton().GetParcelpicPath(parcelID, false), 724, 833);
                //if (p == null) return;
                if (p != null)
                {
                    if (ischild)
                    {
                        title.Less3Zero();
                        h1_1           = document.InsertParagraph(title.num3title() + "宗地图");
                        h1_1.StyleName = "Heading3";
                        using (FontFamily fontfamily = new FontFamily("宋体"))
                        {
                            h1_1.Color(Color.Black).FontSize(14).Font(fontfamily);
                        }
                    }
                    else if (istrainings)
                    {
                        title.Less4Zero();
                        h1_1           = document.InsertParagraph(title.num4title() + "宗地图");
                        h1_1.StyleName = "Heading4";
                        using (FontFamily fontfamily = new FontFamily("宋体"))
                        {
                            h1_1.Color(Color.Black).FontSize(14).Font(fontfamily);
                        }
                    }
                    else
                    {
                        title.Less2Zero();
                        h1_1           = document.InsertParagraph(title.num2title() + "宗地图");
                        h1_1.StyleName = "Heading2";
                        using (FontFamily fontfamily = new FontFamily("宋体"))
                        {
                            h1_1.Color(Color.Black).FontSize(16).Font(fontfamily);
                        }
                    }
                    h1_1.AppendLine();
                    var   parcelPic = document.InsertParagraph();
                    Table t         = tableHelper.parcelpicTabel(document, p, "宗地图");
                    t.Alignment = Alignment.center;
                    t.AutoFit   = AutoFit.Contents;
                    parcelPic.InsertTableAfterSelf(t).Alignment = Alignment.center;
                    //t.AutoFit = AutoFit.
                    //picHelper.insert(document, parcelPic, path.pathHelper.GetParcelpicPath(CompanyID, Parcelname), 592, 630);
                    parcelPic.AppendLine();
                }

                using (FontFamily fontFamily = new FontFamily("宋体"))
                {
                    var landusePic = document.InsertParagraph("国有土地使用证", false, format.formatHelper.SetParagraphFormat(fontFamily, 16, Color.Black));
                    //landusePic.Append("国有土地使用证").FontSize(16);
                    landusePic.AppendLine();
                    picHelper.insert(document, landusePic, PathManager.getSingleton().GetLandusepicPath(parcelID, false), 406, 570);
                }
            }
            catch (System.Exception ex)
            {
                LogHelper.WriteLog(typeof(parcelHelper), ex);
            }
        }
Beispiel #17
0
 /// <summary>
 /// 插入某个宗地的所有信息(宗地图、平面分布图、鸟瞰图、分层分户平面图、场地涉外管线布置图)
 /// </summary>
 /// <param name="document"></param>
 /// <param name="lstFM"></param>
 /// <param name="p"></param>
 /// <param name="ischild">判断是否作为市级公司的下级</param>
 /// <param name="istrainings">判断是否为培训单位</param>
 /// <param name="title"></param>
 public void insertInfo(DocX document, List <FDXXtbl_country> lstFM, List <Parcelmodel> p, bool ischild, bool istrainings, NumoftitleHelper title)
 {
     try
     {
         Paragraph pagebreak = document.InsertParagraph();
         pagebreak.InsertPageBreakAfterSelf();//分页符
         Paragraph h1;
         if (ischild)
         {
             title.Less2Zero();
             h1           = document.InsertParagraph(title.num2title() + parcelname);
             h1.StyleName = "Heading2";
             using (FontFamily fontfamily = new FontFamily("宋体"))
             {
                 h1.Color(Color.Black).FontSize(16).Font(fontfamily);
             }
         }
         else if (istrainings)
         {
             title.Less3Zero();
             h1           = document.InsertParagraph(title.num3title() + parcelname);
             h1.StyleName = "Heading3";
             using (FontFamily fontfamily = new FontFamily("宋体"))
             {
                 h1.Color(Color.Black).FontSize(14).Font(fontfamily);
             }
         }
         else
         {
             title.Less1Zero();
             h1           = document.InsertParagraph(title.num1title() + parcelname);
             h1.StyleName = "Heading1";
             using (FontFamily fontfamily = new FontFamily("宋体"))
             {
                 h1.Color(Color.Black).FontSize(22).Font(fontfamily);
             }
         }
         insertZDT(document, ischild, istrainings, title);            //宗地图
         insertZPMFBT(document, ischild, istrainings, title);         //总平面分布图
         insertNKT(document, ischild, istrainings, title);            //鸟瞰图
         insertFCFH(document, lstFM, p, ischild, istrainings, title); //分层分户平面图
         insertGXT(document, ischild, istrainings, title);            //场地涉外管线布置图
     }
     catch (System.Exception ex)
     {
         LogHelper.WriteLog(typeof(parcelHelper), ex);
     }
 }
Beispiel #18
0
        /// <summary>
        /// 插入分层分户平面图
        /// </summary>
        /// <param name="document"></param>
        /// <param name="lstFM"></param>
        /// <param name="p"></param>
        /// <param name="ischild">判断是否作为市级公司的下级</param>
        public void insertFCFH(DocX document, List <FDXXtbl_country> lstFM, List <Parcelmodel> p, bool ischild, bool istrainings, NumoftitleHelper title)
        {
            Paragraph h1_4_1;

            try
            {
                Paragraph h1_4 = document.InsertParagraph("");

                FDXXtbl_country temp = new FDXXtbl_country();
                foreach (FDXXtbl_country fm in lstFM)
                {
                    if (temp != null && temp.ZDXX_MC == fm.ZDXX_MC && temp.FCXX_JZMC == fm.FCXX_JZMC)
                    {
                        continue;
                    }
                    temp = fm;

                    //if(fm.ZDXX_MC == Parcelname)
                    if (fm.ZDXX_ID == parcelID)
                    {
                        Picture       p_deed    = picHelper.getPic(document, PathManager.getSingleton().GetDeedPath(fm.FCXX_ID, false), 450, 886);
                        Picture       p_virtual = picHelper.getPic(document, PathManager.getSingleton().GetVirtualmapPath(fm.FCXX_ID, false), 450, 886);
                        List <string> lstStr    = txt.txtHelper.txtLines(PathManager.getSingleton().GetPlantxtPath(fm.FCXX_ID, false));

                        if (h1_4.Text == "")
                        {
                            //if (p_deed != null || p_virtual != null || lstStr.Count != 0 || t != null)
                            //{
                            if (ischild)
                            {
                                title.Less3Zero();
                                h1_4           = document.InsertParagraph(title.num3title() + "分层分户平面图");
                                h1_4.StyleName = "Heading3";
                                using (FontFamily fontfamily = new FontFamily("宋体"))
                                {
                                    h1_4.Color(Color.Black).FontSize(14).Font(fontfamily);
                                }
                            }
                            else if (istrainings)
                            {
                                title.Less4Zero();
                                h1_4           = document.InsertParagraph(title.num4title() + "分层分户平面图");
                                h1_4.StyleName = "Heading4";
                                using (FontFamily fontfamily = new FontFamily("宋体"))
                                {
                                    h1_4.Color(Color.Black).FontSize(14).Font(fontfamily);
                                }
                            }
                            else
                            {
                                title.Less2Zero();
                                h1_4           = document.InsertParagraph(title.num2title() + "分层分户平面图");
                                h1_4.StyleName = "Heading2";
                                using (FontFamily fontfamily = new FontFamily("宋体"))
                                {
                                    h1_4.Color(Color.Black).FontSize(16).Font(fontfamily);
                                }
                            }
                            //}
                        }
                        if (ischild)
                        {
                            title.Less4Zero();
                            h1_4_1           = document.InsertParagraph(title.num4title() + fm.FCXX_JZMC + "分层分户平面图");
                            h1_4_1.StyleName = "Heading4";
                            using (FontFamily fontfamily = new FontFamily("宋体"))
                            {
                                h1_4_1.Color(Color.Black).FontSize(14).Font(fontfamily).Italic();
                            }
                        }
                        else if (istrainings)
                        {
                            //title.Less4Zero();
                            h1_4           = document.InsertParagraph(title.num5title() + "分层分户平面图");
                            h1_4.StyleName = "Heading5";
                            using (FontFamily fontfamily = new FontFamily("宋体"))
                            {
                                h1_4.Color(Color.Black).FontSize(14).Font(fontfamily);
                            }
                        }
                        else
                        {
                            title.Less3Zero();
                            h1_4_1           = document.InsertParagraph(title.num3title() + fm.FCXX_JZMC + "分层分户平面图");
                            h1_4_1.StyleName = "Heading3";
                            using (FontFamily fontfamily = new FontFamily("宋体"))
                            {
                                h1_4_1.Color(Color.Black).FontSize(14).Font(fontfamily);
                            }
                        }
                        //房产证
                        if (p_deed != null)
                        {
                            var   tbl_deed = document.InsertParagraph();//房产证表格
                            Table t_deed   = tableHelper.picTable(document, p_deed, "房产证");
                            t_deed.Alignment = Alignment.center;
                            t_deed.AutoFit   = AutoFit.Contents;
                            tbl_deed.InsertTableAfterSelf(t_deed);
                        }

                        //实景图
                        if (p_virtual != null)
                        {
                            var   tbl_virtual = document.InsertParagraph();//实景图表格
                            Table t_virtual   = tableHelper.picTable(document, p_virtual, "房产外墙面实景图");
                            t_virtual.Alignment = Alignment.center;
                            t_virtual.AutoFit   = AutoFit.Contents;
                            tbl_virtual.InsertTableAfterSelf(t_virtual);
                        }

                        //平面图
                        var title2 = document.InsertParagraph();//生产综合楼分层分户平面图标题
                        title2.Append("分层分户平面图").FontSize(16);
                        title2.Alignment = Alignment.center;

                        if (lstStr.Count > 0)
                        {
                            Table t = tableHelper.PlanTable(document, companyID, parcelID, fm.FCXX_ID, lstStr);
                            t.Alignment = Alignment.center;
                            t.AutoFit   = AutoFit.Window;

                            document.InsertTable(t).Alignment = Alignment.center;
                        }
                    }


                    //if (fm.ZDXX_MC == Parcelname)
                    //{

                    //}
                }
            }
            catch (System.Exception ex)
            {
                LogHelper.WriteLog(typeof(parcelHelper), ex);
            }
        }