소스 검색

首页添加已办任务按钮

user5 3 년 전
부모
커밋
210502844b

+ 22 - 2
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -173,6 +173,7 @@ import com.jeeplus.modules.workprojectcompletion.entity.WorkProjectCompletionInf
 import com.jeeplus.modules.workprojectcompletion.service.WorkProjectCompletionService;
 import com.jeeplus.modules.workprojectdeposit.entity.WorkProjectDeposit;
 import com.jeeplus.modules.workprojectdeposit.service.WorkProjectDepositService;
+import com.jeeplus.modules.workprojectnotify.dao.WorkProjectNotifyDao;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
 import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import com.jeeplus.modules.workreceiptsrevise.entity.WorkReceiptsRevise;
@@ -480,6 +481,8 @@ public class WorkProjectNotifyController extends BaseController {
 	private ProjectEngineeringService engineeringService;
 	@Autowired
 	private SubProjectInfoService subProjectInfoService;
+	@Autowired
+	private WorkProjectNotifyDao workProjectNotifyDao;
 
 	@ModelAttribute
 	public WorkProjectNotify get(@RequestParam(required=false) String id) {
@@ -559,6 +562,23 @@ public class WorkProjectNotifyController extends BaseController {
 		return "modules/workprojectnotify/workProjectNotifyReadBacklogList";
 	}
 
+	/**
+	 * 已审批待办列表页面
+	 */
+	@RequestMapping(value = {"readShowCount"})
+	@ResponseBody
+	public Map<String,Object> readShowCount (WorkProjectNotify workProjectNotify, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Map<String,Object> map=new HashMap<>();
+		User user = UserUtils.getUser();
+		workProjectNotify.setUser(user);
+		workProjectNotify.setStatus("2");
+		workProjectNotify.setRemarks("待通知");
+		workProjectNotify.setCompanyId(UserUtils.getSelectCompany().getId());
+		Integer count=workProjectNotifyDao.queryReadCount(workProjectNotify);
+		map.put("count",count);
+		return map;
+	}
+
 
 	/**
 	 * 我发起的待办列表页面
@@ -1685,7 +1705,7 @@ public class WorkProjectNotifyController extends BaseController {
 						}
 					}
 					model.addAttribute("datalist", workReviewAuditList);
-					
+
 					//查询总审人员信息
 					List<User> auditUserList = userService.getAuditUserList();
 					ruralProjectRecords.setBzshbUserList(auditUserList);
@@ -3858,7 +3878,7 @@ public class WorkProjectNotifyController extends BaseController {
 					}
 					model.addAttribute("datalist", workReviewAuditList);
 
-					
+
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
 						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));

+ 19 - 0
src/main/webapp/webpage/modules/sys/sysIndex.jsp

@@ -62,6 +62,18 @@
                     <!--parent.layer.msg('获取通知失败,请稍后再试!',{icon:2}) -->
                 }
             });
+            /*$.ajax({
+                type : "get",
+                async : true, //同步请求
+                url : "${ctx}/workprojectnotify/workProjectNotify/readShowCount",
+                success:function(datas){
+                    //$("#mainContent").html(dates);//要刷新的div
+                    $("#haveFinishedNotifyCount").text((datas.count)>9?"10+":(datas.count));
+                },
+                error: function() {
+                    <!--parent.layer.msg('获取通知失败,请稍后再试!',{icon:2}) -->
+                }
+            });*/
         });
         window.setInterval("requesting()",600000);
         function startRequest(){
@@ -416,6 +428,13 @@
                             <%--</li>--%>
                         </ul>
                     </li>
+                    <li class="dropdown">
+                        <a class="dropdown-toggle count-info" data-toggle="dropdown" href="javascript:void(0)" onclick='top.openTab("${ctx }/workprojectnotify/workProjectNotify/backlogListReadShow","已办任务", false)' >
+                            <%--<i class="fa fa-bell"></i>--%>
+                            <i class="fa fa-list-ul"></i>
+                            <span class="label label-danger labelInfo" id="haveFinishedNotifyCount"></span>&nbsp;已办任务
+                        </a>
+                    </li>
                     <%--<li >--%>
                         <%--<a href="javascript:void(0);" class="roll-nav roll-right J_tabExit hide"><i class="fa fa fa-cog"></i>&nbsp;&nbsp;设置</a>--%>
                     <%--</li>--%>