zhoufan vor 4 Jahren
Ursprung
Commit
59596c6c94

+ 2 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Wiki/FunctionsController.cs

@@ -322,8 +322,8 @@ namespace CallCenterApi.Interface.Controllers.Wiki
322 322
         public ActionResult ExportWord(int id)
323 323
         {
324 324
             var aw = new AsposeWord();
325
-            aw.OpenWithTemplate(Server.MapPath("/Upload/Word/部门能模板.doc"));
326
-            var dt = DB.DbHelperSQL.Query("select a.*,(select  stuff((select ',' + stuff(F_FileName, 1,19,'') from T_Sys_Accessories  where F_FileId   in (a.F_File) for xml path('')),1,1,'')) as fileurl,'F'+ RIGHT ('00000'+CONVERT (varchar(10),a.F_Id),6) as xh from T_Wiki_Functions a with(nolock) where a.F_Id=" + id).Tables[0];
325
+            aw.OpenWithTemplate(Server.MapPath("/Upload/Word/部门能模板.doc"));
326
+            var dt = DB.DbHelperSQL.Query("select a.*,(select  stuff((select ',' + stuff(F_FileName, 1,19,'') from T_Sys_Accessories  where F_FileId   in (select col from dbo.SplitToNvarchar(a.F_File,',' )) for xml path('')),1,1,'')) for xml path('')),1,1,'')) as fileurl,'F'+ RIGHT ('00000'+CONVERT (varchar(10),a.F_Id),6) as xh from T_Wiki_Functions a with(nolock) where a.F_Id=" + id).Tables[0];
327 327
             string F_key = dt.Rows[0]["F_key"].ToString();
328 328
             var dt2 = DB.DbHelperSQL.Query("SELECT * FROM View_KeysSplit WHERE id=" + F_key).Tables[0];
329 329
             aw.Builder();

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Wiki/HotspotGlossaryController.cs

@@ -315,7 +315,7 @@ namespace CallCenterApi.Interface.Controllers.Wiki
315 315
         {
316 316
             var aw = new AsposeWord();
317 317
             aw.OpenWithTemplate(Server.MapPath("/Upload/Word/热点问答模板.doc"));
318
-            var dt = DB.DbHelperSQL.Query("select a.*,(select  stuff((select ',' + stuff(F_FileName, 1,19,'') from T_Sys_Accessories  where F_FileId   in (a.F_File) for xml path('')),1,1,'')) as fileurl,'C'+ RIGHT ('00000'+CONVERT (varchar(10),a.F_Id),6) as xh from T_Wiki_HotspotGlossary a with(nolock) where a.F_Id=" + id).Tables[0];
318
+            var dt = DB.DbHelperSQL.Query("select a.*,(select  stuff((select ',' + stuff(F_FileName, 1,19,'') from T_Sys_Accessories  where F_FileId   in (select col from dbo.SplitToNvarchar(a.F_File,',' )) for xml path('')),1,1,'')) for xml path('')),1,1,'')) as fileurl,'C'+ RIGHT ('00000'+CONVERT (varchar(10),a.F_Id),6) as xh from T_Wiki_HotspotGlossary a with(nolock) where a.F_Id=" + id).Tables[0];
319 319
             string F_key = dt.Rows[0]["F_key"].ToString();
320 320
             var dt2 = DB.DbHelperSQL.Query("SELECT * FROM View_KeysSplit WHERE id=" + F_key).Tables[0];
321 321
             aw.Builder();

+ 3 - 3
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Wiki/LawGuideController.cs

@@ -9,7 +9,7 @@ using System.Web.Mvc;
9 9
 
10 10
 namespace CallCenterApi.Interface.Controllers.Wiki
11 11
 {
12
-    [Authority]
12
+    //[Authority]
13 13
     public class LawGuideController : BaseController
14 14
     {
15 15
         // GET: LawGuide
@@ -360,8 +360,8 @@ namespace CallCenterApi.Interface.Controllers.Wiki
360 360
         public ActionResult ExportWord(int id)
361 361
         {
362 362
             var aw = new AsposeWord();
363
-            aw.OpenWithTemplate(Server.MapPath("/Upload/Word/热点问答模板.doc"));
364
-            var dt = DB.DbHelperSQL.Query("select a.*,(select  stuff((select ',' + stuff(F_FileName, 1,19,'') from T_Sys_Accessories  where F_FileId   in (a.F_File) for xml path('')),1,1,'')) as fileurl,'B'+ RIGHT ('00000'+CONVERT (varchar(10),a.F_Id),6) as xh from T_Wiki_LawGuide a with(nolock) where a.F_Id=" + id).Tables[0];
363
+            aw.OpenWithTemplate(Server.MapPath("/Upload/Word/办事指南模板.doc"));
364
+            var dt = DB.DbHelperSQL.Query("select a.*,(select  stuff((select ',' + stuff(F_FileName, 1,19,'') from T_Sys_Accessories  where F_FileId   in (select col from dbo.SplitToNvarchar(a.F_File,',' )) for xml path('')),1,1,'')) as fileurl,'B'+ RIGHT ('00000'+CONVERT (varchar(10),a.F_Id),6) as xh from T_Wiki_LawGuide a with(nolock) where a.F_Id=" + id).Tables[0];
365 365
             string F_key = dt.Rows[0]["F_key"].ToString();
366 366
             var dt2 = DB.DbHelperSQL.Query("SELECT * FROM View_KeysSplit WHERE id=" + F_key).Tables[0];
367 367
             aw.Builder();

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Wiki/NounInterpretationController.cs

@@ -318,7 +318,7 @@ namespace CallCenterApi.Interface.Controllers.Wiki
318 318
         {
319 319
             var aw = new AsposeWord();
320 320
             aw.OpenWithTemplate(Server.MapPath("/Upload/Word/名词解释模板.doc"));
321
-            var dt = DB.DbHelperSQL.Query("select a.*,(select  stuff((select ',' + stuff(F_FileName, 1,19,'') from T_Sys_Accessories  where F_FileId   in (a.F_File) for xml path('')),1,1,'')) as fileurl,'D'+ RIGHT ('00000'+CONVERT (varchar(10),a.F_Id),6) as xh from T_Wiki_NounInterpretation a with(nolock) where a.F_Id=" + id).Tables[0];
321
+            var dt = DB.DbHelperSQL.Query("select a.*,(select  stuff((select ',' + stuff(F_FileName, 1,19,'') from T_Sys_Accessories  where F_FileId   in (select col from dbo.SplitToNvarchar(a.F_File,',' )) for xml path('')),1,1,'')) for xml path('')),1,1,'')) as fileurl,'D'+ RIGHT ('00000'+CONVERT (varchar(10),a.F_Id),6) as xh from T_Wiki_NounInterpretation a with(nolock) where a.F_Id=" + id).Tables[0];
322 322
             string F_key = dt.Rows[0]["F_key"].ToString();
323 323
             var dt2 = DB.DbHelperSQL.Query("SELECT * FROM View_KeysSplit WHERE id=" + F_key).Tables[0];
324 324
             aw.Builder();

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/Wiki/PolicyController.cs

@@ -326,7 +326,7 @@ namespace CallCenterApi.Interface.Controllers.Wiki
326 326
         {
327 327
             var aw = new AsposeWord();
328 328
             aw.OpenWithTemplate(Server.MapPath("/Upload/Word/政策法规模板.doc"));
329
-            var dt = DB.DbHelperSQL.Query("select a.*,(select  stuff((select ',' + stuff(F_FileName, 1,19,'') from T_Sys_Accessories  where F_FileId   in (a.F_File) for xml path('')),1,1,'')) as fileurl,'E'+ RIGHT ('00000'+CONVERT (varchar(10),a.F_Id),6) as xh from T_Wiki_Policy a with(nolock) where a.F_Id=" + id).Tables[0];
329
+            var dt = DB.DbHelperSQL.Query("select a.*,(select  stuff((select ',' + stuff(F_FileName, 1,19,'') from T_Sys_Accessories  where F_FileId   in (select col from dbo.SplitToNvarchar(a.F_File,',' )) for xml path('')),1,1,'')) for xml path('')),1,1,'')) as fileurl,'E'+ RIGHT ('00000'+CONVERT (varchar(10),a.F_Id),6) as xh from T_Wiki_Policy a with(nolock) where a.F_Id=" + id).Tables[0];
330 330
             string F_key = dt.Rows[0]["F_key"].ToString();
331 331
             var dt2 = DB.DbHelperSQL.Query("SELECT * FROM View_KeysSplit WHERE id=" + F_key).Tables[0];
332 332
             aw.Builder();

+ 3 - 3
CallCenterCommon/CallCenter.Utility/word/AsposeWord.cs

@@ -294,7 +294,7 @@ namespace CallCenter.Utility
294 294
             oWordApplic.Write(dt.Rows[0]["xh"].ToString());
295 295
 
296 296
             oWordApplic.MoveToBookmark("xh1");//跳转到书签名是xh的位置
297
-            oWordApplic.Write(dt.Rows[0]["F_Id"].ToString());
297
+            oWordApplic.Write(dt.Rows[0]["xh"].ToString());
298 298
 
299 299
             oWordApplic.MoveToBookmark("fbdw");
300 300
             oWordApplic.Write(dt.Rows[0]["F_FaBuDanWei"].ToString());
@@ -405,7 +405,7 @@ namespace CallCenter.Utility
405 405
             oWordApplic.Write(dt.Rows[0]["xh"].ToString());
406 406
 
407 407
             oWordApplic.MoveToBookmark("xh1");//跳转到书签名是xh的位置
408
-            oWordApplic.Write(dt.Rows[0]["F_Id"].ToString());
408
+            oWordApplic.Write(dt.Rows[0]["xh"].ToString());
409 409
 
410 410
             oWordApplic.MoveToBookmark("fbdw");
411 411
             oWordApplic.Write(dt.Rows[0]["F_FaBuDanWei"].ToString());
@@ -476,7 +476,7 @@ namespace CallCenter.Utility
476 476
             oWordApplic.Write(dt.Rows[0]["xh"].ToString());
477 477
 
478 478
             oWordApplic.MoveToBookmark("xh1");//跳转到书签名是xh的位置
479
-            oWordApplic.Write(dt.Rows[0]["F_Id"].ToString());
479
+            oWordApplic.Write(dt.Rows[0]["xh"].ToString());
480 480
 
481 481
             oWordApplic.MoveToBookmark("fbdw");
482 482
             oWordApplic.Write(dt.Rows[0]["F_FaBuDanWei"].ToString());