Пример #1
0
        public List <MyAction> ExportZu_ZhongDiTuActions(IList <XZDM> xzdms, string bootDir)
        {
            List <MyAction> actions = new List <MyAction>();
            List <JTSYQ>    list    = new List <JTSYQ>();

            foreach (XZDM xzdm in xzdms)
            {
                IList <JTSYQ> jtsyqs = XZDMCustom.GetSelectJTSYQ(xzdm);
                if (Utils.CheckListExists(jtsyqs))
                {
                    list.AddRange(jtsyqs);
                }
            }
            List <JTSYQ> list2 = new List <JTSYQ>();

            foreach (JTSYQ jtsyq in list)
            {
                list2.AddRange(jtsyq.GroupJTSYQ);
            }
            JTSYQCustom.SetJZD(list2);

            foreach (JTSYQ jtsyq in list)
            {
                XZDM   xzdm   = jtsyq.XZDM;
                Action action = new Action(() =>
                {
                    string saveDir = bootDir + xzdm.Cun + "/" + xzdm.Zu;
                    JTSYQDao.ExportZu_ZhongDiTu(jtsyq, saveDir);
                });
                MyAction myAction = new MyAction(action, xzdm.CunZu + "宗地图 ");
                actions.Add(myAction);
            }
            return(actions);
        }
Пример #2
0
        public void ExportCunDangAnDai(XZDM xzdm, string saveDir)
        {
            Dictionary <string, XMLObject> ClazzDic = XMLRead.XmlToObjects_get <XZDM>();
            var doc = WordRead.Read(JTSYQCustom.CunDangAnDaiTemplete);

            WordWrite.ReplaceText(doc, ClazzDic, xzdm);
            WordWrite.SaveToFile(doc, saveDir + "//00档案袋.doc");
        }
Пример #3
0
        public void ExportZu_FaRenDaiBiaoShenFengZhengMing(XZDM xzdm, string saveDir)
        {
            Dictionary <string, XMLObject> ClazzDic = XMLRead.XmlToObjects(JTSYQCustom.XZDM_Reflect, true);
            var doc = WordRead.Read(JTSYQCustom.FaRenDaiBiaoShenFengZhengMing);

            WordWrite.ReplaceText(doc, ClazzDic, xzdm);
            WordWrite.SaveToFile(doc, saveDir + "/02法人代表身份证明" + xzdm.Zu + ".doc");
        }
Пример #4
0
        public void ExportCunYiJianFanKuaiShu(XZDM xzdm, string dir)
        {
            Dictionary <string, XMLObject> ClazzDic = XMLRead.XmlToObjects(JTSYQCustom.FanKuiYiJianShuXMLRelfect, false);
            var doc = WordRead.Read(JTSYQCustom.FanKuiYiJianShu);

            WordWrite.ReplaceText(doc, ClazzDic, xzdm);
            WordWrite.SaveToFile(doc, dir + "//" + System.IO.Path.GetFileName(JTSYQCustom.FanKuiYiJianShu));
        }
Пример #5
0
        public void ExportCunJieGuo_GongShi(XZDM xzdm, string dir)
        {
            Dictionary <string, XMLObject> ClazzDic = XMLRead.XmlToObjects(JTSYQCustom.XZDM_Reflect, true);
            var doc = WordRead.Read(JTSYQCustom.JieGuo_GongShi);

            xzdm.SetZuMiaoShu();
            WordWrite.ReplaceText(doc, ClazzDic, xzdm);
            WordWrite.SaveToFile(doc, dir + "//" + System.IO.Path.GetFileName(JTSYQCustom.JieGuo_GongShi));
        }
Пример #6
0
        public void ExportZu_FaRenDaiBiaoWeiTuoShu(XZDM xzdm, string saveDir)
        {
            Dictionary <string, XMLObject> ClazzDic = XMLRead.XmlToObjects(JTSYQCustom.XZDM_Reflect, true);
            var doc = WordRead.Read(JTSYQCustom.FaRenDaiBiaoWeiTuoShu);

            WordWrite.ReplaceText(doc, ClazzDic, xzdm);
            //查看是村不是组
            WordWrite.SaveToFile(doc, saveDir + "/03法人代表授权委托书" + xzdm.Zu + ".doc");
        }
Пример #7
0
        public void ExportZu_DangAnDai(JTSYQ jtsyq, string saveDir)
        {
            Dictionary <string, XMLObject> ClazzDic = XMLRead.XmlToObjects(JTSYQCustom.XZDM_Reflect, true);
            var  doc  = WordRead.Read(JTSYQCustom.Zu_DangAnDai);
            XZDM xzdm = jtsyq.XZDM;

            WordWrite.ReplaceText(doc, ClazzDic, xzdm);
            Dictionary <string, XMLObject> ClazzDic2 = XMLRead.XmlToObjects(JTSYQCustom.JTSYQ_Reflect, true);

            WordWrite.ReplaceText(doc, ClazzDic2, jtsyq);
            WordWrite.SaveToFile(doc, saveDir + "/00" + xzdm.XiangZheng + xzdm.CunZu + "(" + xzdm.DJZQDM + ")_1档案袋.doc");
        }
Пример #8
0
        public void ExportZu_ShenPiBiao(JTSYQ jtsyq, string saveDir)
        {
            //JTSYQCustom.SetContainsFeatureArea(jtsyq);
            XZDM xzdm = jtsyq.XZDM;
            Dictionary <string, XMLObject> xzdmDic = XMLRead.XmlToObjects(JTSYQCustom.XZDM_Reflect, true);
            var doc = WordRead.Read(JTSYQCustom.ShenPiaoBiao);

            WordWrite.ReplaceText(doc, xzdmDic, xzdm);
            Dictionary <string, XMLObject> jtsyqDic = XMLRead.XmlToObjects(JTSYQCustom.JTSYQ_Reflect, true);

            WordWrite.ReplaceText(doc, jtsyqDic, jtsyq);
            WordWrite.SaveToFile(doc, saveDir + "/05审批表" + xzdm.Zu + ".doc");
        }
Пример #9
0
        public void ExportCun_GongShi(IList <JTSYQ> jtsyqs, XZDM xzdm, string dir)
        {
            Dictionary <int, XMLTable> ClazzDic = XMLRead.GetXmlToXMLTabl(JTSYQCustom.Cun_GongGao_Reflect);
            XMLTable  xmlTable = ClazzDic[1];
            IWorkbook workbook = ExcelRead.ReadExcel(JTSYQCustom.Cun_GongShi);
            ISheet    sheet    = workbook.GetSheetAt(0);
            //文字替换
            Dictionary <string, XMLObject> xmlobjectDic = XMLRead.XmlToObjects(JTSYQCustom.FanKuiYiJianShuXMLRelfect, false);

            xzdm.JTSYQ_DasTatal = (xzdm.JTSYQ_GSEndTime - xzdm.JTSYQ_GSStartTime).Days;
            ExcelWrite.ReplaceTextByXMLObject(sheet, xzdm, xmlobjectDic);

            //行数据插入
            ExcelWrite.WriteObjects(sheet, xmlTable, jtsyqs);

            ExcelWrite.Save(workbook, dir + "//" + System.IO.Path.GetFileName(JTSYQCustom.Cun_GongShi));
        }
Пример #10
0
        public void ExportZu_QuanJiDiaoChaBiao(JTSYQ jtsyqGroup, string saveDir)
        {
            var        doc      = WordRead.Read(JTSYQCustom.QuanJiDiaoChaBiao);
            List <JZD> jzds     = new List <JZD>();
            int        jzdCount = 0;

            foreach (JTSYQ jtsyq in jtsyqGroup.GroupJTSYQ)
            {
                IList <JZD> temp = jtsyq.JZDS;
                if (Utils.CheckListExists(temp))
                {
                    jzdCount += temp.Count;

                    jzds.AddRange(temp);
                    jzds.Add(temp[0]);
                    JZD jzd = new JZD();
                    jzds.Add(jzd);
                }
                else
                {
                    MessageBox.Show(jtsyq.QLR + ",图上还没有界址点!!!");
                    return;
                }
            }
            jtsyqGroup.JZDCount = jzdCount;
            //最后一个空白不要
            jzds.RemoveAt(jzds.Count - 1);
            int        jzdEndTableIndex = QuanJiDiaoChaBiaoWriteJZDS(doc, jzds);
            List <QZB> qzbs             = new List <QZB>();

            foreach (JTSYQ jtsyq in jtsyqGroup.GroupJTSYQ)
            {
                qzbs.AddRange(jtsyq.QZBS);
            }
            QuanJiDiaoChaBiaoWriteQZBS(doc, jzdEndTableIndex + 1, qzbs);

            // JTSYQCustom.SetContainsFeatureArea(jtsyqGroup);
            XZDM xzdm = jtsyqGroup.XZDM;
            Dictionary <string, XMLObject> xzdmDic = XMLRead.XmlToObjects(JTSYQCustom.XZDM_Reflect, true);

            WordWrite.ReplaceText(doc, xzdmDic, xzdm);
            Dictionary <string, XMLObject> jtsyqDic = XMLRead.XmlToObjects(JTSYQCustom.JTSYQ_Reflect, true);

            WordWrite.ReplaceText(doc, jtsyqDic, jtsyqGroup);
            WordWrite.SaveToFile(doc, saveDir + "/" + System.IO.Path.GetFileName(JTSYQCustom.QuanJiDiaoChaBiao));
        }
Пример #11
0
        public void ExportCun_GongShiTuActions(XZDM cunXZDM, string saveDir)
        {
            //IList<JTSYQ> jtsyqs = null;
            //得到所有界址短线
            IList <JZX> jzxs = JZXCustom.SetJZX(cunXZDM.JTSYQS);

            //从中删除本村的界址短线
            for (int a = 0; a < jzxs.Count; a++)
            {
                JZX    jzx = jzxs[a];
                string str = jzx.BM.Substring(0, 12);
                if (str == cunXZDM.DJZQDM)
                {
                    jzxs.RemoveAt(a);
                    a--;
                }
            }

            string mxdPath = saveDir + "\\" + System.IO.Path.GetFileName(JTSYQCustom.JTSYQGSTMxd);
            string mdbPath = saveDir + "\\" + System.IO.Path.GetFileName(JTSYQCustom.JTSYQGSTMDB);

            //1、复制maxd
            FileUtils.CopyFile(JTSYQCustom.JTSYQGSTMxd, mxdPath);
            //2、复制数据库
            FileUtils.CopyFile(JTSYQCustom.JTSYQZDTMdb, mdbPath);

            //打开工作文件
            MapDocumentClass mapDocument = new MapDocumentClass();

            mapDocument.Open(mxdPath, "");
            AxMapControl mapControl = ArcGisUtils.axMapControl;
            IMap         map        = mapDocument.Map[0];

            mapControl.Map = map;
            //3、设置数据源,数据源是相对路径,不需要设置
            //4、复制 本村的界址线shap
            JTSYQCustom.SaveMap(cunXZDM.JTSYQS);
            //设置本村的界址点标注
            JTSYQCustom.SaveJTSYQBZMap(map, cunXZDM.JTSYQS);


            JZXCustom.SaveJZXMap(jzxs);
            JZXCustom.SaveJZXBZMap(map, jzxs);

            double scale = 100.0;

            // mapControl.Extent = JTSYQCustom.SetExtent(cunXZDM.JTSYQS);
            ArcGisUtils.axMapControl.Extent = JTSYQCustom.GetLayer().AreaOfInterest;
            double num = (double)((int)((map.MapScale + 30.0) / scale) * scale + scale);

            //mapControl.MapScale = 329;
            ArcGisUtils.ChangeMapScale(mapDocument, num);
            //5、替换文字内容,
            Dictionary <string, XMLObject> xmlObjectDic = XMLRead.XmlToObjects(JTSYQCustom.XZDM_Reflect, true);
            XMLObject xmlObject = new XMLObject {
                Column = "BLC", Deafult = "1:" + num
            };

            xmlObjectDic.Add("BLC", xmlObject);
            ArcGisService.ReplaceText(cunXZDM, xmlObjectDic, mapDocument);
            //使用的xml缓存,必须移除
            xmlObjectDic.Remove("BLC");
            //6、工程文件保留
            mapDocument.Save();
            mapDocument.Close();
            ArcGisUtils.Refresh();
        }