ソースを参照

首页-公告(过期公告、未过期公告设置)

user5 4 年 前
コミット
6a8235df2d

+ 2 - 2
src/main/java/com/jeeplus/modules/oa/dao/OaNotifyDao.java

@@ -39,10 +39,10 @@ public interface OaNotifyDao extends CrudDao<OaNotify> {
 
     void updateProcessIdAndStatus(OaNotify oaNotify);
 
-    //我的通告(未)
+    //我的通告(未过期)
     List<OaNotify> findUnReadList(OaNotify oaNotify);
 
-    //我的通告(已)
+    //我的通告(已过期)
     List<OaNotify> findReadList(OaNotify oaNotify);
 
     /**

+ 2 - 2
src/main/java/com/jeeplus/modules/oa/web/OaNotifyController.java

@@ -71,7 +71,7 @@ public class OaNotifyController extends BaseController {
 		}
 		return entity;
 	}
-	//我的通告
+	//我的通告(未过期)
 	@RequestMapping(value = {"self"})
 	public String listMyself(OaNotify oaNotify, HttpServletRequest request, HttpServletResponse response, Model model) {
 		oaNotify.setSelf(true);
@@ -85,7 +85,7 @@ public class OaNotifyController extends BaseController {
 		model.addAttribute("page", page);
 		return "modules/oa/oaNotifyListMyself";
 	}
-	//我的公告(已
+	//我的公告(已过期
 	@RequestMapping(value = {"readSelf"})
 	public String listReadMyself(OaNotify oaNotify, HttpServletRequest request, HttpServletResponse response, Model model) {
 		oaNotify.setSelf(true);

+ 2 - 7
src/main/resources/mappings/modules/oa/OaNotifyDao.xml

@@ -133,8 +133,6 @@
 		<if test="isSelf">
 			JOIN oa_notify_record r ON r.oa_notify_id = a.id AND r.user_id = #{currentUser.id,jdbcType=VARCHAR}
 		</if>
-		<!-- 关联公告查看表 -->
-		left join work_oa_notify_view wo on a.id =wo.affiche_id and wo.user_id = #{currentUser.id}
 
 		WHERE a.del_flag = #{DEL_FLAG_NORMAL} and close_status = 0
 		<!-- 未读0,已读1 -->
@@ -192,7 +190,7 @@
 		<if test="nowDate != null and nowDate != ''">
 			AND a.start_date &lt;= #{nowDate} AND a.end_date &gt;= #{nowDate}
 		</if>
-		and wo.affiche_id is null
+		and a.end_date &gt;= now()
 		ORDER BY a.update_date DESC
 	</select>
 
@@ -209,8 +207,6 @@
 		<if test="isSelf">
 			JOIN oa_notify_record r ON r.oa_notify_id = a.id AND r.user_id = #{currentUser.id,jdbcType=VARCHAR}
 		</if>
-		<!-- 关联公告查看表 -->
-		left join work_oa_notify_view wo on a.id =wo.affiche_id and wo.user_id = #{currentUser.id}
 
 		WHERE a.del_flag = #{DEL_FLAG_NORMAL} and close_status = 0
 		<!-- 未读0,已读1 -->
@@ -268,8 +264,7 @@
 		<if test="nowDate != null and nowDate != ''">
 			AND a.start_date &lt;= #{nowDate} AND a.end_date &gt;= #{nowDate}
 		</if>
-		and wo.user_id = #{currentUser.id}
-		and wo.id is not null
+		and a.end_date &lt; now()
 		ORDER BY a.update_date DESC
 	</select>
 

+ 2 - 2
src/main/webapp/webpage/modules/oa/oaNotifyListMyself.jsp

@@ -84,8 +84,8 @@
 		<div class="full-width fl">
 			<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
 				<ul class="list-tabs" >
-					<li class="active"><a href="${ctx}/oa/oaNotify/self">未公告</a></li>
-					<li><a href="${ctx}/oa/oaNotify/readSelf">已读公告</a></li>
+					<li class="active"><a href="${ctx}/oa/oaNotify/self">未过期公告</a></li>
+					<li><a href="${ctx}/oa/oaNotify/readSelf">过期公告</a></li>
 				</ul>
 			</div>
 			<div class="contentShadow layui-row" id="queryDiv">

+ 2 - 2
src/main/webapp/webpage/modules/oa/oaNotifyListReadMyself.jsp

@@ -54,8 +54,8 @@
 		<div class="full-width fl">
 			<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
 				<ul class="list-tabs" >
-					<li><a href="${ctx}/oa/oaNotify/self">未公告</a></li>
-					<li class="active"><a href="${ctx}/oa/oaNotify/readSelf">已读公告</a></li>
+					<li><a href="${ctx}/oa/oaNotify/self">未过期公告</a></li>
+					<li class="active"><a href="${ctx}/oa/oaNotify/readSelf">过期公告</a></li>
 				</ul>
 			</div>
 			<div class="contentShadow layui-row" id="queryDiv">