|
@@ -7,6 +7,9 @@ import com.jeeplus.common.TokenProvider;
|
|
|
import com.jeeplus.extension.domain.TaskDefExtension;
|
|
|
import com.jeeplus.extension.service.TaskDefExtensionService;
|
|
|
import com.jeeplus.extension.service.dto.FlowAssigneeDTO;
|
|
|
+import com.jeeplus.flowable.feign.IAssessApi;
|
|
|
+import com.jeeplus.flowable.feign.IFinanceApi;
|
|
|
+import com.jeeplus.flowable.feign.IZsApi;
|
|
|
import com.jeeplus.flowable.utils.FlowableUtils;
|
|
|
import com.jeeplus.flowable.utils.StringUtils;
|
|
|
import com.jeeplus.sys.feign.IUserApi;
|
|
@@ -124,9 +127,36 @@ public class ExtUserTaskActivityBehavior extends UserTaskActivityBehavior {
|
|
|
//如果字符串中包含 "currentUserSql:" 则进行如下代码替换和处理
|
|
|
if(flowAssignee.getValue ().contains("currentUserSql:")){
|
|
|
//对应sql为:select su.* from sys_user_role a left join sys_role sr on sr.id = a.role_id left join sys_user su on su.id = a.user_id left join sys_office so on so.id = su.office_id where sr.en_name= 'bmzr' and so.id = (select office_id from sys_user where id = @currentUser.id)
|
|
|
- //用于查询当前登录人的部门主任人员信息
|
|
|
|
|
|
UserDTO currentUserDTO = SpringUtil.getBean ( IUserApi.class ).getByToken (currentToken);
|
|
|
+
|
|
|
+ if(task.getFormKey().equals("/reimbursement/info/ReimbursementForm")){
|
|
|
+ if(StringUtils.isNotBlank(task.getProcessInstanceId())){
|
|
|
+ //根据processInstanceId查询隶属报销中的创建人信息
|
|
|
+ String createUserId = SpringUtil.getBean(IAssessApi.class).getReimbursementCreateUserIdByProcessInstanceId(task.getProcessInstanceId());
|
|
|
+ if(StringUtils.isNotBlank(createUserId)){
|
|
|
+ currentUserDTO = SpringUtil.getBean ( IUserApi.class ).getById (createUserId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else if(task.getFormKey().equals("/cw/reimbursementApproval/info/ReimbursementForm")){
|
|
|
+
|
|
|
+ if(StringUtils.isNotBlank(task.getProcessInstanceId())){
|
|
|
+ //根据processInstanceId查询隶属报销中的创建人信息
|
|
|
+ String createUserId = SpringUtil.getBean(IFinanceApi.class).getReimbursementCreateUserIdByProcessInstanceId(task.getProcessInstanceId());
|
|
|
+ if(StringUtils.isNotBlank(createUserId)){
|
|
|
+ currentUserDTO = SpringUtil.getBean ( IUserApi.class ).getById (createUserId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else if(task.getFormKey().equals("/zs/reimbursement/info/ReimbursementForm")){
|
|
|
+
|
|
|
+ if(StringUtils.isNotBlank(task.getProcessInstanceId())){
|
|
|
+ //根据processInstanceId查询隶属报销中的创建人信息
|
|
|
+ String createUserId = SpringUtil.getBean(IZsApi.class).getReimbursementCreateUserIdByProcessInstanceId(task.getProcessInstanceId());
|
|
|
+ if(StringUtils.isNotBlank(createUserId)){
|
|
|
+ currentUserDTO = SpringUtil.getBean ( IUserApi.class ).getById (createUserId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
String sql = flowAssignee.getValue ();
|
|
|
if(sql.contains("@currentUser.id")){
|
|
|
//将标志进行去除
|