|
@@ -115,7 +115,6 @@ public class ActTaskService extends BaseService {
|
|
List<HashMap<String,String>> result = new ArrayList<HashMap<String,String>>();
|
|
List<HashMap<String,String>> result = new ArrayList<HashMap<String,String>>();
|
|
String userId = UserUtils.getUser().getLoginName();//ObjectUtils.toString(UserUtils.getUser().getId());
|
|
String userId = UserUtils.getUser().getLoginName();//ObjectUtils.toString(UserUtils.getUser().getId());
|
|
|
|
|
|
-
|
|
|
|
// =============== 已经签收的任务 ===============
|
|
// =============== 已经签收的任务 ===============
|
|
TaskQuery todoTaskQuery = taskService.createTaskQuery().taskAssignee(userId).active()
|
|
TaskQuery todoTaskQuery = taskService.createTaskQuery().taskAssignee(userId).active()
|
|
.includeProcessVariables().orderByTaskCreateTime().desc();
|
|
.includeProcessVariables().orderByTaskCreateTime().desc();
|
|
@@ -124,15 +123,20 @@ public class ActTaskService extends BaseService {
|
|
if (StringUtils.isNotBlank(act.getProcDefKey())){
|
|
if (StringUtils.isNotBlank(act.getProcDefKey())){
|
|
todoTaskQuery.processDefinitionKey(act.getProcDefKey());
|
|
todoTaskQuery.processDefinitionKey(act.getProcDefKey());
|
|
}
|
|
}
|
|
|
|
+ //开始时间
|
|
if (act.getBeginDate() != null){
|
|
if (act.getBeginDate() != null){
|
|
todoTaskQuery.taskCreatedAfter(act.getBeginDate());
|
|
todoTaskQuery.taskCreatedAfter(act.getBeginDate());
|
|
}
|
|
}
|
|
|
|
+ //结束时间
|
|
if (act.getEndDate() != null){
|
|
if (act.getEndDate() != null){
|
|
todoTaskQuery.taskCreatedBefore(act.getEndDate());
|
|
todoTaskQuery.taskCreatedBefore(act.getEndDate());
|
|
}
|
|
}
|
|
if (!"".equals(xmName)&&xmName!=null) {
|
|
if (!"".equals(xmName)&&xmName!=null) {
|
|
List<String> strings = constructionService.insIdByName(xmName);
|
|
List<String> strings = constructionService.insIdByName(xmName);
|
|
- if (strings!=null&&strings.size()>0) {
|
|
|
|
|
|
+ if (strings != null && strings.size() > 0) {
|
|
|
|
+ todoTaskQuery.processInstanceIdIn(strings);
|
|
|
|
+ } else {
|
|
|
|
+ strings.add("");
|
|
todoTaskQuery.processInstanceIdIn(strings);
|
|
todoTaskQuery.processInstanceIdIn(strings);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -193,11 +197,14 @@ public class ActTaskService extends BaseService {
|
|
map.put("task.processDefinitionId", task.getProcessDefinitionId());
|
|
map.put("task.processDefinitionId", task.getProcessDefinitionId());
|
|
map.put("task.processInstanceId", task.getProcessInstanceId());
|
|
map.put("task.processInstanceId", task.getProcessInstanceId());
|
|
String s = constructionService.idProjectName(task.getProcessInstanceId());
|
|
String s = constructionService.idProjectName(task.getProcessInstanceId());
|
|
- if ("".equals(s) || s == null) {
|
|
|
|
- String s1 = constructionService.idProjectName2(task.getProcessInstanceId());
|
|
|
|
- map.put("task.projectName", s1);
|
|
|
|
- } else {
|
|
|
|
|
|
+ String s2 = constructionService.idProjectName3(task.getProcessInstanceId());
|
|
|
|
+ String s1 = constructionService.idProjectName2(task.getProcessInstanceId());
|
|
|
|
+ if (!"".equals(s) && s != null) {
|
|
map.put("task.projectName", s);
|
|
map.put("task.projectName", s);
|
|
|
|
+ } else if (!"".equals(s1) && s1 != null){
|
|
|
|
+ map.put("task.projectName", s1);
|
|
|
|
+ } else if (!"".equals(s2) && s2 != null){
|
|
|
|
+ map.put("task.projectName", s2);
|
|
}
|
|
}
|
|
map.put("task.taskDefinitionKey", task.getTaskDefinitionKey());
|
|
map.put("task.taskDefinitionKey", task.getTaskDefinitionKey());
|
|
map.put("vars",task.getProcessVariables());
|
|
map.put("vars",task.getProcessVariables());
|