commit
This commit is contained in:
@@ -67,8 +67,8 @@ public class FlowTodoCenterController {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
|
||||
cnd.and("ta.actorId", "=", SecurityUtil.getUserId());
|
||||
cnd.andEX("def.category","=",category);
|
||||
if(StrUtil.isNotBlank(searchKeyword)){
|
||||
cnd.andEX("def.category", "=", category);
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike("ins.variable ->> '$.instanceName'", searchKeyword);
|
||||
}
|
||||
cnd.desc("t.createdAt");
|
||||
@@ -111,8 +111,8 @@ public class FlowTodoCenterController {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskState", "=", ProcessTaskStateEnum.FINISHED.getCode());
|
||||
cnd.and("ta.actorId", "=", SecurityUtil.getUserId());
|
||||
cnd.andEX("def.category","=",category);
|
||||
if(StrUtil.isNotBlank(searchKeyword)){
|
||||
cnd.andEX("def.category", "=", category);
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike("ins.variable ->> '$.instanceName'", searchKeyword);
|
||||
}
|
||||
cnd.desc("t.createdAt");
|
||||
@@ -150,8 +150,46 @@ public class FlowTodoCenterController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("ins.operator", "=", SecurityUtil.getUserId());
|
||||
cnd.andEX("def.category","=",category);
|
||||
if(StrUtil.isNotBlank(searchKeyword)){
|
||||
cnd.andEX("def.category", "=", category);
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike("ins.variable ->> '$.instanceName'", searchKeyword);
|
||||
}
|
||||
cnd.groupBy("ins.id");
|
||||
cnd.desc("ins.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = sysUserService.listPageMap(pageNumber, pageSize, sql);
|
||||
List<NutMap> list = pagination.getList();
|
||||
for (NutMap row : list) {
|
||||
NutMap variable = Json.fromJson(NutMap.class, row.getString("variable"));
|
||||
row.put("variable", variable);
|
||||
}
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result completed(Integer pageNumber, Integer pageSize, String searchKeyword, String category) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
ins.id AS instanceId,
|
||||
ins.processDefineId,
|
||||
ins.state,
|
||||
ins.businessNo,
|
||||
ins.operator,
|
||||
ins.variable,
|
||||
ins.createdAt,
|
||||
ins.variable ->> '$.instanceName' AS instanceName,
|
||||
cat.`name` categoryName
|
||||
FROM
|
||||
wf_process_instance ins
|
||||
LEFT JOIN wf_process_define def ON def.id = ins.processDefineId
|
||||
LEFT JOIN wf_process_category cat ON cat.id = def.category
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("ins.state", "=", 20);
|
||||
cnd.and("ins.operator", "=", SecurityUtil.getUserId());
|
||||
if (StrUtil.isNotBlank(searchKeyword)) {
|
||||
cnd.where().andLike("ins.variable ->> '$.instanceName'", searchKeyword);
|
||||
}
|
||||
cnd.groupBy("ins.id");
|
||||
|
||||
@@ -503,5 +503,25 @@ public class SysRoleController {
|
||||
cnd.and(Cnd.exps("parentId", "is", null).or("parentId", "=", ""));
|
||||
return Result.success(Daos.ext(sysRoleService.dao(), fieldFilter).query(Sys_menu.class, cnd));
|
||||
}
|
||||
@At
|
||||
@Ok("json:full")
|
||||
@SaCheckLogin
|
||||
public Result getRoleNames(){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
GROUP_CONCAT(DISTINCT sr.`name`) roleNames
|
||||
FROM
|
||||
`sys_user_role` sur
|
||||
LEFT JOIN sys_role sr ON sr.id = sur.roleId
|
||||
WHERE
|
||||
sur.userId = @userId
|
||||
ORDER BY
|
||||
sr.sort DESC
|
||||
""").setParam("userId", SecurityUtil.getUserId());
|
||||
sql.setCallback(Sqls.callback.map());
|
||||
sysRoleService.dao().execute(sql);
|
||||
return Result.success(sql.getResult());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user