Commit d79e6b73 by java-lixy

保存附件地址乱码

新增转为word文档功能
parent de72a624
......@@ -95,6 +95,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
if (StringUtils.isNotBlank(fileName)) {
reportAttachmentEntity.setAttachmentName(fileName);
}
int index = path.lastIndexOf("/")+1;
path = path.substring(0, index) + fileName;
reportAttachmentEntity.setAttachmentPath(path);
File file = new File(reportAttachmentEntity.getAttachmentPath());
long length = file.length();
......@@ -165,6 +167,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
if (StringUtils.isNotBlank(fileName)) {
reportAttachmentEntity.setAttachmentName(fileName);
}
int index = path.lastIndexOf("/")+1;
path = path.substring(0, index) + fileName;
reportAttachmentEntity.setAttachmentPath(path);
File file = new File(reportAttachmentEntity.getAttachmentPath());
long length = file.length();
......
......@@ -66,7 +66,7 @@
function openDownloadDialog(id){
if (requestFlag == true){
$.ajax({
url: "${ctx}/report/document?id="+id,
url: "${ctx}/report/toWord?id="+id,
dataType: "text",
traditional: true,//这里设置为true
cache: false,
......
......@@ -41,7 +41,7 @@
function openDownloadDialog(id){
if (requestFlag == true){
$.ajax({
url: "${ctx}/report/document?id="+id,
url: "${ctx}/report/toWord?id="+id,
dataType: "text",
traditional: true,//这里设置为true
cache: false,
......
......@@ -55,7 +55,7 @@
//发邮件
$("#btnMail").click(function () {
var supplementType = $("#supplementType").find("option:selected").text();
var supplementInformant = $("#supplementInformant").val();
var supplementInformant = "${report.supplementInformant}";
var path = "mailto:?subject=举报核查-"+supplementType+"-"+supplementInformant+"违规操作";
path += "&body=Dear,<br/>附件是举报核查-"+supplementType+"-"+supplementInformant+"违规操作,请核实是否属实。<br/>谢谢!";
......@@ -71,7 +71,7 @@
var url = $(this).text();
path += url;
});
path += "举报人信息</br>";
path += "</br>举报人信息</br>";
path += "姓名:${report.reportPersonName}</br>";
path += "手机号:${report.reportPersonTel}</br>";
path += "Email:${report.reportPersonEmail}</br>";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment