Преглед изворни кода

Merge remote-tracking branch 'origin/master'

Administrator пре 1 година
родитељ
комит
11b94a9808

+ 0 - 110
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/PageofficeController.java

@@ -1,110 +0,0 @@
-
-package com.ruoyi.web.controller.common;
-
-
-
-import com.ruoyi.framework.config.CrossFilter;
-import com.zhuozhengsoft.pageoffice.FileSaver;
-import com.zhuozhengsoft.pageoffice.OpenModeType;
-import com.zhuozhengsoft.pageoffice.PageOfficeCtrl;
-import com.zhuozhengsoft.pageoffice.poserver.Server;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
-import org.springframework.boot.web.servlet.ServletRegistrationBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.servlet.ModelAndView;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.Map;
-
-@RestController
-@RequestMapping("/pageoffice")
-public class PageofficeController {
-
-
-    @Value("${docpath}")
-    private String docPath;
-
-    @Value("${posyspath}")
-    private String poSysPath;
-
-    @Value("${popassword}")
-    private String poPassWord;
-
-
-
-    /**
-     * 添加PageOffice的服务器端授权程序Servlet(必须)
-     * @return
-     */
-
-    @Bean
-    public ServletRegistrationBean pageofficeRegistrationBean()  {
-        com.zhuozhengsoft.pageoffice.poserver.Server poserver
-                = new com.zhuozhengsoft.pageoffice.poserver.Server();
-        poserver.setSysPath(poSysPath);//设置PageOffice注册成功后,license.lic文件存放的目录
-
-        ServletRegistrationBean srb = new ServletRegistrationBean(poserver);
-        srb.addUrlMappings("/poserver.zz");
-        srb.addUrlMappings("/poclient");
-        srb.addUrlMappings("/pageoffice.js");
-        srb.addUrlMappings("/sealsetup.exe");
-        return srb;
-    }
-
-
-    /**
-     * 添加印章管理程序Servlet(可选)
-     * @return
-     */
-
-    @Bean
-    public ServletRegistrationBean servletRegistrationBean2() {
-        com.zhuozhengsoft.pageoffice.poserver.AdminSeal adminSeal = new com.zhuozhengsoft.pageoffice.poserver.AdminSeal();
-        adminSeal.setAdminPassword(poPassWord);//设置印章管理员admin的登录密码
-        adminSeal.setSysPath(poSysPath);//设置印章数据库文件poseal.db存放的目录
-        ServletRegistrationBean srb = new ServletRegistrationBean(adminSeal);
-        srb.addUrlMappings("/adminseal.zz");
-        srb.addUrlMappings("/sealimage.zz");
-        srb.addUrlMappings("/loginseal.zz");
-        return srb;//
-    }
-
-
-
-    @RequestMapping(value="/openFile")
-    public String openFile(HttpServletRequest request) {
-        PageOfficeCtrl poCtrl = new PageOfficeCtrl(request);
-        poCtrl.setSaveFilePage("/pageoffice/saveFile");
-        //webOpen的第一个参数支持能够输出下载文件的Url相对地址或者文件在服务器上的磁盘路径两种方式
-        //查看详细,请在本站搜索“PageOffice属性或方法中涉及到的URL路径或磁盘路径的说明”
-        poCtrl.webOpen("D:\\word\\告企业书.doc", OpenModeType.docNormalEdit, "张三");
-        return  poCtrl.getHtmlCode();
-    }
-
-    @RequestMapping("/saveFile")
-    public void saveFile(HttpServletRequest request, HttpServletResponse response) {
-        FileSaver fs = new FileSaver(request, response);
-        fs.saveToFile("D:\\word\\" + fs.getFileName());
-        fs.close();
-    }
-
-    /**
-     * 为pageoffice插件跨域用,自己项目的跨越没办法解决
-     * @return
-     */
-    @Bean
-    public FilterRegistrationBean crossFilterRegistration() {
-        FilterRegistrationBean registration = new FilterRegistrationBean(new CrossFilter());
-        registration.addUrlPatterns("/*");
-        registration.setName("crossFilter");
-        return registration;
-    }
-
-
-}
-

+ 0 - 6
ruoyi-admin/src/main/resources/application-druid.yml

@@ -118,9 +118,3 @@ spring:
         suffix: .html
         cache: false
 
-# 用于存放注册的信息以及.db文件,这个db文件包含了签章的一些信息,pageoffice帮我们集成好了 我们不用管,只需要自己创建签章即可
-posyspath: D:/pageoffice
-# 默认密码,管理签章的默认账号  admin  111111
-popassword: 111111
-
-docPath: D:/word/

+ 6 - 1
ruoyi-admin/src/main/resources/application-prod.yml

@@ -113,4 +113,9 @@ spring:
                     merge-sql: true
                 wall:
                     config:
-                        multi-statement-allow: true
+                        multi-statement-allow: true
+
+web-office:
+    convert:
+        appid: SX20240516EYFBUA
+        secret: vwJbZyZwrwaHMZKcPRFoCHyrlnTiswfI