Merge remote-tracking branch 'origin/master'
This commit is contained in:
+3
@@ -18,6 +18,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.json.simple.parser.ParseException;
|
||||
@@ -93,6 +94,7 @@ public class OcrCheckController {
|
||||
|
||||
@ApiOperation(value = "验证文档是否被锁定")
|
||||
@GetMapping("/verifyCheckFlag")
|
||||
@RequiresPermissions("ocr:ocrCheck:editor")
|
||||
public Result<?> verifyCheckFlag(String id) {
|
||||
if(StringUtils.isBlank(id)){
|
||||
return Result.error("参数不能为空");
|
||||
@@ -111,6 +113,7 @@ public class OcrCheckController {
|
||||
|
||||
@ApiOperation(value = "编辑文件")
|
||||
@RequestMapping("/editorFile")
|
||||
@RequiresPermissions("ocr:ocrCheck:editor")
|
||||
public ModelAndView index(HttpServletRequest request, HttpServletResponse response, Model model) throws Exception {
|
||||
|
||||
String fileName = "";
|
||||
|
||||
+1
@@ -141,6 +141,7 @@ public class OcrRecordEOController extends JeroController<OcrRecordEO, IOcrRecor
|
||||
@AutoLog(value = "OCR识别转换记录表-表单中英文切换")
|
||||
@ApiOperation(value="OCR识别转换记录表-表单中英文切换", notes="OCR识别转换记录表-表单中英文切换")
|
||||
@GetMapping(value = "/getForm")
|
||||
@RequiresPermissions("ocr:ocrRestful:addOcrRecord")
|
||||
public Result<List<Map<String, Object>>> getForm(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = ocrRecordService.getForm(flag, cut);
|
||||
|
||||
-82
@@ -1,82 +0,0 @@
|
||||
package com.jero.modules.ocr.controller;
|
||||
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.zhuozhengsoft.pageoffice.FileSaver;
|
||||
import com.zhuozhengsoft.pageoffice.OpenModeType;
|
||||
import com.zhuozhengsoft.pageoffice.PageOfficeCtrl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: yangxuenan
|
||||
* date: 2019/12/30 10:53
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ocr/pageOffice")
|
||||
@Api(tags="pageoffice接口")
|
||||
@Slf4j
|
||||
public class PageOfficeController {
|
||||
|
||||
@AutoLog(value = "pageoffice-主页")
|
||||
@ApiOperation(value="pageoffice-主页", notes="pageoffice-主页")
|
||||
@RequestMapping(value="/index", method= RequestMethod.GET)
|
||||
public ModelAndView showIndex(){
|
||||
ModelAndView mv = new ModelAndView("index");
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* office online打开
|
||||
*
|
||||
* @param request
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "pageoffice-在线编辑")
|
||||
@ApiOperation(value="pageoffice-在线编辑", notes="pageoffice-在线编辑")
|
||||
@RequestMapping(value="/word", method=RequestMethod.GET)
|
||||
public ModelAndView showWord(HttpServletRequest request, Map<String,Object> map){
|
||||
|
||||
//--- PageOffice的调用代码 开始 -----
|
||||
PageOfficeCtrl poCtrl=new PageOfficeCtrl(request);
|
||||
poCtrl.setServerPage("/poserver.zz");//设置授权程序servlet
|
||||
poCtrl.addCustomToolButton("保存","Save()",1); //添加自定义按钮
|
||||
poCtrl.addCustomToolButton("打印", "PrintFile()", 6);
|
||||
poCtrl.addCustomToolButton("全屏/还原", "IsFullScreen()", 4);
|
||||
poCtrl.addCustomToolButton("关闭", "CloseFile()", 21);
|
||||
poCtrl.setSaveFilePage("/save");//设置保存的action
|
||||
poCtrl.webOpen("D:\\test.docx", OpenModeType.docAdmin,"张三");
|
||||
poCtrl.setCaption("信息平台");
|
||||
map.put("pageoffice",poCtrl.getHtmlCode("PageOfficeCtrl1"));
|
||||
//--- PageOffice的调用代码 结束 -----
|
||||
ModelAndView mv = new ModelAndView("word");
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存office
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public void saveFile(HttpServletRequest request, HttpServletResponse response){
|
||||
FileSaver fs = new FileSaver(request, response);
|
||||
//保存文件
|
||||
fs.saveToFile("D:\\test.docx");
|
||||
fs.close();
|
||||
}
|
||||
|
||||
}
|
||||
+33
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.lanswitch.service.ILanguageSwitchService;
|
||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
import com.jero.modules.split.entity.SarFileSplitItemsEO;
|
||||
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
||||
@@ -43,6 +44,9 @@ public class FileSplitItemsEOController extends JeroController<SarFileSplitItems
|
||||
@Autowired
|
||||
private FileSplitItemsEOServiceImpl fileSplitItemsEOService;
|
||||
|
||||
@Autowired
|
||||
private ILanguageSwitchService languageSwitchService;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
|
||||
@@ -230,4 +234,33 @@ public class FileSplitItemsEOController extends JeroController<SarFileSplitItems
|
||||
return fileSplitItemsEOService.importSplitItems(file, cut, menuId, infoId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "表头中英文切换")
|
||||
@ApiOperation(value="表头中英文切换", notes="表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
@RequiresPermissions("split:sarFileSplitItems:page")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = languageSwitchService.getHeader(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "查询条件中英文切换")
|
||||
@ApiOperation(value="查询条件中英文切换", notes="查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
@RequiresPermissions("split:sarFileSplitItems:page")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = languageSwitchService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
}
|
||||
|
||||
+33
@@ -7,6 +7,7 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.lanswitch.service.ILanguageSwitchService;
|
||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
import com.jero.modules.split.page.SarFileSplitInfoEOPage;
|
||||
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
||||
@@ -44,6 +45,9 @@ public class SarFileSplitInfoController extends JeroController<SarFileSplitInfoE
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
|
||||
@Autowired
|
||||
private ILanguageSwitchService languageSwitchService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @param sarFileSplitInfoEOPage
|
||||
@@ -228,4 +232,33 @@ public class SarFileSplitInfoController extends JeroController<SarFileSplitInfoE
|
||||
return super.importExcel(request, response, SarFileSplitInfoEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表头中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "表头中英文切换")
|
||||
@ApiOperation(value="表头中英文切换", notes="表头中英文切换")
|
||||
@GetMapping(value = "/getHeader")
|
||||
@RequiresPermissions("split:sarFileSplitInfo:page")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = languageSwitchService.getHeader(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询条件中英文切换
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "查询条件中英文切换")
|
||||
@ApiOperation(value="查询条件中英文切换", notes="查询条件中英文切换")
|
||||
@GetMapping(value = "/queryCondition")
|
||||
@RequiresPermissions("split:sarFileSplitInfo:page")
|
||||
public Result<List<Map<String, Object>>> queryCondition(@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = languageSwitchService.queryCondition(flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<!-- office插件js begin 必须引入-->
|
||||
<script type="text/javascript" src="./jquery.min.js"></script>
|
||||
<script type="text/javascript" src="./pageoffice.js" id="po_js_main"></script>
|
||||
</head>
|
||||
<body>
|
||||
<a href="javascript:POBrowser.openWindowModeless('/api/lawss/pageOffice/word','width=1200px;height=800px;');">打开文件</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,70 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<input id="Button1" type="button" value="隐藏/显示 标题栏" οnclick="return Button1_onclick()" />
|
||||
<input id="Button2" type="button" value="隐藏/显示 菜单栏" οnclick="return Button2_onclick()" />
|
||||
<input id="Button3" type="button" value="隐藏/显示 自定义工具栏" οnclick="return Button3_onclick()" />
|
||||
<input id="Button4" type="button" value="隐藏/显示 Office工具栏" οnclick="return Button4_onclick()" />
|
||||
|
||||
<div style="width:1000px;height:700px;" th:utext="${pageoffice}"> </div>
|
||||
<script type="text/javascript">
|
||||
|
||||
function Save() {
|
||||
document.getElementById("PageOfficeCtrl1").WebSave();
|
||||
}
|
||||
function PrintFile(){
|
||||
document.getElementById("PageOfficeCtrl1").ShowDialog(4);
|
||||
|
||||
}
|
||||
function IsFullScreen(){
|
||||
document.getElementById("PageOfficeCtrl1").FullScreen = !document.getElementById("PageOfficeCtrl1").FullScreen;
|
||||
|
||||
}
|
||||
function CloseFile(){
|
||||
window.external.close();
|
||||
}
|
||||
|
||||
function BeforeBrowserClosed(){
|
||||
if (document.getElementById("PageOfficeCtrl1").IsDirty){
|
||||
if(confirm("提示:文档已被修改,是否继续关闭放弃保存 ?"))
|
||||
{
|
||||
return true;
|
||||
|
||||
}else{
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 隐藏/显示 标题栏
|
||||
function Button1_onclick() {
|
||||
var bVisible = document.getElementById("PageOfficeCtrl1").Titlebar;
|
||||
document.getElementById("PageOfficeCtrl1").Titlebar = !bVisible;
|
||||
}
|
||||
|
||||
// 隐藏/显示 菜单栏
|
||||
function Button2_onclick() {
|
||||
var bVisible = document.getElementById("PageOfficeCtrl1").Menubar;
|
||||
document.getElementById("PageOfficeCtrl1").Menubar = !bVisible;
|
||||
}
|
||||
|
||||
|
||||
// 隐藏/显示 自定义工具栏
|
||||
function Button3_onclick() {
|
||||
var bVisible = document.getElementById("PageOfficeCtrl1").CustomToolbar;
|
||||
document.getElementById("PageOfficeCtrl1").CustomToolbar = !bVisible;
|
||||
}
|
||||
// 隐藏/显示 Office工具栏
|
||||
function Button4_onclick() {
|
||||
var bVisible = document.getElementById("PageOfficeCtrl1").OfficeToolbars;
|
||||
document.getElementById("PageOfficeCtrl1").OfficeToolbars = !bVisible;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -118,8 +118,8 @@
|
||||
} //删除
|
||||
],
|
||||
url:{
|
||||
tableHeader: 'language/switch/getHeader', //表格头部字段
|
||||
seachList: 'language/switch/queryCondition', //搜索字段
|
||||
tableHeader: 'split/sarFileSplitInfo/getHeader', //表格头部字段
|
||||
seachList: 'split/sarFileSplitInfo/queryCondition', //搜索字段
|
||||
tableList: 'split/sarFileSplitInfo/page', //表格数据
|
||||
// getAddForm: 'ocr/ocrRecord/getForm', // 表单的字段
|
||||
// addInfo: 'ocr/OcrRestful/addOcrRecord', //新增
|
||||
|
||||
@@ -258,10 +258,10 @@
|
||||
} //删除
|
||||
],
|
||||
url:{
|
||||
tableHeader: 'language/switch/getHeader', //表格头部字段
|
||||
seachList: 'language/switch/queryCondition', //搜索字段
|
||||
tableHeader: 'split/sarFileSplitItems/getHeader', //表格头部字段
|
||||
seachList: 'split/sarFileSplitItems/queryCondition', //搜索字段
|
||||
tableList: 'split/sarFileSplitItems/getSplitItemsByPage', //表格数据
|
||||
getAddForm: 'language/switch/getForm', // 表单的字段
|
||||
getAddForm: 'split/sarFileSplitItems/getForm', // 表单的字段
|
||||
addInfo: '/jero-boot/split/sarFileSplitItems/addSplitItems', //新增
|
||||
updateInfo:'/jero-boot/split/sarFileSplitItems/updateSplitItems', //编辑
|
||||
getDocumentInfo:'split/sarFileSplitItems/getSplitItemsById',
|
||||
|
||||
Reference in New Issue
Block a user