|
@@ -23,6 +23,9 @@ import com.jeeplus.common.json.AjaxJson;
|
|
|
import com.jeeplus.core.persistence.ActEntity;
|
|
|
import com.jeeplus.modules.act.entity.Act;
|
|
|
import com.jeeplus.modules.act.utils.ProcessDefCache;
|
|
|
+import com.jeeplus.modules.sg.managementcenter.activiti.entity.PersonnelManagement;
|
|
|
+import com.jeeplus.modules.sg.managementcenter.activiti.service.PersonnelManagementService;
|
|
|
+import com.jeeplus.modules.sys.utils.UserUtils;
|
|
|
import org.activiti.bpmn.converter.BpmnXMLConverter;
|
|
|
import org.activiti.bpmn.model.BpmnModel;
|
|
|
import org.activiti.editor.constants.ModelDataJsonConstants;
|
|
@@ -67,6 +70,8 @@ public class ActProcessService extends BaseService {
|
|
|
private HistoryService historyService;
|
|
|
@Autowired
|
|
|
private ActTaskService actTaskService;
|
|
|
+ @Autowired
|
|
|
+ private PersonnelManagementService personnelManagementService;
|
|
|
|
|
|
/**
|
|
|
* 流程定义列表
|
|
@@ -88,22 +93,43 @@ public class ActProcessService extends BaseService {
|
|
|
}else {
|
|
|
processDefinitionList = processDefinitionQuery.listPage(page.getFirstResult(), page.getMaxResults());
|
|
|
}
|
|
|
- for (ProcessDefinition processDefinition : processDefinitionList) {
|
|
|
+
|
|
|
+ String id = UserUtils.getUser().getId();
|
|
|
+ PersonnelManagement personnelManagement = new PersonnelManagement();
|
|
|
+ personnelManagement = personnelManagementService.get(id);
|
|
|
+ String[] strarr = null;
|
|
|
+ if (personnelManagement != null) {
|
|
|
+ String pid = personnelManagement.getPid();
|
|
|
+ strarr = pid.split(";");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ for (ProcessDefinition processDefinition : processDefinitionList) {
|
|
|
String deploymentId = processDefinition.getDeploymentId();
|
|
|
Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
|
|
|
- Map pMap = new HashMap<>();
|
|
|
- pMap.put("id", processDefinition.getId());
|
|
|
- pMap.put("category", processDefinition.getCategory());
|
|
|
- pMap.put("key", processDefinition.getKey());
|
|
|
- pMap.put("name", processDefinition.getName());
|
|
|
- pMap.put("version","V:"+processDefinition.getVersion());
|
|
|
- pMap.put("resourceName", processDefinition.getResourceName());
|
|
|
- pMap.put("description", processDefinition.getDescription());
|
|
|
- pMap.put("diagramResourceName", processDefinition.getDiagramResourceName());
|
|
|
- pMap.put("deploymentId", processDefinition.getDeploymentId());
|
|
|
- pMap.put("suspended", processDefinition.isSuspended());
|
|
|
- pMap.put("deploymentTime",deployment.getDeploymentTime());
|
|
|
- page.getList().add(pMap);
|
|
|
+ Map pMap = new HashMap<>();
|
|
|
+ String id1 = processDefinition.getId();
|
|
|
+ if (strarr != null) {
|
|
|
+ for (String str : strarr) {
|
|
|
+ if (str.equals(id1)) {
|
|
|
+ pMap.put("id", processDefinition.getId());
|
|
|
+ pMap.put("category", processDefinition.getCategory());
|
|
|
+ pMap.put("key", processDefinition.getKey());
|
|
|
+ pMap.put("name", processDefinition.getName());
|
|
|
+ pMap.put("version","V:"+processDefinition.getVersion());
|
|
|
+ pMap.put("resourceName", processDefinition.getResourceName());
|
|
|
+ pMap.put("description", processDefinition.getDescription());
|
|
|
+ pMap.put("diagramResourceName", processDefinition.getDiagramResourceName());
|
|
|
+ pMap.put("deploymentId", processDefinition.getDeploymentId());
|
|
|
+ pMap.put("suspended", processDefinition.isSuspended());
|
|
|
+ pMap.put("deploymentTime",deployment.getDeploymentTime());
|
|
|
+ page.getList().add(pMap);
|
|
|
+ continue;
|
|
|
+ } else {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return page;
|