| | |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.ReportPageDto; |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | |
| | | throw new ErrorException("文件上传失败"); |
| | | } |
| | | } |
| | | |
| | | @ValueClassify("报告编制") |
| | | @ApiOperation(value = "报告还原") |
| | | @PostMapping("/upReportUrl") |
| | | public Result upReportUrl(Integer id) { |
| | | return Result.success(insReportService.upReportUrl(id)); |
| | | } |
| | | |
| | | @ValueClassify("报告编制") |
| | | @ApiOperation(value = "报告在线编制") |
| | | @GetMapping("/upReportFile") |
| | | public Result upReportFile() { |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ValueClassify("报告编制") |
| | | @ApiOperation(value = "提交") |
| | | @PostMapping("/writeReport") |
| | | public Result writeReport(Integer id) { |
| | | return Result.success(insReportService.writeReport(id)); |
| | | } |
| | | |
| | | @ValueClassify("报告编制") |
| | | @ApiOperation(value = "审核") |
| | | @PostMapping("/examineReport") |
| | | public Result examineReport(Integer id, Integer isExamine, String examineTell) { |
| | | return Result.success(insReportService.examineReport(id, isExamine, examineTell)); |
| | | } |
| | | |
| | | @ValueClassify("报告编制") |
| | | @ApiOperation(value = "批准") |
| | | @PostMapping("/ratifyReport") |
| | |
| | | } |
| | | |
| | | @RequestMapping("/onlyOffice/save") |
| | | @ValueAuth |
| | | public void saveFile(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) { |
| | | PrintWriter writer = null; |
| | | try { |
| | |
| | | String body = scanner.hasNext() ? scanner.next() : ""; |
| | | JSONObject jsonObject = JSONObject.parseObject(body); |
| | | |
| | | System.out.println(jsonObject); |
| | | if (jsonObject.containsKey("url")) { |
| | | String jsonArray = jsonObject.get("lastsave").toString(); // 更新时间 |
| | | String fileUrl = jsonObject.get("url").toString(); // 更新文件url |