姓名/工号查询

This commit is contained in:
=
2025-10-13 11:27:33 +08:00
parent a451975ebd
commit 0e12c436a7
27 changed files with 174 additions and 244 deletions
@@ -24,6 +24,7 @@ import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
@@ -71,7 +72,7 @@ public class UnionReimburseCollectController {
@Param(value = "unionId") String unionId,
@Param(value = "unitId") String unitId,
@Param(value = "reimburseProject") String reimburseProject,
@Param(value = "userName") String userName) {
@Param(value = "userName") String searchKeyword) {
Sql sql = Sqls.create("""
SELECT
info.*,
@@ -108,9 +109,12 @@ public class UnionReimburseCollectController {
// 报销项目查询条件
cnd.andEX("info.reimburseProject", "=", reimburseProject);
// 经办人姓名查询条件
if (StrUtil.isNotBlank(userName)) {
cnd.and("info.userName", "like", "%" + userName + "%");
// 姓名和工号查询条件
if (StrUtil.isNotBlank(searchKeyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", "%" + searchKeyword + "%");
seg.orLike("info.loginName", "%" + searchKeyword + "%");
cnd.and(seg);
}
// 只查询流程实例状态为20的数据(已完成状态)
@@ -18,6 +18,7 @@ import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
@@ -61,11 +62,11 @@ public class UnionReimburseMineController {
@ApiOperation("分页查询")
@SaCheckPermission(value = {"unionReimburse.mine", "h5.unionReimburse.mine"}, mode = SaMode.OR)
public Result pageData(PageForm pageForm,
@Param(value = "year") Integer year,
@Param(value = "unionId") String unionId,
@Param(value = "unitId") String unitId,
@Param(value = "reimburseProject") String reimburseProject,
@Param(value = "userName") String userName) {
Integer year,
String unionId,
String unitId,
String reimburseProject,
String searchKeyword) {
Sql sql = Sqls.create("""
SELECT
info.*,
@@ -102,9 +103,12 @@ public class UnionReimburseMineController {
// 报销项目查询条件
cnd.andEX("info.reimburseProject", "=", reimburseProject);
// 经办人姓名查询条件
if (StrUtil.isNotBlank(userName)) {
cnd.and("info.userName", "like", "%" + userName + "%");
// 姓名和工号查询条件
if (StrUtil.isNotBlank(searchKeyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", "%" + searchKeyword + "%");
seg.orLike("info.loginName", "%" + searchKeyword + "%");
cnd.and(seg);
}
cnd.desc("info.createTime");
cnd.and("info.userId", "=", SecurityUtil.getUserId());
@@ -18,6 +18,7 @@ import lombok.extern.slf4j.Slf4j;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
@@ -57,7 +58,7 @@ public class UnionReimburseReviewController {
String unionId,
String unitId,
String reimburseProject,
String userName) {
String searchKeyword) {
Sql sql = Sqls.create("""
SELECT
info.*,
@@ -106,9 +107,12 @@ public class UnionReimburseReviewController {
cnd.andEX("info.reimburseProject", "=", reimburseProject);
// 经办人姓名查询条件
if (StrUtil.isNotBlank(userName)) {
cnd.and("info.userName", "like", "%" + userName + "%");
// 姓名和工号查询条件
if (StrUtil.isNotBlank(searchKeyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", "%" + searchKeyword + "%");
seg.orLike("info.loginName", "%" + searchKeyword + "%");
cnd.and(seg);
}
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("info.createTime");
@@ -23,6 +23,7 @@ import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
@@ -70,7 +71,7 @@ public class DsznfmtxCollectController {
Integer year,
String unionId,
String unitId,
String userName,
String searchKeyword,
String sex) {
Sql sql = Sqls.create("""
SELECT
@@ -109,9 +110,12 @@ public class DsznfmtxCollectController {
// 性别查询条件
cnd.andEX("info.sex", "=", sex);
// 姓名查询条件
if (StrUtil.isNotBlank(userName)) {
cnd.and("info.userName", "like", "%" + userName + "%");
// 姓名和工号查询条件
if (StrUtil.isNotBlank(searchKeyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", "%" + searchKeyword + "%");
seg.orLike("info.loginName", "%" + searchKeyword + "%");
cnd.and(seg);
}
// 只查询流程实例状态为20的数据(已完成状态)
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
@@ -59,7 +60,7 @@ public class DsznfmtxSchoolAuditController {
Integer year,
String unionId,
String unitId,
String userName,
String searchKeyword,
String sex) {
Sql sql = Sqls.create("""
SELECT
@@ -108,9 +109,12 @@ public class DsznfmtxSchoolAuditController {
// 性别查询条件
cnd.andEX("info.sex", "=", sex);
// 姓名查询条件
if (StrUtil.isNotBlank(userName)) {
cnd.and("info.userName", "like", "%" + userName + "%");
// 姓名和工号查询条件
if (StrUtil.isNotBlank(searchKeyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", "%" + searchKeyword + "%");
seg.orLike("info.loginName", "%" + searchKeyword + "%");
cnd.and(seg);
}
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("info.applyTime");
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
@@ -59,7 +60,7 @@ public class DsznfmtxUnionAuditController {
Integer year,
String unionId,
String unitId,
String userName,
String searchKeyword,
String sex) {
Sql sql = Sqls.create("""
SELECT
@@ -108,9 +109,12 @@ public class DsznfmtxUnionAuditController {
// 性别查询条件
cnd.andEX("info.sex", "=", sex);
// 姓名查询条件
if (StrUtil.isNotBlank(userName)) {
cnd.and("info.userName", "like", "%" + userName + "%");
// 姓名和工号查询条件
if (StrUtil.isNotBlank(searchKeyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", "%" + searchKeyword + "%");
seg.orLike("info.loginName", "%" + searchKeyword + "%");
cnd.and(seg);
}
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("info.applyTime");
@@ -24,6 +24,7 @@ import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
@@ -71,7 +72,7 @@ public class MaternityLeaveCollectController {
Integer year,
String unionId,
String unitId,
String userName,
String searchKeyword,
String sex) {
Sql sql = Sqls.create("""
SELECT
@@ -110,9 +111,12 @@ public class MaternityLeaveCollectController {
// 性别查询条件
cnd.andEX("info.sex", "=", sex);
// 姓名查询条件
if (StrUtil.isNotBlank(userName)) {
cnd.and("info.userName", "like", "%" + userName + "%");
// 姓名和工号查询条件
if (StrUtil.isNotBlank(searchKeyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", "%" + searchKeyword + "%");
seg.orLike("info.loginName", "%" + searchKeyword + "%");
cnd.and(seg);
}
// 只查询流程实例状态为20的数据(已完成状态)
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
@@ -59,7 +60,7 @@ public class MaternityLeaveSchoolAuditController {
Integer year,
String unionId,
String unitId,
String userName,
String searchKeyword,
String sex) {
Sql sql = Sqls.create("""
SELECT
@@ -108,9 +109,12 @@ public class MaternityLeaveSchoolAuditController {
// 性别查询条件
cnd.andEX("info.sex", "=", sex);
// 姓名查询条件
if (StrUtil.isNotBlank(userName)) {
cnd.and("info.userName", "like", "%" + userName + "%");
// 姓名和工号查询条件
if (StrUtil.isNotBlank(searchKeyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", "%" + searchKeyword + "%");
seg.orLike("info.loginName", "%" + searchKeyword + "%");
cnd.and(seg);
}
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("info.applyTime");
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
@@ -59,7 +60,7 @@ public class MaternityLeaveUnionAuditController {
Integer year,
String unionId,
String unitId,
String userName,
String searchKeyword,
String sex) {
Sql sql = Sqls.create("""
SELECT
@@ -108,9 +109,12 @@ public class MaternityLeaveUnionAuditController {
// 性别查询条件
cnd.andEX("info.sex", "=", sex);
// 姓名查询条件
if (StrUtil.isNotBlank(userName)) {
cnd.and("info.userName", "like", "%" + userName + "%");
// 姓名和工号查询条件
if (StrUtil.isNotBlank(searchKeyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", "%" + searchKeyword + "%");
seg.orLike("info.loginName", "%" + searchKeyword + "%");
cnd.and(seg);
}
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("info.applyTime");
@@ -24,6 +24,7 @@ import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.aop.Aop;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
@@ -71,7 +72,7 @@ public class MutualInsuranceCollectController {
String projectId,
String unionId,
String unitId,
String userName,
String searchKeyword,
String sex) {
Sql sql = Sqls.create("""
SELECT
@@ -113,9 +114,12 @@ public class MutualInsuranceCollectController {
// 性别查询条件
cnd.andEX("info.sex", "=", sex);
// 姓名查询条件
if (StrUtil.isNotBlank(userName)) {
cnd.and("info.userName", "like", "%" + userName + "%");
// 姓名和工号查询条件
if (StrUtil.isNotBlank(searchKeyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.orLike("info.userName", "%" + searchKeyword + "%");
seg.orLike("info.loginName", "%" + searchKeyword + "%");
cnd.and(seg);
}
// 只查询流程实例状态为20的数据(已完成状态)