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");
|
||||
|
||||
Reference in New Issue
Block a user