|
@@ -15,6 +15,7 @@ import com.jeeplus.modules.sg.advence.activiti.entity.Advance;
|
|
|
import com.jeeplus.modules.sg.advence.activiti.service.AdvanceService;
|
|
|
import com.jeeplus.modules.sg.managementcenter.activiti.entity.Construction;
|
|
|
import com.jeeplus.modules.sg.managementcenter.activiti.entity.Disclose;
|
|
|
+import com.jeeplus.modules.sg.managementcenter.activiti.entity.ReturnTodo;
|
|
|
import com.jeeplus.modules.sg.managementcenter.activiti.service.ConstructionService;
|
|
|
import com.jeeplus.modules.sg.managementcenter.activiti.utils.MyActiviUtils;
|
|
|
import com.jeeplus.modules.sg.managementcenter.materialinfo.entity.MaterialInfo;
|
|
@@ -143,8 +144,9 @@ public class ActTaskService extends BaseService {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public Page<HashMap<String, String>> newTodoList(Page<HashMap<String, String>> page, Act act, String xmName) {
|
|
|
+ public Page<HashMap<String, String>> newTodoList(Page<HashMap<String, String>> page, Act act, String reserveProjectName,String projectId,String projectName) {
|
|
|
List<HashMap<String, String>> result = new ArrayList<HashMap<String, String>>();
|
|
|
+ Project project = new Project();
|
|
|
String userId = UserUtils.getUser().getLoginName();//ObjectUtils.toString(UserUtils.getUser().getId());
|
|
|
|
|
|
// =============== 已经签收的任务 ===============
|
|
@@ -163,7 +165,59 @@ public class ActTaskService extends BaseService {
|
|
|
if (act.getEndDate() != null) {
|
|
|
todoTaskQuery.taskCreatedBefore(act.getEndDate());
|
|
|
}
|
|
|
- if (!"".equals(xmName) && xmName != null) {
|
|
|
+ if ((null!=reserveProjectName &&!"".equals(reserveProjectName)) || (null!=projectId && !"".equals(projectId)) || (null!=projectName && !"".equals(projectName))) {
|
|
|
+ if (null!= reserveProjectName && !"".equals(reserveProjectName)) {
|
|
|
+ project.setReserveProjectName(reserveProjectName);
|
|
|
+ }
|
|
|
+ if (null!= projectId && !"".equals(projectId)) {
|
|
|
+ project.setProjectId(projectId);
|
|
|
+ }
|
|
|
+ if (null!= projectName && !"".equals(projectName)) {
|
|
|
+ project.setProjectName(projectName);
|
|
|
+ }
|
|
|
+ ReturnTodo procInsIDAll = constructionService.findProcInsIDAll(project);
|
|
|
+ //通过输入的查询结果获取所有的项目信息
|
|
|
+ if (procInsIDAll!=null) {
|
|
|
+ List<String> strings = new ArrayList<>();
|
|
|
+ String xcProcInsId = procInsIDAll.getXcProcInsId();
|
|
|
+ String scProcInsId = procInsIDAll.getScProcInsId();
|
|
|
+ String xnProcInsId = procInsIDAll.getXnProcInsId();
|
|
|
+ String maProcInsId = procInsIDAll.getMaProcInsId();
|
|
|
+ String xfProcInsId = procInsIDAll.getXfProcInsId();
|
|
|
+ String mmProcInsId = procInsIDAll.getMmProcInsId();
|
|
|
+ String xsProcInsId = procInsIDAll.getXsProcInsId();
|
|
|
+ String mpProcInsId = procInsIDAll.getMpProcInsId();
|
|
|
+ if (null!=xcProcInsId && !"".equals(xcProcInsId)) {
|
|
|
+ strings.add(xcProcInsId);
|
|
|
+ }
|
|
|
+ if (null!=scProcInsId && !"".equals(scProcInsId)) {
|
|
|
+ strings.add(scProcInsId);
|
|
|
+ }
|
|
|
+ if (null!=xnProcInsId && !"".equals(xnProcInsId)) {
|
|
|
+ strings.add(xnProcInsId);
|
|
|
+ }
|
|
|
+ if (null!=maProcInsId && !"".equals(maProcInsId)) {
|
|
|
+ strings.add(maProcInsId);
|
|
|
+ }
|
|
|
+ if (null!=xfProcInsId && !"".equals(xfProcInsId)) {
|
|
|
+ strings.add(xfProcInsId);
|
|
|
+ }
|
|
|
+ if (null!=mmProcInsId && !"".equals(mmProcInsId)) {
|
|
|
+ strings.add(mmProcInsId);
|
|
|
+ }
|
|
|
+ if (null!=xsProcInsId && !"".equals(xsProcInsId)) {
|
|
|
+ strings.add(xsProcInsId);
|
|
|
+ }
|
|
|
+ if (null!=mpProcInsId && !"".equals(mpProcInsId)) {
|
|
|
+ strings.add(mpProcInsId);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (null != strings && strings.size() > 0) {
|
|
|
+ todoTaskQuery.processInstanceIdIn(strings);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+/* if (!"".equals(xmName) && xmName != null) {
|
|
|
List<String> strings = constructionService.insIdByName(xmName);
|
|
|
if (strings != null && strings.size() > 0) {
|
|
|
todoTaskQuery.processInstanceIdIn(strings);
|
|
@@ -171,7 +225,7 @@ public class ActTaskService extends BaseService {
|
|
|
strings.add("");
|
|
|
todoTaskQuery.processInstanceIdIn(strings);
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
|
|
|
// =============== 等待签收的任务 ===============
|
|
@@ -226,8 +280,14 @@ public class ActTaskService extends BaseService {
|
|
|
map.put("task.executionId", task.getExecutionId());
|
|
|
map.put("task.processDefinitionId", task.getProcessDefinitionId());
|
|
|
map.put("task.processInstanceId", task.getProcessInstanceId());
|
|
|
- String s = constructionService.idProjectName(task.getProcessInstanceId());
|
|
|
- if ("".equalsIgnoreCase(s) || null == s) {
|
|
|
+ project.setProcInsId(task.getProcessInstanceId());
|
|
|
+ Project s = constructionService.procInsIdAllName(project);
|
|
|
+ if (null!=s && !"".equals(s)) {
|
|
|
+ map.put("task.projectId", s.getProjectId());
|
|
|
+ map.put("task.projectName", s.getProjectName());
|
|
|
+ map.put("task.reserveProjectName", s.getReserveProjectName());
|
|
|
+ }
|
|
|
+ /*if ("".equalsIgnoreCase(s) || null == s) {
|
|
|
String s2 = constructionService.idProjectName3(task.getProcessInstanceId());
|
|
|
if ("".equalsIgnoreCase(s2) || null == s2) {
|
|
|
String s1 = constructionService.idProjectName2(task.getProcessInstanceId());
|
|
@@ -245,7 +305,7 @@ public class ActTaskService extends BaseService {
|
|
|
}
|
|
|
}else {
|
|
|
map.put("task.projectName", s);
|
|
|
- }
|
|
|
+ }*/
|
|
|
map.put("task.taskDefinitionKey", task.getTaskDefinitionKey());
|
|
|
map.put("vars", task.getProcessVariables());
|
|
|
map.put("procDef.name", ProcessDefCache.get(task.getProcessDefinitionId()).getName());
|