Commit 55cb247d by Java-李昕颖

各种改啊

parent dcfe1d57
...@@ -138,6 +138,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -138,6 +138,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
if (StringUtils.isNotBlank(fileName)) { if (StringUtils.isNotBlank(fileName)) {
reportAttachmentEntity.setAttachmentName(fileName); reportAttachmentEntity.setAttachmentName(fileName);
} }
int index = path.lastIndexOf("/")+1;
path = path.substring(0, index) + fileName;
reportAttachmentEntity.setAttachmentPath(path); reportAttachmentEntity.setAttachmentPath(path);
File file = new File(reportAttachmentEntity.getAttachmentPath()); File file = new File(reportAttachmentEntity.getAttachmentPath());
long length = file.length(); long length = file.length();
...@@ -180,7 +182,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -180,7 +182,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
} }
public String getFilename(String path){ public String getFilename(String path){
int beginIndex = path.indexOf("%"); int beginIndex = path.lastIndexOf("/")+1;
int endIndex = path.lastIndexOf("."); int endIndex = path.lastIndexOf(".");
String fileNameUrlCode = path.substring(beginIndex, endIndex); String fileNameUrlCode = path.substring(beginIndex, endIndex);
String prefixName = path.substring(endIndex, path.length()); String prefixName = path.substring(endIndex, path.length());
......
...@@ -164,6 +164,22 @@ public class ReportController extends BaseController { ...@@ -164,6 +164,22 @@ public class ReportController extends BaseController {
List<Position> positionList = reportService.getPositionList(); List<Position> positionList = reportService.getPositionList();
User userEntity = new User(); User userEntity = new User();
Page<User> page = reportService.findUserPage(new Page<User>(request, response), userEntity); Page<User> page = reportService.findUserPage(new Page<User>(request, response), userEntity);
//获取举报提交文件列表
ReportAttachmentEntity reportAttachment = new ReportAttachmentEntity();
reportAttachment.setReportId(reportEntity.getId());
reportAttachment.setAttachmentType("0");
List<ReportAttachmentEntity> reportAttachmentList = reportService.getAttachmentInfo(reportAttachment);
//获取补充提交文件列表
ReportAttachmentEntity supplementAttachment = new ReportAttachmentEntity();
supplementAttachment.setReportId(reportEntity.getId());
supplementAttachment.setAttachmentType("1");
List<ReportAttachmentEntity> supplementAttachmentList = reportService.getAttachmentInfo(supplementAttachment);
//获取处理成果文件列表
ReportAttachmentEntity dealAttachment = new ReportAttachmentEntity();
dealAttachment.setReportId(reportEntity.getId());
dealAttachment.setAttachmentType("2");
List<ReportAttachmentEntity> dealAttachmentList = reportService.getAttachmentInfo(dealAttachment);
model.addAttribute("page", page); model.addAttribute("page", page);
model.addAttribute("user", userEntity); model.addAttribute("user", userEntity);
model.addAttribute("userName", user.getName()); model.addAttribute("userName", user.getName());
...@@ -173,6 +189,9 @@ public class ReportController extends BaseController { ...@@ -173,6 +189,9 @@ public class ReportController extends BaseController {
model.addAttribute("officeList", officeList); model.addAttribute("officeList", officeList);
model.addAttribute("positionList", positionList); model.addAttribute("positionList", positionList);
model.addAttribute("isAdmin", isAdmin); model.addAttribute("isAdmin", isAdmin);
model.addAttribute("reportAttachmentList", reportAttachmentList);
model.addAttribute("supplementAttachmentList", supplementAttachmentList);
model.addAttribute("dealAttachmentList", dealAttachmentList);
return "modules/report/reportTrack"; return "modules/report/reportTrack";
} }
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label">被举报项目:</label> <label class="control-label">举报时间:</label>
<div class="controls"> <div class="controls">
<form:input path="reportTime" htmlEscape="false" maxlength="200" class="input-xlarge required"/> <form:input path="reportTime" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
</div> </div>
......
...@@ -9,12 +9,18 @@ ...@@ -9,12 +9,18 @@
$(document).ready(function () { $(document).ready(function () {
$("#inputForm").validate({ $("#inputForm").validate({
submitHandler: function (form) { submitHandler: function (form) {
submitCount += 1; if ($("#supplementType").val() == " "){
if(submitCount == 1){ top.$.jBox.tip('请选择业务类型', 'warning');
loading('正在提交,请稍等...'); }else if ($("#supplementArea").val() == " "){
form.submit(); top.$.jBox.tip('请选择被举报区域', 'warning');
}else{ }else {
return false; submitCount += 1;
if (submitCount == 1) {
loading('正在提交,请稍等...');
form.submit();
} else {
return false;
}
} }
}, },
errorContainer: "#messageBox", errorContainer: "#messageBox",
...@@ -54,6 +60,24 @@ ...@@ -54,6 +60,24 @@
var path = "mailto:?subject=举报核查-"+supplementType+"-"+supplementInformant+"违规操作"; var path = "mailto:?subject=举报核查-"+supplementType+"-"+supplementInformant+"违规操作";
path += "&body=Dear,<br/>附件是举报核查-"+supplementType+"-"+supplementInformant+"违规操作,请核实是否属实。<br/>谢谢!"; path += "&body=Dear,<br/>附件是举报核查-"+supplementType+"-"+supplementInformant+"违规操作,请核实是否属实。<br/>谢谢!";
//path += "<br/><br/><br/>%0D%0A${userName}"; //path += "<br/><br/><br/>%0D%0A${userName}";
path += "</p>举报内容</<br>";
path += "被举报项目:${report.reportProject}</br>";
path += "举报时间:${report.reportTime}</br>";
path += "所在城市:${report.reportCity}</br>";
path += "内容:${report.reportContent}</br>";
path += "附件:";
<%--var reportAttachmentList = "${reportAttachmentList}";--%>
<%--for (var i = 0;i < reportAttachmentList.length;i++){--%>
<%--path += "&nbsp;&nbsp;&nbsp;&nbsp;"+reportAttachmentList[i].attachmentPath+"</br>";--%>
<%--}--%>
<%--path += " <c:forEach items="${reportAttachmentList}" var="reportAttachment" varStatus="vs">--%>
<%--path += " ${vs.count}.<a href="${reportAttachment.attachmentPath}" target="_blank">${reportAttachment.attachmentName}</a><br>--%>
path += "举报人信息</br>";
path += "姓名:${report.reportPersonName}</br>";
path += "Email:${report.reportPersonTel}</br>";
path += "举报途径:${report.reportSource}</br>";
window.location.href = path; window.location.href = path;
}); });
}); });
...@@ -144,7 +168,7 @@ ...@@ -144,7 +168,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label">被举报区域:</label> <label class="control-label">被举报区域:</label>
<div class="controls"> <div class="controls">
<form:select id="supplementType" path="supplementArea" class="input-small required"> <form:select id="supplementArea" path="supplementArea" class="input-small required">
<form:option value=" ">请选择</form:option> <form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('supplement_area')}" itemLabel="label" itemValue="value" <form:options items="${fns:getDictList('supplement_area')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select> htmlEscape="false"/></form:select>
......
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