| | |
| | | public Object detail(@PathVariable("tReportLossId") Integer tReportLossId) { |
| | | return tReportLossService.selectById(tReportLossId); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/dispose") |
| | | @ResponseBody |
| | | public Object dispose(Integer id,String info) { |
| | | TReportLoss tReportLoss = tReportLossService.selectById(id); |
| | | tReportLoss.setDisposeInfo(info); |
| | | tReportLoss.setStatus(2); |
| | | tReportLoss.setHandleTime(new Date()); |
| | | tReportLoss.setHandleUserId(ShiroKit.getUser().getObjectId()); |
| | | boolean b = tReportLossService.updateById(tReportLoss); |
| | | if(b){ |
| | |
| | | fileWriter.write(document.html()); |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | FileInputStream fileInputStream = new FileInputStream(file); |
| | | File file1 = new File("/usr/local/nginx/html/files/pdf/"); |
| | | if(!file1.exists()){ |
| | | file1.mkdirs(); |
| | | } |
| | | file1 = new File("/usr/local/nginx/html/files/pdf/reportLossResult_" + randomString + ".pdf"); |
| | | if(!file1.exists()){ |
| | | file1.createNewFile(); |
| | | } |
| | | FileOutputStream fileOutputStream = new FileOutputStream(file1); |
| | | HtmlToPdfUtils.convertToPdf(fileInputStream, "IGO", fileOutputStream); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/reportLossResult_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |