diff --git a/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditManageController.java b/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditManageController.java index 8c37984..0eb4c87 100644 --- a/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditManageController.java +++ b/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditManageController.java @@ -50,7 +50,7 @@ public class preAuditManageController { SELECT * FROM `reimbursement_pre_audit` $condition """); cnd.andEX("YEAR(applyDate)", "=", year); - cnd.andEX("userId", "=", ShiroUtil.getUserId()); + cnd.andEX("unionId", "=", Vi.getUnionId()); cnd.desc("applyDate").desc("opAt"); if (StrUtil.isNotEmpty(notes)) { cnd.andEX("notes", "like", "%" + notes + "%"); diff --git a/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditQueryController.java b/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditQueryController.java index d592174..e1576b2 100644 --- a/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditQueryController.java +++ b/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditQueryController.java @@ -37,23 +37,26 @@ public class preAuditQueryController { @At @ViReturn @RequiresPermissions("reimbursementPreAudit.manage") - public Object pageData(PageForm pageForm, String startDate, String endDate, String notes,String unitId,String unionId) { + public Object pageData(PageForm pageForm, String startDate, String endDate, String notes, String unitId, String unionId) { Cnd cnd = Cnd.NEW(); Sql sql = Sqls.create(""" SELECT * FROM `reimbursement_pre_audit` $condition """); cnd.andEX("applyDate", ">=", startDate); cnd.andEX("applyDate", "<=", endDate); - cnd.andEX("userId", "=", ShiroUtil.getUserId()); - cnd.andEX("auditState", "=", 3); + cnd.andEX("auditState", ">=", 3); cnd.andEX("unitId", "=", unitId); cnd.andEX("unionId", "=", unionId); - cnd.desc("applyDate").desc("opAt"); if (StrUtil.isNotEmpty(notes)) { cnd.andEX("notes", "like", "%" + notes + "%"); } + if (StrUtil.isAllNotEmpty(pageForm.getSearchName(), pageForm.getSearchKeyword())) { + cnd.and(Cnd.likeEX(pageForm.getSearchName(), pageForm.getSearchKeyword())); + } if (StrUtil.isAllNotEmpty(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) { cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy()); + }else{ + cnd.desc("applyDate").desc("opAt"); } sql.setCondition(cnd); return baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); diff --git a/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditSchoolController.java b/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditSchoolController.java index 5d2a391..7e10542 100644 --- a/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditSchoolController.java +++ b/src/main/java/io/v/nutz/reimbursementPreAudit/controller/preAuditSchoolController.java @@ -57,11 +57,14 @@ public class preAuditSchoolController { if (StrUtil.isNotEmpty(notes)) { cnd.andEX("notes", "like", "%" + notes + "%"); } - cnd.andEX("userId", "=", ShiroUtil.getUserId()); - cnd.desc("applyDate").desc("opAt"); + if (StrUtil.isAllNotEmpty(pageForm.getSearchName(), pageForm.getSearchKeyword())) { + cnd.and(Cnd.likeEX(pageForm.getSearchName(), pageForm.getSearchKeyword())); + } if (StrUtil.isAllNotEmpty(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) { cnd.orderBy(pageForm.getPageOrderName(), pageForm.getPageOrderBy()); + }else{ + cnd.desc("applyDate").desc("opAt"); } sql.setCondition(cnd); return baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); diff --git a/src/main/resources/views/platform/reimbursementPreAudit/audit.html b/src/main/resources/views/platform/reimbursementPreAudit/audit.html index 5e9a36f..91064e5 100644 --- a/src/main/resources/views/platform/reimbursementPreAudit/audit.html +++ b/src/main/resources/views/platform/reimbursementPreAudit/audit.html @@ -16,22 +16,40 @@ layout("/layouts/platform.html"){