Commit aed2e6ae by java-lixy

消息中心 即时提醒

parent e2602e49
...@@ -12,6 +12,7 @@ import com.ejweb.modules.sys.entity.Office; ...@@ -12,6 +12,7 @@ import com.ejweb.modules.sys.entity.Office;
import com.ejweb.modules.sys.entity.Position; import com.ejweb.modules.sys.entity.Position;
import com.ejweb.modules.sys.entity.User; import com.ejweb.modules.sys.entity.User;
import com.ejweb.modules.sys.utils.UserUtils; import com.ejweb.modules.sys.utils.UserUtils;
import com.ejweb.modules.workbench.service.NoticeService;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
...@@ -39,6 +40,8 @@ public class ReportController extends BaseController { ...@@ -39,6 +40,8 @@ public class ReportController extends BaseController {
@Autowired @Autowired
private ReportService reportService; private ReportService reportService;
@Autowired
private NoticeService noticeService;
@ModelAttribute @ModelAttribute
public ReportEntity get(@RequestParam(required = false) String id) { public ReportEntity get(@RequestParam(required = false) String id) {
...@@ -178,6 +181,15 @@ public class ReportController extends BaseController { ...@@ -178,6 +181,15 @@ public class ReportController extends BaseController {
supplementType = supplementType.substring(0, supplementType.length() - 1); supplementType = supplementType.substring(0, supplementType.length() - 1);
reportEntity.setSupplementType(supplementType); reportEntity.setSupplementType(supplementType);
} }
String isSendEmail = reportEntity.getIsSendEmail();
if (StringUtils.isNotBlank(isSendEmail)){
if (isSendEmail.equals("1")){
isSendEmail = "是";
}
}else {
isSendEmail = "否";
}
reportEntity.setIsSendEmail(isSendEmail);
List<ReportAttachmentEntity> reportAttachmentList = reportService.getAttachmentInfo(reportAttachment); List<ReportAttachmentEntity> reportAttachmentList = reportService.getAttachmentInfo(reportAttachment);
//获取补充提交文件列表 //获取补充提交文件列表
ReportAttachmentEntity supplementAttachment = new ReportAttachmentEntity(); ReportAttachmentEntity supplementAttachment = new ReportAttachmentEntity();
...@@ -189,11 +201,18 @@ public class ReportController extends BaseController { ...@@ -189,11 +201,18 @@ public class ReportController extends BaseController {
dealAttachment.setReportId(reportEntity.getId()); dealAttachment.setReportId(reportEntity.getId());
dealAttachment.setAttachmentType("2"); dealAttachment.setAttachmentType("2");
List<ReportAttachmentEntity> dealAttachmentList = reportService.getAttachmentInfo(dealAttachment); List<ReportAttachmentEntity> dealAttachmentList = reportService.getAttachmentInfo(dealAttachment);
//修改消息中心的未读消息提醒
User user = UserUtils.getUser();
Integer count = noticeService.getMessageCount(user.getId());
String result = "";
if (count != 0){
result = count.toString();
}
model.addAttribute("report", reportEntity); model.addAttribute("report", reportEntity);
model.addAttribute("reportAttachmentList", reportAttachmentList); model.addAttribute("reportAttachmentList", reportAttachmentList);
model.addAttribute("supplementAttachmentList", supplementAttachmentList); model.addAttribute("supplementAttachmentList", supplementAttachmentList);
model.addAttribute("dealAttachmentList", dealAttachmentList); model.addAttribute("dealAttachmentList", dealAttachmentList);
model.addAttribute("result", result);
return "modules/report/reportDetail"; return "modules/report/reportDetail";
} }
...@@ -243,6 +262,15 @@ public class ReportController extends BaseController { ...@@ -243,6 +262,15 @@ public class ReportController extends BaseController {
if (StringUtils.isBlank(reportEntity.getDealPersonName())){ if (StringUtils.isBlank(reportEntity.getDealPersonName())){
reportEntity.setDealPersonName(user.getName()); reportEntity.setDealPersonName(user.getName());
} }
String isSendEmail = reportEntity.getIsSendEmail();
if (StringUtils.isNotBlank(isSendEmail)){
if (isSendEmail.equals("1")){
isSendEmail = "是";
}
}else {
isSendEmail = "否";
}
reportEntity.setIsSendEmail(isSendEmail);
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());
......
...@@ -151,7 +151,7 @@ public class ReportToWordController { ...@@ -151,7 +151,7 @@ public class ReportToWordController {
} }
} }
if (list.size() > 1) { if (list.size() > 1) {
mergeCellsVertically(basicInfoTable, 0, 6, 6 + list.size() - 1); mergeCellsVertically(basicInfoTable, 0, 9, 9 + list.size() - 1);
} }
this.setCellWidth(basicInfoTable); this.setCellWidth(basicInfoTable);
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
<meta name="decorator" content="default"/> <meta name="decorator" content="default"/>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
alert($("#prompt")); var count = "${result}";
parent.refreshPromt(count);
$("input[type='text']").attr("disabled",true); $("input[type='text']").attr("disabled",true);
$("#btnTrack").click(function () { $("#btnTrack").click(function () {
...@@ -44,7 +45,6 @@ ...@@ -44,7 +45,6 @@
dealResult = "举报受理"; dealResult = "举报受理";
} }
$("#dealResult").val(dealResult); $("#dealResult").val(dealResult);
alert($('#default', window.parent.document).html());
}); });
var requestFlag = true; var requestFlag = true;
function openDownloadDialog(id){ function openDownloadDialog(id){
......
...@@ -157,6 +157,15 @@ ...@@ -157,6 +157,15 @@
}).loadData(refresh); }).loadData(refresh);
return false; return false;
}// </c:if> }// </c:if>
function refreshPromt(result) {
if (result != "") {
$("#prompt").text(result);
$("#promptMessage").text(result);
}else {
$("#message").hide();
$("#messageDiv").hide();
}
}
</script> </script>
</head> </head>
<body> <body>
...@@ -230,7 +239,7 @@ ...@@ -230,7 +239,7 @@
</div> </div>
<div class="container-fluid"> <div class="container-fluid">
<div id="content" class="row-fluid"> <div id="content" class="row-fluid">
<div id="left"><%-- <div id="left"><%--
<iframe id="menuFrame" name="menuFrame" src="" style="overflow:visible;" scrolling="yes" frameborder="no" width="100%" height="650"></iframe> --%> <iframe id="menuFrame" name="menuFrame" src="" style="overflow:visible;" scrolling="yes" frameborder="no" width="100%" height="650"></iframe> --%>
</div> </div>
<div id="openClose" class="close">&nbsp;</div> <div id="openClose" class="close">&nbsp;</div>
......
...@@ -23,7 +23,23 @@ ...@@ -23,7 +23,23 @@
$("#refresh").click(function () { $("#refresh").click(function () {
window.location.href = "${ctx}/notice/list"; window.location.href = "${ctx}/notice/list";
}); });
//序号连续
var i = 1;
var pageNo = $("#pageNo").val();
var pageSize = $("#pageSize").val();
$(".reportList").each(function(){
var num = (pageNo-1)*pageSize + i;
i += 1;
$(this).children("td:first-child").html(num);
});
}); });
function page(n,s){
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action", "${ctx}/notice/list");
$("#searchForm").submit();
return false;
}
</script> </script>
</head> </head>
<body> <body>
...@@ -51,8 +67,8 @@ ...@@ -51,8 +67,8 @@
<tbody> <tbody>
<c:if test="${noticePage.list.size()>0}"> <c:if test="${noticePage.list.size()>0}">
<c:forEach items="${noticePage.list}" var="notice" varStatus="vs"> <c:forEach items="${noticePage.list}" var="notice" varStatus="vs">
<tr> <tr class="reportList">
<td>${vs.count}</td> <td></td>
<td><a href="${ctx}/notice/view?id=${notice.id}&reportId=${notice.reportId}"><span <c:if test="${notice.status eq '1'}">style="color: #6f4086"</c:if>>${notice.title}。</span></a></td> <td><a href="${ctx}/notice/view?id=${notice.id}&reportId=${notice.reportId}"><span <c:if test="${notice.status eq '1'}">style="color: #6f4086"</c:if>>${notice.title}。</span></a></td>
<td>${notice.sendTime}</td> <td>${notice.sendTime}</td>
<td>${notice.sendFromId}</td> <td>${notice.sendFromId}</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