Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多环节参与会显示多个任务问题 #203

Open
zhoufoxcn opened this issue May 12, 2020 · 0 comments
Open

多环节参与会显示多个任务问题 #203

zhoufoxcn opened this issue May 12, 2020 · 0 comments

Comments

@zhoufoxcn
Copy link

在一个流程中,如果一个角色在多个环节参与就会显示有多个代办(未处理)或多个已办(已处理)的任务。
HumanTaskConnectorImpl.java中的findPersonalTasks(String userId, String tenantId, int pageNo,
int pageSize)方法,改动后的:
String sql="SELECT task.* FROM task_info task INNER JOIN(SELECT BUSINESS_KEY, MAX(TASK_ID) taskID FROM task_info WHERE assignee=? and TENANT_ID=? AND status='active' GROUP BY BUSINESS_KEY) b ON task.BUSINESS_KEY=b.BUSINESS_KEY AND task.TASK_ID=b.taskId ORDER BY CREATE_TIME DESC";
SQLQuery query=taskInfoManager.getSession().createSQLQuery(sql);
query.setParameter(0, userId).setParameter(1, tenantId);

findFinishedTasks(String userId, String tenantId, int pageNo,
int pageSize)方法,改动后的:
String sql="SELECT task.* FROM task_info task INNER JOIN(SELECT BUSINESS_KEY, MAX(TASK_ID) taskID FROM task_info WHERE assignee=? and TENANT_ID=? AND status='complete' GROUP BY BUSINESS_KEY) b ON task.BUSINESS_KEY=b.BUSINESS_KEY AND task.TASK_ID=b.taskId ORDER BY CREATE_TIME DESC";
SQLQuery query=taskInfoManager.getSession().createSQLQuery(sql);
query.setParameter(0, userId).setParameter(1, tenantId);
query.addEntity(TaskInfo.class);
List taskInfos=query.list();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant