|
|
@ -33,12 +33,17 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder; |
|
|
|
import com.yxt.anrui.flowable.api.flow.*; |
|
|
|
import com.yxt.anrui.flowable.api.flowcomment.FlowComment; |
|
|
|
import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo; |
|
|
|
import com.yxt.anrui.flowable.api.processcomment.ProcessCommentDto; |
|
|
|
import com.yxt.anrui.flowable.biz.flowtask.FlowTaskService; |
|
|
|
import com.yxt.anrui.flowable.biz.process.ProcessService; |
|
|
|
import com.yxt.anrui.flowable.biz.processcomment.ProcessCommentService; |
|
|
|
import com.yxt.anrui.flowable.feign.MessageFeign; |
|
|
|
import com.yxt.anrui.flowable.feign.form.MessageFlowVo; |
|
|
|
import com.yxt.anrui.flowable.feign.form.MessageFlowableQuery; |
|
|
|
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
|
|
|
import com.yxt.anrui.portal.api.sysflowableconfig.SysFlowableConfigFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysflowableconfig.SysFlowableConfigQuery; |
|
|
|
import com.yxt.anrui.portal.api.sysflowableconfig.SysFlowableConfigVvo; |
|
|
|
import com.yxt.anrui.portal.api.sysflowcc.SysFlowccFeign; |
|
|
|
import com.yxt.anrui.portal.api.sysflowcc.SysFlowccVo; |
|
|
|
import com.yxt.anrui.portal.api.sysuser.*; |
|
|
@ -98,6 +103,10 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
private MessageFeign messageFeign; |
|
|
|
@Resource |
|
|
|
protected HistoryService historyService; |
|
|
|
@Autowired |
|
|
|
private SysFlowableConfigFeign sysFlowableConfigFeign; |
|
|
|
@Autowired |
|
|
|
private ProcessCommentService processCommentService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 流程抄送的功能 |
|
|
@ -372,6 +381,9 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
formVariables.put("businessSid", dto.getBusinessSid()); |
|
|
|
String nextUserSid = dto.getNextNodeUserSids(); |
|
|
|
boolean adminContains = false; |
|
|
|
boolean isChange = false; |
|
|
|
String firstName = ""; |
|
|
|
String firstSid = ""; |
|
|
|
if (StringUtils.isBlank(nextUserSid)) { |
|
|
|
ResultBean<UserAndOrgPath> nextNodeUserSidsOfSubmit = getNextNodeUserSidsOfSubmit(dto); |
|
|
|
if (!nextNodeUserSidsOfSubmit.getSuccess()) { |
|
|
@ -382,7 +394,22 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
}else{ |
|
|
|
nextUserSid = nextNodeUserSidsOfSubmit.getData().getUserSid(); |
|
|
|
formVariables.put(BusinessVariables.ORGPATH, nextNodeUserSidsOfSubmit.getData().getOrgPath()); |
|
|
|
|
|
|
|
List<String> nextUserList = Arrays.asList(nextUserSid.split(",")); |
|
|
|
if(nextUserList.size() == 1){ |
|
|
|
firstSid = nextUserList.get(0); |
|
|
|
ResultBean<SysUserVo> sysUserVoResultBean = sysUserFeign.fetchBySid(firstSid); |
|
|
|
if(sysUserVoResultBean.getData() != null){ |
|
|
|
firstName = sysUserVoResultBean.getData().getName(); |
|
|
|
} |
|
|
|
SysFlowableConfigQuery sysFlowableConfigQuery = new SysFlowableConfigQuery(); |
|
|
|
sysFlowableConfigQuery.setUserSid(firstSid); |
|
|
|
sysFlowableConfigQuery.setNowDate(new Date()); |
|
|
|
ResultBean<SysFlowableConfigVvo> sysFlowableConfigVvoResultBean = sysFlowableConfigFeign.selectByUserSid(sysFlowableConfigQuery); |
|
|
|
if(sysFlowableConfigVvoResultBean.getData() != null){ |
|
|
|
nextUserSid = sysFlowableConfigVvoResultBean.getData().getChangeUserSid(); |
|
|
|
isChange = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
String comment = dto.getComment(); |
|
|
@ -428,6 +455,20 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
if (ll.getData().size() > 0) { |
|
|
|
LatestTaskVo latestTaskVo = ll.getData().get(0); |
|
|
|
String id_ = latestTaskVo.getId_(); |
|
|
|
if(isChange){//添加评论
|
|
|
|
ResultBean<SysUserVo> sysUserVoResultBean = sysUserFeign.fetchBySid(nextUserSid); |
|
|
|
ProcessCommentDto processCommentDto = new ProcessCommentDto(); |
|
|
|
processCommentDto.setReviewerSid(firstSid); |
|
|
|
if(sysUserVoResultBean.getData() != null){ |
|
|
|
String changeName = sysUserVoResultBean.getData().getName(); |
|
|
|
processCommentDto.setReviewer(firstName); |
|
|
|
processCommentDto.setContent("交"+changeName+"转办"); |
|
|
|
} |
|
|
|
processCommentDto.setTime(new Date()); |
|
|
|
processCommentDto.setProcessId(dto.getModelId()); |
|
|
|
processCommentDto.setProcessInstSid(dto.getInstanceId()); |
|
|
|
processCommentService.saveOrUpdateDto(processCommentDto); |
|
|
|
} |
|
|
|
taskService.setAssignee(id_, nextUserSid); |
|
|
|
vo.setTaskId(id_); |
|
|
|
//在act_ru_variable表中增加环节上的业务参数的变量
|
|
|
|