Commit 43f6037dab2bcc4a58a368145e6a4b158ee14b56

Authored by 273548560@qq.com
2 parents 7363c29c a79ad7c9

Merge remote-tracking branch 'origin/dev' into dev

trash-activiti/src/main/java/com/trash/activiti/controller/TaskController.java
... ... @@ -2,6 +2,7 @@ package com.trash.activiti.controller;
2 2  
3 3  
4 4 import com.github.pagehelper.Page;
  5 +import com.trash.common.annotation.RepeatSubmit;
5 6 import com.trash.common.core.controller.BaseController;
6 7 import com.trash.common.core.domain.AjaxResult;
7 8 import com.trash.common.core.page.PageDomain;
... ... @@ -53,6 +54,7 @@ public class TaskController extends BaseController {
53 54  
54 55 //保存表单
55 56 @PostMapping(value = "/formDataSave/{taskID}")
  57 + @RepeatSubmit
56 58 public AjaxResult formDataSave(@PathVariable("taskID") String taskID,
57 59 @RequestBody List<ActWorkflowFormDataDTO> formData ) throws ParseException {
58 60 return toAjax(actTaskService.formDataSave(taskID, formData));
... ...
trash-activiti/src/main/java/com/trash/activiti/service/impl/ActTaskServiceImpl.java
... ... @@ -54,286 +54,283 @@ import com.trash.common.utils.spring.SpringUtils;
54 54 @Service
55 55 public class ActTaskServiceImpl implements IActTaskService {
56 56  
57   - @Autowired
58   - private RepositoryService repositoryService;
59   -
60   - @Autowired
61   - private myTaskService taskRuntime;
62   -
63   - @Autowired
64   - private TaskService taskService;
65   -
66   - @Autowired
67   - private RuntimeService runtimeService;
68   -
69   - @Autowired
70   - private IActWorkflowFormDataService actWorkflowFormDataService;
71   -
72   -
73   - @Autowired
74   - private ActReDeploymentMapper actMapper;
75   -
76   - @Autowired
77   - SecurityManager securityManager;
78   -
79   - @Autowired
80   - UserGroupManager userGroupManager;
81   -
82   - HistoricProcessInstanceQuery processInstanceQuery;
  57 + @Autowired
  58 + private RepositoryService repositoryService;
83 59  
  60 + @Autowired
  61 + private myTaskService taskRuntime;
84 62  
85   - @Override
86   - public Page<ActTaskDTO> selectProcessDefinitionList(PageDomain pageDomain) {
87   - Page<ActTaskDTO> list = new Page<ActTaskDTO>();
88   -
  63 + @Autowired
  64 + private TaskService taskService;
89 65  
90   -// if (ServletUtils.getParameter("role") != null) {
91   -// List<String> posts = new ArrayList<>();
92   -// posts.add(ServletUtils.getParameter("role"));
93   -// SecurityUtils.getLoginUser().getUser().setPostIds(posts);
94   -// }
95   -// if (ServletUtils.getParameter("dept") != null) {
96   -// List<String> roles = new ArrayList<>();
97   -// roles.add(ServletUtils.getParameter("dept"));
98   -// SecurityUtils.getLoginUser().getUser().setRoleIds(roles);
99   -// }
100   -// if (SecurityUtils.getLoginUser().getUser().getPostIds().size() == 0 || SecurityUtils.getLoginUser().getUser().getRoleIds().size() == 0) {
101   -// return list;
102   -// }
103   -
104   -
105   - org.activiti.api.runtime.shared.query.Page<Task> pageTasks = taskRuntime.tasks(Pageable.of((pageDomain.getPageNum() - 1) * pageDomain.getPageSize(), pageDomain.getPageSize()));
106   -
107   - List<Task> tasks = pageTasks.getContent();
108   - int totalItems = pageTasks.getTotalItems();
109   - list.setTotal(totalItems);
110   - if (totalItems != 0) {
111   - Set<String> processInstanceIdIds = tasks.parallelStream().map(t -> t.getProcessInstanceId()).collect(Collectors.toSet());
112   -
113   - List<ProcessInstance> processInstanceList = runtimeService.createProcessInstanceQuery().processInstanceIds(processInstanceIdIds).list();
114   - Set<String> idString = new HashSet<String>();
115   - for(ProcessInstance pi:processInstanceList){
116   - idString.add(pi.getBusinessKey());
117   - }
118   -
119   - List<Map<String, String>> maps = actMapper.selectWorkByIds(idString);
120   -
121   - List<ActTaskDTO> actTaskDTOS = tasks.stream().map(t -> new ActTaskDTO(t,
122   - processInstanceList.parallelStream().filter(pi -> t.getProcessInstanceId().equals(pi.getId())).findAny().get(),
123   - maps.parallelStream().filter(pi -> t.getProcessInstanceId().equals(pi.get("instance_id"))).findAny().get())).collect(Collectors.toList());
  66 + @Autowired
  67 + private RuntimeService runtimeService;
124 68  
125   - list.addAll(actTaskDTOS);
126   - }
127   - return list;
128   - }
  69 + @Autowired
  70 + private IActWorkflowFormDataService actWorkflowFormDataService;
129 71  
130   - @Override
131   - public Page<ActTaskDTO> selectTaskEndHistoryDefinitionList(PageDomain pageDomain) {
132   - Page<ActTaskDTO> list = new Page<ActTaskDTO>();
133   -
134   - ProcessEngine pes = ProcessEngines.getDefaultProcessEngine();
135   - HistoryService historyService = pes.getHistoryService();
136   -
137   - String username = securityManager.getAuthenticatedUserId();
138   -
139   - List<String> collect = actMapper.selectCompleteWorkByUsername(username);
140   -
141   - if (collect.size() > 0) {
142   - Set<String> set = new HashSet(collect);
143   -
144   - List<HistoricProcessInstance> processInstanceList = historyService.createHistoricProcessInstanceQuery().involvedUser(username).processInstanceIds(set).list();
145   -
146   - Set<String> idString = new HashSet<String>();
147   - for(HistoricProcessInstance pi:processInstanceList){
148   - idString.add(pi.getId());
149   - }
150   -
151   - List<Map<String, String>> maps = actMapper.selectHistoryWorkByPIds(idString);
152   -
153   - list.setTotal(processInstanceList.size());
154   -
155   - if (processInstanceList.size() > 0) {
156   - for (HistoricProcessInstance p : processInstanceList) {
157   - ActTaskDTO actTaskDTOS = new ActTaskDTO(p, maps.parallelStream().filter(pi -> p.getId().equals(pi.get("instance_id"))).findAny().get());
158   -
159   - getCheckData(actTaskDTOS);
160   -
161   - list.add(actTaskDTOS);
162   - }
163   -
164   - }
165   - }
166   -
167   - list.setPageNum(pageDomain.getPageNum());
168   - list.setPageSize(pageDomain.getPageSize());
169   -
170   - list.setTotal(list.size());
171   -
172   - return list;
173   - }
174   -
175   -
176   - @Override
177   - public Page<ActTaskDTO> selectRuntimeTaskHistoryDefinitionList(PageDomain pageDomain) {
178   - Page<ActTaskDTO> list = new Page<ActTaskDTO>();
179   -
180   - Set<String> collect = actMapper.selectUnCompleteWorkByUsername(securityManager.getAuthenticatedUserId());
181   -
182   - if (collect.size() > 0) {
183   -
184   - List<ProcessInstance> processInstanceList = runtimeService.createProcessInstanceQuery().processInstanceIds(collect).list();
185   -
186   - list.setTotal(processInstanceList.size());
187   -
188   - Set<String> idString = new HashSet<String>();
189   - for(ProcessInstance pi:processInstanceList){
190   - idString.add(pi.getBusinessKey());
191   - }
192   -
193   - List<Map<String, String>> maps = actMapper.selectWorkByIds(idString);
194   -
195   -
196   - if (processInstanceList.size() > 0) {
197   - for (ProcessInstance p : processInstanceList) {
198   - ActTaskDTO actTaskDTOS = new ActTaskDTO(p, maps.parallelStream().filter(pi -> p.getProcessInstanceId().equals(pi.get("instance_id"))).findAny().get());
199   -
200   - getCheckData(actTaskDTOS);
201   -
202   - list.add(actTaskDTOS);
203   - }
204   -
205   - }
206   - }
207   -
208   - list.setPageNum(pageDomain.getPageNum());
209   - list.setPageSize(pageDomain.getPageSize());
210   -
211   - list.setTotal(list.size());
212   - return list;
213   - }
214   -
215   -
216   - public void getCheckData(ActTaskDTO actTaskDTOS) {
217   - ActWorkflowFormData ActWorkflowFormData = new ActWorkflowFormData();
218   - ActWorkflowFormData.setBusinessKey(actTaskDTOS.getBusinessKey());
219   - ActWorkflowFormData.setCreateBy(securityManager.getAuthenticatedUserId());
220   - ActWorkflowFormData.setControlName("审批");
221   -
222   - actTaskDTOS.setCheckStatus(actWorkflowFormDataService.selectActWorkflowFormDataList(ActWorkflowFormData).get(0).getControlValue().equals("通过") ? "0" : "1");
223   - }
224   -
225   - SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:SS");
226   -
227   - @Override
228   - public List<String> formDataShow(String taskID) {
229   - Task task = taskRuntime.task(taskID);
230   - /*
231   - * ---------------------------------------------------------------------
232   - * --------- FormProperty_0ueitp2--__!!类型--__!!名称--__!!是否参数--__!!默认值 例子:
233   - * FormProperty_0lovri0--__!!string--__!!姓名--__!!f--__!!同意!!__--驳回
234   - * FormProperty_1iu6onu--__!!int--__!!年龄--__!!s
235   - *
236   - * 默认值:无、字符常量、FormProperty_开头定义过的控件ID
237   - * 是否参数:f为不是参数,s是字符,t是时间(不需要int,因为这里int等价于string)
238   - * 注:类型是可以获取到的,但是为了统一配置原则,都配置到
239   - */
240   -
241   - // 注意!!!!!!!!:表单Key必须要任务编号一模一样,因为参数需要任务key,但是无法获取,只能获取表单key“task.getFormKey()”当做任务key
242   - UserTask userTask = (UserTask) repositoryService.getBpmnModel(task.getProcessDefinitionId())
243   - .getFlowElement(task.getFormKey());
244   -
245   - if (userTask == null) {
246   - return null;
247   - }
248   - List<FormProperty> formProperties = userTask.getFormProperties();
249   - List<String> collect = formProperties.stream().map(fp -> fp.getId()).collect(Collectors.toList());
  72 + @Autowired
  73 + private ActReDeploymentMapper actMapper;
250 74  
251   - return collect;
252   - }
  75 + @Autowired
  76 + SecurityManager securityManager;
253 77  
254   - @Override
255   - public int formDataSave(String taskID, List<ActWorkflowFormDataDTO> awfs) throws ParseException {
256   - Task task = taskRuntime.task(taskID);
  78 + @Autowired
  79 + UserGroupManager userGroupManager;
257 80  
  81 + HistoricProcessInstanceQuery processInstanceQuery;
258 82  
259   - ProcessInstance processInstance = runtimeService.createProcessInstanceQuery()
260   - .processInstanceId(task.getProcessInstanceId()).singleResult();
261   -
262   - Map<String, Object> str = processInstance.getProcessVariables();
  83 + @Override
  84 + public Page<ActTaskDTO> selectProcessDefinitionList(PageDomain pageDomain) {
  85 + Page<ActTaskDTO> list = new Page<ActTaskDTO>();
  86 +
  87 + // if (ServletUtils.getParameter("role") != null) {
  88 + // List<String> posts = new ArrayList<>();
  89 + // posts.add(ServletUtils.getParameter("role"));
  90 + // SecurityUtils.getLoginUser().getUser().setPostIds(posts);
  91 + // }
  92 + // if (ServletUtils.getParameter("dept") != null) {
  93 + // List<String> roles = new ArrayList<>();
  94 + // roles.add(ServletUtils.getParameter("dept"));
  95 + // SecurityUtils.getLoginUser().getUser().setRoleIds(roles);
  96 + // }
  97 + // if (SecurityUtils.getLoginUser().getUser().getPostIds().size() == 0
  98 + // || SecurityUtils.getLoginUser().getUser().getRoleIds().size() == 0) {
  99 + // return list;
  100 + // }
  101 +
  102 + org.activiti.api.runtime.shared.query.Page<Task> pageTasks = taskRuntime
  103 + .tasks(Pageable.of((pageDomain.getPageNum() - 1) * pageDomain.getPageSize(), pageDomain.getPageSize()));
  104 +
  105 + List<Task> tasks = pageTasks.getContent();
  106 + int totalItems = pageTasks.getTotalItems();
  107 + list.setTotal(totalItems);
  108 + if (totalItems != 0) {
  109 + Set<String> processInstanceIdIds = tasks.parallelStream().map(t -> t.getProcessInstanceId())
  110 + .collect(Collectors.toSet());
  111 +
  112 + List<ProcessInstance> processInstanceList = runtimeService.createProcessInstanceQuery()
  113 + .processInstanceIds(processInstanceIdIds).list();
  114 + Set<String> idString = new HashSet<String>();
  115 + for (ProcessInstance pi : processInstanceList) {
  116 + idString.add(pi.getBusinessKey());
  117 + }
  118 +
  119 + List<Map<String, String>> maps = actMapper.selectWorkByIds(idString);
  120 +
  121 + List<ActTaskDTO> actTaskDTOS = tasks.stream()
  122 + .map(t -> new ActTaskDTO(t,
  123 + processInstanceList.parallelStream()
  124 + .filter(pi -> t.getProcessInstanceId().equals(pi.getId())).findAny().get(),
  125 + maps.parallelStream().filter(pi -> t.getProcessInstanceId().equals(pi.get("instance_id")))
  126 + .findAny().get()))
  127 + .collect(Collectors.toList());
  128 +
  129 + list.addAll(actTaskDTOS);
  130 + }
  131 + return list;
  132 + }
  133 +
  134 + @Override
  135 + public Page<ActTaskDTO> selectTaskEndHistoryDefinitionList(PageDomain pageDomain) {
  136 + Page<ActTaskDTO> list = new Page<ActTaskDTO>();
  137 +
  138 + ProcessEngine pes = ProcessEngines.getDefaultProcessEngine();
  139 + HistoryService historyService = pes.getHistoryService();
  140 +
  141 + String username = securityManager.getAuthenticatedUserId();
  142 +
  143 + List<String> collect = actMapper.selectCompleteWorkByUsername(username);
  144 +
  145 + if (collect.size() > 0) {
  146 + Set<String> set = new HashSet(collect);
  147 +
  148 + List<HistoricProcessInstance> processInstanceList = historyService.createHistoricProcessInstanceQuery()
  149 + .involvedUser(username).processInstanceIds(set).list();
  150 +
  151 + Set<String> idString = new HashSet<String>();
  152 + for (HistoricProcessInstance pi : processInstanceList) {
  153 + idString.add(pi.getId());
  154 + }
  155 +
  156 + List<Map<String, String>> maps = actMapper.selectHistoryWorkByPIds(idString);
  157 +
  158 + list.setTotal(processInstanceList.size());
  159 +
  160 + if (processInstanceList.size() > 0) {
  161 + for (HistoricProcessInstance p : processInstanceList) {
  162 + ActTaskDTO actTaskDTOS = new ActTaskDTO(p, maps.parallelStream()
  163 + .filter(pi -> p.getId().equals(pi.get("instance_id"))).findAny().get());
  164 +
  165 + getCheckData(actTaskDTOS);
  166 +
  167 + list.add(actTaskDTOS);
  168 + }
  169 +
  170 + }
  171 + }
  172 +
  173 + list.setPageNum(pageDomain.getPageNum());
  174 + list.setPageSize(pageDomain.getPageSize());
  175 +
  176 + list.setTotal(list.size());
  177 +
  178 + return list;
  179 + }
  180 +
  181 + @Override
  182 + public Page<ActTaskDTO> selectRuntimeTaskHistoryDefinitionList(PageDomain pageDomain) {
  183 + Page<ActTaskDTO> list = new Page<ActTaskDTO>();
  184 +
  185 + Set<String> collect = actMapper.selectUnCompleteWorkByUsername(securityManager.getAuthenticatedUserId());
  186 +
  187 + if (collect.size() > 0) {
  188 +
  189 + List<ProcessInstance> processInstanceList = runtimeService.createProcessInstanceQuery()
  190 + .processInstanceIds(collect).list();
  191 +
  192 + list.setTotal(processInstanceList.size());
  193 +
  194 + Set<String> idString = new HashSet<String>();
  195 + for (ProcessInstance pi : processInstanceList) {
  196 + idString.add(pi.getBusinessKey());
  197 + }
  198 +
  199 + List<Map<String, String>> maps = actMapper.selectWorkByIds(idString);
  200 +
  201 + if (processInstanceList.size() > 0) {
  202 + for (ProcessInstance p : processInstanceList) {
  203 + ActTaskDTO actTaskDTOS = new ActTaskDTO(p, maps.parallelStream()
  204 + .filter(pi -> p.getProcessInstanceId().equals(pi.get("instance_id"))).findAny().get());
263 205  
264   - String desc = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult().getDescription();
265   - //办文办事功能:分管领导指定部门时,将部门code存入desc
266   - if (!StringUtils.isEmpty(awfs.get(0).getDeptCode())) {
267   - desc = awfs.get(0).getDeptCode();
268   - }
269   -
270   -
271   - Boolean hasVariables = false;// 没有任何参数
272   - HashMap<String, Object> variables = new HashMap<String, Object>();
273   - // 前端传来的字符串,拆分成每个控件
274   - List<ActWorkflowFormData> acwfds = new ArrayList<>();
275   - for (ActWorkflowFormDataDTO awf : awfs) {
276   - ActWorkflowFormData actWorkflowFormData = new ActWorkflowFormData(processInstance.getBusinessKey(), awf,
277   - task);
278   - acwfds.add(actWorkflowFormData);
279   - // 构建参数集合
280   - if (!"f".equals(awf.getControlIsParam())) {
281   - variables.put(awf.getControlId(), awf.getControlValue());
282   - hasVariables = true;
283   - }
284   -
285   - if (processInstance.getProcessDefinitionKey().equals("handleAffairs") && awf.getControlId().equals("FormProperty_0aq22i0")) {
286   - variables.put("index", awf.getIndex());
287   - }
288   - } // for结束
289   - if (task.getAssignee() == null)
290   - {
291   - taskRuntime.claim(TaskPayloadBuilder.claim().withTaskId(task.getId()).build());
292   - }
293   - if (hasVariables) {
294   - // 带参数完成任务
295   - taskRuntime.complete(TaskPayloadBuilder.complete().withTaskId(taskID).withVariables(variables).build());
296   - } else {
297   - taskRuntime.complete(TaskPayloadBuilder.complete().withTaskId(taskID).build());
298   - }
299   -
300   - if(desc != null)
301   - updateThreesetpTask(processInstance, desc);
302   -
303   -
304   - // 写入数据库
305   - return actWorkflowFormDataService.insertActWorkflowFormDatas(acwfds);
306   - }
  206 + getCheckData(actTaskDTOS);
307 207  
  208 + list.add(actTaskDTOS);
  209 + }
  210 +
  211 + }
  212 + }
  213 +
  214 + list.setPageNum(pageDomain.getPageNum());
  215 + list.setPageSize(pageDomain.getPageSize());
  216 +
  217 + list.setTotal(list.size());
  218 + return list;
  219 + }
  220 +
  221 + public void getCheckData(ActTaskDTO actTaskDTOS) {
  222 + ActWorkflowFormData ActWorkflowFormData = new ActWorkflowFormData();
  223 + ActWorkflowFormData.setBusinessKey(actTaskDTOS.getBusinessKey());
  224 + ActWorkflowFormData.setCreateBy(securityManager.getAuthenticatedUserId());
  225 + ActWorkflowFormData.setControlName("审批");
  226 +
  227 + actTaskDTOS.setCheckStatus(actWorkflowFormDataService.selectActWorkflowFormDataList(ActWorkflowFormData).get(0)
  228 + .getControlValue().equals("通过") ? "0" : "1");
  229 + }
  230 +
  231 + SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:SS");
  232 +
  233 + @Override
  234 + public List<String> formDataShow(String taskID) {
  235 + Task task = taskRuntime.task(taskID);
  236 + /*
  237 + * ---------------------------------------------------------------------
  238 + * --------- FormProperty_0ueitp2--__!!类型--__!!名称--__!!是否参数--__!!默认值 例子:
  239 + * FormProperty_0lovri0--__!!string--__!!姓名--__!!f--__!!同意!!__--驳回
  240 + * FormProperty_1iu6onu--__!!int--__!!年龄--__!!s
  241 + *
  242 + * 默认值:无、字符常量、FormProperty_开头定义过的控件ID
  243 + * 是否参数:f为不是参数,s是字符,t是时间(不需要int,因为这里int等价于string)
  244 + * 注:类型是可以获取到的,但是为了统一配置原则,都配置到
  245 + */
  246 +
  247 + // 注意!!!!!!!!:表单Key必须要任务编号一模一样,因为参数需要任务key,但是无法获取,只能获取表单key“task.getFormKey()”当做任务key
  248 + UserTask userTask = (UserTask) repositoryService.getBpmnModel(task.getProcessDefinitionId())
  249 + .getFlowElement(task.getFormKey());
  250 +
  251 + if (userTask == null) {
  252 + return null;
  253 + }
  254 + List<FormProperty> formProperties = userTask.getFormProperties();
  255 + List<String> collect = formProperties.stream().map(fp -> fp.getId()).collect(Collectors.toList());
  256 +
  257 + return collect;
  258 + }
  259 +
  260 + @Override
  261 + public int formDataSave(String taskID, List<ActWorkflowFormDataDTO> awfs) throws ParseException {
  262 + Task task = taskRuntime.task(taskID);
  263 +
  264 + ProcessInstance processInstance = runtimeService.createProcessInstanceQuery()
  265 + .processInstanceId(task.getProcessInstanceId()).singleResult();
  266 +
  267 + Map<String, Object> str = processInstance.getProcessVariables();
  268 +
  269 + String desc = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult()
  270 + .getDescription();
  271 + // 办文办事功能:分管领导指定部门时,将部门code存入desc
  272 + if (!StringUtils.isEmpty(awfs.get(0).getDeptCode())) {
  273 + desc = awfs.get(0).getDeptCode();
  274 + }
  275 +
  276 + Boolean hasVariables = false;// 没有任何参数
  277 + HashMap<String, Object> variables = new HashMap<String, Object>();
  278 + // 前端传来的字符串,拆分成每个控件
  279 + List<ActWorkflowFormData> acwfds = new ArrayList<>();
  280 + for (ActWorkflowFormDataDTO awf : awfs) {
  281 + ActWorkflowFormData actWorkflowFormData = new ActWorkflowFormData(processInstance.getBusinessKey(), awf,
  282 + task);
  283 + acwfds.add(actWorkflowFormData);
  284 + // 构建参数集合
  285 + if (!"f".equals(awf.getControlIsParam())) {
  286 + variables.put(awf.getControlId(), awf.getControlValue());
  287 + hasVariables = true;
  288 + }
  289 +
  290 + if (processInstance.getProcessDefinitionKey().equals("handleAffairs")
  291 + && awf.getControlId().equals("FormProperty_0aq22i0")) {
  292 + variables.put("index", awf.getIndex());
  293 + }
  294 + } // for结束
  295 + if (task.getAssignee() == null) {
  296 + taskRuntime.claim(TaskPayloadBuilder.claim().withTaskId(task.getId()).build());
  297 + }
  298 + if (hasVariables) {
  299 + // 带参数完成任务
  300 + taskRuntime.complete(TaskPayloadBuilder.complete().withTaskId(taskID).withVariables(variables).build());
  301 + } else {
  302 + taskRuntime.complete(TaskPayloadBuilder.complete().withTaskId(taskID).build());
  303 + }
  304 +
  305 + if (desc != null)
  306 + updateThreesetpTask(processInstance, desc);
  307 +
  308 + // 写入数据库
  309 + return actWorkflowFormDataService.insertActWorkflowFormDatas(acwfds);
  310 + }
308 311  
309 312 private void updateThreesetpTask(ProcessInstance processInstance, String placeCode) {
310 313  
311   - org.activiti.engine.task.Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
  314 + org.activiti.engine.task.Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId())
  315 + .singleResult();
312 316  
313   - if(task == null)
  317 + if (task == null)
314 318 return;
315 319  
316 320 task.setDescription(placeCode);
317 321  
318   - if(processInstance.getProcessDefinitionKey().equals("workflow_conract") ||
319   - processInstance.getProcessDefinitionKey().equals("workflow_leave") || processInstance.getProcessDefinitionKey().equals("workflow_caseoffline") ||
320   - processInstance.getProcessDefinitionKey().equals("logistics") || processInstance.getProcessDefinitionKey().equals("conference")
321   - || processInstance.getProcessDefinitionKey().equals("workflow_threestep") || processInstance.getProcessDefinitionKey().equals("workflow_casefile")
322   - || processInstance.getProcessDefinitionKey().equals("handleAffairs") || processInstance.getProcessDefinitionKey().equals("gongwenchuli")){
323   - List<IdentityLink> list = taskService.getIdentityLinksForTask(task.getId());
324   -
325   - if(list.size() == 1){
326   - taskService.addCandidateUser(task.getId(), placeCode);
327   - }
  322 + List<IdentityLink> list = taskService.getIdentityLinksForTask(task.getId());
328 323  
329   - task.setDescription(placeCode);
  324 + if (list.size() == 1) {
  325 + taskService.addCandidateUser(task.getId(), placeCode);
330 326 }
331 327  
  328 + task.setDescription(placeCode);
  329 +
332 330 taskService.saveTask(task);
333 331  
334 332 }
335 333  
336   -
337 334 @Override
338 335 public void deleteProcessById(String type) {
339 336 runtimeService.deleteProcessInstance(type, "删除");
... ... @@ -341,20 +338,18 @@ public class ActTaskServiceImpl implements IActTaskService {
341 338  
342 339 @Override
343 340 public void endAllThreesteptask(String type) {
344   -
345   -
346   -
  341 +
347 342 List<ProcessInstance> processes = runtimeService.createProcessInstanceQuery().processDefinitionKey(type).list();
348 343  
349   - for(ProcessInstance proc:processes){
350   - if(type.equals(proc.getProcessDefinitionKey())){
  344 + for (ProcessInstance proc : processes) {
  345 + if (type.equals(proc.getProcessDefinitionKey())) {
351 346 try {
352   -
  347 +
353 348 String executionId = proc.getSuperExecutionId();
354 349 Map<String, Object> map = proc.getProcessVariables();
355   -
356   -// runtimeService.removeVariable(executionId, variableName);
357   -
  350 +
  351 + // runtimeService.removeVariable(executionId, variableName);
  352 +
358 353 runtimeService.deleteProcessInstance(proc.getId(), "超时");
359 354 } catch (Exception e) {
360 355 e.printStackTrace();
... ...
trash-admin/src/main/resources/application-dev.yml
... ... @@ -16,9 +16,9 @@ trash:
16 16 # 验证码类型 math 数组计算 char 字符验证
17 17 captchaType: math
18 18 # 远程服务器地址
19   - #remotePath: http://175.6.47.84:8008
  19 + remotePath: http://175.6.47.84:8008
20 20 #token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0MzI3NzQ1ODkyfQ.4BrpgD9i_1TwjLRGqa3wo4Ikx8t8Gcl3FzHfjL_uolPnNMm2rd7fCvrUoBBN4Qp4cMGzg9h2Nt4NNx8PYThTaQ
21   - remotePath: http://183.66.242.6:14601
  21 + #remotePath: http://183.66.242.6:14601
22 22 token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0NDU5MjEzNzQ2fQ.85oIrOnU7cz7L_-IGt4Bt1LXDTkFtyrdqNt05K0v9-4nsrrzzpbjbemK-yMlbnUpe4Fx2FFES-Wbw8Yr8ML69w
23 23  
24 24 # 数据源配置
... ...
trash-ui/src/api/three_step.js
... ... @@ -193,8 +193,10 @@
193 193 },
194 194 created() {
195 195 if(window.location.search){
  196 + debugger;
196 197 let arr = window.location.search.split("&");
197   - this.queryParams.pageStatus = arr[0].split("=")[1];
  198 + if(arr[0].split("=")[0] != "?token")
  199 + this.queryParams.pageStatus = arr[0].split("=")[1];
198 200 }
199 201  
200 202  
... ...
trash-ui/src/layout/index.vue
1 1 <template>
2   - <div :class="classObj" class="app-wrapper">
3   - <sidebar class="sidebar-container" />
4   - <div :class="{hasTagsView:needTagsView}" class="main-container">
5   - <tags-view v-if="needTagsView" />
6 2 <app-main />
7   -
8   - </div>
9   - </div>
10 3 </template>
11 4  
12 5 <script>
... ...
trash-ui/src/layout/index5.vue renamed to trash-ui/src/layout/index66.vue
1 1 <template>
  2 + <div :class="classObj" class="app-wrapper">
  3 + <sidebar class="sidebar-container" />
  4 + <div :class="{hasTagsView:needTagsView}" class="main-container">
  5 + <tags-view v-if="needTagsView" />
2 6 <app-main />
  7 +
  8 + </div>
  9 + </div>
3 10 </template>
4 11  
5 12 <script>
... ...
trash-ui/vue.config.js
... ... @@ -41,8 +41,8 @@ module.exports = {
41 41 }
42 42 },
43 43 ['/api']: {
44   - target: `http://183.66.242.6:14601`,
45   - // target: `http://183.66.242.6:6001`,
  44 + // target: `http://183.66.242.6:14601`,
  45 + target: `http://175.6.47.84:8008`,
46 46 changeOrigin: true,
47 47 },
48 48  
... ...