Commit b32f885f by java-lixy

查漏补缺

parent 0df43bf8
......@@ -408,6 +408,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportStatus = "跟踪中";
} else if (reportStatus.equals("2")) {
reportStatus = "已处理";
} else if (reportStatus.equals("3")) {
reportStatus = "已关闭";
}
} else {
reportStatus = "";
......@@ -551,6 +553,11 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
return reportDao.updateIsSendEmail(reportId);
}
/**
* 管理员修改处理结论
*
* @return
*/
@Transactional(readOnly = false)
public int updateConclusion(ReportEntity reportEntity) {
return reportDao.updateConclusion(reportEntity);
......
......@@ -167,6 +167,9 @@ public class ReportController extends BaseController {
*/
@RequestMapping(value = "view")
public String view(ReportEntity reportEntity, Model model, RedirectAttributes redirectAttributes) {
//判断登录人的角色
User useradmin = UserUtils.getUser();
boolean isAdmin = reportService.checkRole(useradmin);
//获取举报提交文件列表
ReportAttachmentEntity reportAttachment = new ReportAttachmentEntity();
reportAttachment.setReportId(reportEntity.getId());
......@@ -208,6 +211,7 @@ public class ReportController extends BaseController {
if (count != 0){
result = count.toString();
}
model.addAttribute("isAdmin", isAdmin);
model.addAttribute("report", reportEntity);
model.addAttribute("reportAttachmentList", reportAttachmentList);
model.addAttribute("supplementAttachmentList", supplementAttachmentList);
......@@ -544,4 +548,17 @@ public class ReportController extends BaseController {
out.close();
}
/**
* 管理员修改处理结论
*
* @return
*/
@RequestMapping(value = "conclusion")
public String closeConclusion(ReportEntity reportEntity) {
reportService.updateConclusion(reportEntity);
//return "modules/report/reportDetail";
return "redirect:" + adminPath + "/report/list/?repage&flag=0";
}
}
......@@ -246,7 +246,7 @@
</c:if>
<li class="btns">
<label style="width:auto;">
<c:if test="${report.reportStatus != '2'}"><input id="btnTrack" class="btn btn-primary" type="button"
<c:if test="${report.reportStatus != '2' && report.reportStatus ne '3'}"><input id="btnTrack" class="btn btn-primary" type="button"
value="跟踪"/>&nbsp;&nbsp;</c:if>
<input id="btnDocument" class="btn btn-primary" type="button" value="转为文档"
onclick="openDownloadDialog('${report.id}')"/>&nbsp;&nbsp;
......
......@@ -234,7 +234,7 @@
</td>
<td>
<a href="${ctx}/report/view?id=${report.id}">查看</a>
<c:if test="${report.reportStatus ne '2'}"><a
<c:if test="${report.reportStatus ne '2' && report.reportStatus ne '3'}"><a
href="${ctx}/report/track?id=${report.id}">跟踪</a></c:if>
<a href="#" onclick="openDownloadDialog('${report.id}')">转为文档</a>
</td>
......
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