public void ExportZJD_QJDCB(JSYD jsyd, string saveDir) { string docTempletePath = JSYDCustom.QJDCBDocPath; XWPFDocument doc = WordRead.Read(docTempletePath); //写入界址签章表 IList <QZB> qzbs = jsyd.QZBs; WordWrite.SetTableRowObj(doc, qzbs, JZXInfoCustom.qzbReflect); //写入标示表 IList <JZXInfo> jzxinfos = jsyd.JZXInfos; JZXInfoCustom.CreateBSB(doc, jzxinfos); Dictionary <string, XMLObject> jsydXML = XMLRead.XmlToObjects(JSYDCustom.JSYDXMLPath); WordWrite.ReplaceText(doc, jsydXML, jsyd); Dictionary <string, XMLObject> xzdmXML = XMLRead.XmlToObjects(JSYDCustom.ZJDXZDMMLPath); WordWrite.ReplaceText(doc, xzdmXML, jsyd.ZJDXZDM); Dictionary <string, XMLObject> jtcyXML = XMLRead.XmlToObjects(JSYDCustom.JTCYXMLPath); WordWrite.ReplaceText(doc, jtcyXML, jsyd.HZs[0]); Dictionary <string, XMLObject> nfXML = XMLRead.XmlToObjects(JSYDCustom.NFXMLPath); WordWrite.ReplaceText(doc, nfXML, jsyd.NFs[0]); Dictionary <string, string> replaceDic = new Dictionary <string, string>(); replaceDic.Add("Company", "四川旭普信息产业发展有限公司"); string zdnum = jsyd.ZDNUM; replaceDic.Add("Qjbh", zdnum.Substring(6, 3) + "-" + zdnum.Substring(9, 3) + "-" + zdnum.Substring(12, 2) + "-" + zdnum.Substring(14, 5)); //本宗地已取得原土地使用证: 简镇清集用(1990)字第0304 - 37号; 原房屋所有权证: 简农房权字第1002010383号; StringBuilder sb = new StringBuilder(); string str = jsyd.YTDSYZSH; if (!Utils.IsStrNull(str)) { sb.Append("原土地使用证:" + str + ";"); } str = jsyd.NFs[0].SYQZH; if (!Utils.IsStrNull(str)) { sb.Append("原房屋所有权证:" + str + ";"); } if (sb.Length > 0) { sb.Insert(0, "本宗地已取得"); } replaceDic.Add("Tag0", sb.ToString()); WordWrite.ReplaceText(doc, replaceDic); string saveName = GetZJDSaveFileName(jsyd, saveDir, docTempletePath); WordWrite.SaveToFile(doc, saveName); }