diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhKhphController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhKhphController.java index c6b3c26..beb6a09 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhKhphController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/ghkh/controller/GhkhKhphController.java @@ -7,8 +7,11 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.dev33.satoken.annotation.SaCheckLogin; import cn.dev33.satoken.annotation.SaCheckPermission; +import com.budwk.app.base.constant.RoleConstant; import com.budwk.app.base.result.Result; import com.budwk.app.base.utils.CommonDownloadUtil; +import com.budwk.app.web.commons.auth.utils.AuthUtil; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.zhgh.dayofficework.ghkh.model.ExamConfig; import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_record; import com.budwk.app.zhgh.dayofficework.ghkh.model.Kh_zb; @@ -67,6 +70,10 @@ public class GhkhKhphController { $condition """); Cnd cnd = Cnd.NEW(); + boolean isAdmin = AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name()); + if(!isAdmin) { + cnd.and("re.union_id", "=", SecurityUtil.getUnionId()); + } cnd.and("re.zb_id ", "=", khid); cnd.and("re.state", "=", 3); cnd.andEX("zb.`annual`","=",annual); @@ -114,6 +121,10 @@ public class GhkhKhphController { $condition """); Cnd cnd = Cnd.NEW(); + boolean isAdmin = AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name()); + if(!isAdmin) { + cnd.and("re.union_id", "=", SecurityUtil.getUnionId()); + } cnd.and("re.zb_id ", "=", khid); cnd.and("re.state", "=", 3); cnd.andEX("zb.`annual`","=",annual); diff --git a/src/main/resources/views/platform/zhgh/dayofficework/ghkh/khph.html b/src/main/resources/views/platform/zhgh/dayofficework/ghkh/khph.html index f405837..25426b3 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/ghkh/khph.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/ghkh/khph.html @@ -53,7 +53,7 @@ layout("/layouts/platform.html"){ show-overflow-tooltip align="center" sortable>