Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/v4
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.flow.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
@@ -53,7 +54,8 @@ public class FlowTodoCenterController {
|
||||
ins.state AS instanceState,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
cat.`name` categoryName
|
||||
cat.`name` categoryName,
|
||||
ins.variable ->> '$.instanceName' AS instanceName
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
@@ -65,6 +67,10 @@ 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.where().andLike("ins.variable ->> '$.instanceName'", searchKeyword);
|
||||
}
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = sysUserService.listPageMap(pageNumber, pageSize, sql);
|
||||
@@ -92,7 +98,8 @@ public class FlowTodoCenterController {
|
||||
ins.state AS instanceState,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
cat.`name` categoryName
|
||||
cat.`name` categoryName,
|
||||
ins.variable ->> '$.instanceName' AS instanceName
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
@@ -104,6 +111,10 @@ 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.where().andLike("ins.variable ->> '$.instanceName'", searchKeyword);
|
||||
}
|
||||
cnd.desc("t.createdAt");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = sysUserService.listPageMap(pageNumber, pageSize, sql);
|
||||
@@ -127,6 +138,7 @@ public class FlowTodoCenterController {
|
||||
ins.operator,
|
||||
ins.variable,
|
||||
ins.createdAt,
|
||||
ins.variable ->> '$.instanceName' AS instanceName,
|
||||
GROUP_CONCAT(DISTINCT t.displayName) as taskName,
|
||||
cat.`name` categoryName
|
||||
FROM
|
||||
@@ -138,6 +150,11 @@ public class FlowTodoCenterController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("ins.operator", "=", SecurityUtil.getUserId());
|
||||
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);
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.budwk.app.sys.controller.v4;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.sys.models.Sys_menu;
|
||||
import com.budwk.app.sys.models.Sys_module;
|
||||
import com.budwk.app.sys.models.Sys_user_favorite_app;
|
||||
import com.budwk.app.sys.services.SysMenuService;
|
||||
import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -37,6 +39,8 @@ public class SysV4AppsController {
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private SysMenuService sysMenuService;
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
|
||||
@At("/categories")
|
||||
@Ok("json")
|
||||
@@ -59,6 +63,7 @@ public class SysV4AppsController {
|
||||
@SaCheckLogin
|
||||
@ApiOperation("获取应用列表")
|
||||
public Result list(@Param("categoryId") String categoryId, @Param("letter") String letter, @Param("keyword") String keyword, @Param(value = "platform", df = "PC") String platform, HttpServletRequest req) {
|
||||
List<Sys_menu> menus = sysUserService.getMenus(SecurityUtil.getUserId());
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
m.id,
|
||||
@@ -80,6 +85,7 @@ public class SysV4AppsController {
|
||||
cnd.and("m.platform", "=", platform);
|
||||
cnd.and("m.disabled", "=", false);
|
||||
cnd.and(Cnd.exps("m.parentId", "is", null).or("m.parentId", "=", ""));
|
||||
cnd.and("m.id","in", menus.stream().map(Sys_menu::getId).toArray());
|
||||
cnd.andEX("m.moduleId", "=", categoryId);
|
||||
cnd.asc("m.location");
|
||||
if (StrUtil.isNotBlank(keyword)) {
|
||||
|
||||
Reference in New Issue
Block a user