commit
This commit is contained in:
+10
-5
@@ -89,7 +89,7 @@ public class ActivityCultureApplyUserController {
|
||||
int count = dao.count(ActivityUserScope.class,
|
||||
Cnd.where(ActivityUserScope::getUserId, "=", SecurityUtil.getUserId())
|
||||
.and(ActivityUserScope::getGroupId, "=", tissue.getGroupId()));
|
||||
if (count == 0){
|
||||
if (count == 0) {
|
||||
return Result.error("您没有权限报名!");
|
||||
}
|
||||
JSONObject dynamicFormParam = null;
|
||||
@@ -120,14 +120,20 @@ public class ActivityCultureApplyUserController {
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation(value = "队友搜索")
|
||||
public Result queryTeammate(@Valid String keyword,Integer signUpMethod) {
|
||||
public Result queryTeammate(@Valid String keyword, Integer signUpMethod, String tissueId) {
|
||||
Sql sql = Sqls.create("select id userId,username userName,loginname loginName,sex,mobile,unitName from vw_user $condition limit 0,10");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.or(Cnd.likeEX("username", keyword));
|
||||
cnd.or(Cnd.likeEX("loginname", keyword));
|
||||
if (signUpMethod == 3){
|
||||
if (signUpMethod == 3) {
|
||||
cnd.and("unionid", "=", SecurityUtil.getUnionId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(tissueId) && signUpMethod == 2) {
|
||||
List<ActivityTissuePerson> personList = activityCultureApplyUserService.query(Cnd.where(ActivityTissuePerson::getTissueId, "=", tissueId)
|
||||
.and(ActivityTissuePerson::getApplyUserId, "!=", SecurityUtil.getUserId()));
|
||||
List<String> userIds = personList.stream().map(ActivityTissuePerson::getUserId).toList();
|
||||
cnd.andEX("id", "not in", userIds);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = activityCultureApplyUserService.listMap(sql);
|
||||
return Result.success(list);
|
||||
@@ -163,10 +169,9 @@ public class ActivityCultureApplyUserController {
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation(value = "是否报名")
|
||||
public Result isSignUp(@Valid String activityId){
|
||||
public Result isSignUp(@Valid String activityId) {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+6
-5
@@ -110,10 +110,10 @@ public class ActivityCultureUserStatisticsController {
|
||||
}
|
||||
}
|
||||
if (Strings.isNotBlank(page.getSearchKeyword())) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("atp.username", page.getSearchKeyword());
|
||||
group.orLike("atp.loginanme", page.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("atp.userName", page.getSearchKeyword());
|
||||
group.orLike("atp.loginName", page.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
if (StrUtil.isNotBlank(page.getPageOrderName()) && StrUtil.isNotBlank(page.getPageOrderBy())) {
|
||||
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy().equalsIgnoreCase("ascending") ? "ASC" : "DESC");
|
||||
@@ -155,7 +155,7 @@ public class ActivityCultureUserStatisticsController {
|
||||
$condition
|
||||
""").setParam("userId", SecurityUtil.getUserId());
|
||||
|
||||
Cnd cnd =Cnd.where("tissue.activity_type", "=", activity_type);
|
||||
Cnd cnd = Cnd.where("tissue.activity_type", "=", activity_type);
|
||||
cnd.and("tissue.projectTypeCode", "!=", 50004);
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
cnd.and("tissue.signUpMethod", "in", List.of(1, 2, 3));
|
||||
@@ -168,6 +168,7 @@ public class ActivityCultureUserStatisticsController {
|
||||
cnd.and("ins.state", "=", 20);
|
||||
}
|
||||
cnd.andEX("YEAR(tissue.startTime)", "=", year).desc("tissue.startTime");
|
||||
cnd.groupBy("tissue.id");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(activityCultureApplyUserService.list(sql));
|
||||
}
|
||||
|
||||
+8
@@ -18,6 +18,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;
|
||||
@@ -106,6 +107,13 @@ public class ExcellentRecuperationSchoolAuditController {
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("info.userName", pageForm.getSearchKeyword());
|
||||
group.orLike("info.loginName", pageForm.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchName())&& StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||
}
|
||||
|
||||
+6
-2
@@ -10,6 +10,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.IocBean;
|
||||
|
||||
/**
|
||||
@@ -61,8 +62,11 @@ public class ExcellentRecuperationSummaryServiceImpl extends BaseServiceImpl imp
|
||||
cnd.andEX("info.unionId", "=", pageForm.getUnionId());
|
||||
cnd.andEX("info.unitId", "=", pageForm.getUnitId());
|
||||
cnd.and("ins.state", "=", ProcessTaskStateEnum.FINISHED.getCode());
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchName())&& StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||
cnd.where().andLike(pageForm.getSearchName(), pageForm.getSearchKeyword());
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())){
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.orLike("info.userName", pageForm.getSearchKeyword());
|
||||
group.orLike("info.loginName", pageForm.getSearchKeyword());
|
||||
cnd.and(group);
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return sql;
|
||||
|
||||
Reference in New Issue
Block a user