update 标准征求意见流程-字典翻译
This commit is contained in:
@@ -19,5 +19,6 @@ public class FbCommon {
|
||||
public static final String VARIABLE_PASS_FIRST = "passFirst"; // 主管级领导是否分发
|
||||
public static final String VARIABLE_PASS_SECOND = "passSecond"; // 主管级领导审批是否通过
|
||||
public static final String VARIABLE_PASS_THIRD = "passThird"; // 法规工程师审批是否通过
|
||||
public static final String VARIABLE_PASS_FOURTH = "passFourth"; // 驳回流程是否分发
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
@@ -49,10 +50,14 @@ public class ProcessFbConsultationUserLink implements Serializable {
|
||||
@Excel(name = "模块负责人", width = 15)
|
||||
@ApiModelProperty(value = "模块负责人")
|
||||
private java.lang.String moduleOwnerId;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String moduleOwnerId_dictText;
|
||||
/**设计工程师*/
|
||||
@Excel(name = "设计工程师", width = 15)
|
||||
@ApiModelProperty(value = "设计工程师")
|
||||
private java.lang.String designEngineerId;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String designEngineerId_dictText;
|
||||
/**下发人员类型(1模块负责人、2设计工程师)*/
|
||||
@Excel(name = "下发人员类型(1模块负责人、2设计工程师)", width = 15)
|
||||
@ApiModelProperty(value = "下发人员类型(1模块负责人、2设计工程师)")
|
||||
|
||||
+34
-3
@@ -26,6 +26,8 @@ import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
||||
import com.jero.modules.activiti.service.ProcessNodeLinkService;
|
||||
import com.jero.modules.activiti.service.ProcessNodeService;
|
||||
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.activiti.engine.RuntimeService;
|
||||
import org.activiti.engine.TaskService;
|
||||
@@ -68,6 +70,8 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
private ProcessNodeService processNodeService;
|
||||
@Resource
|
||||
private ProcessNodeLinkService processNodeLinkService;
|
||||
@Resource
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
public static final String EXCEPTION = "目前还未开发,请联系管理员";
|
||||
|
||||
@@ -199,14 +203,14 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
.filter(userLink -> chooseTaskAssignee.equals(userLink.getDepartLeaderId()))
|
||||
.collect(Collectors.toList());
|
||||
if ("1".equals(userLinks.get(0).getUserType())) { // 驳回给模块负责人
|
||||
runtimeService.setVariableLocal(processInstanceId, "passFourth", true);
|
||||
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_PASS_FOURTH, true);
|
||||
List<String> moduleOwnerList = userLinks.stream()
|
||||
.map(ProcessFbConsultationUserLink::getModuleOwnerId)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_MODULE_OWNER_LIST, moduleOwnerList);
|
||||
} else { // 驳回给各部所主管级领导
|
||||
runtimeService.setVariableLocal(processInstanceId, "passFourth", false);
|
||||
runtimeService.setVariableLocal(processInstanceId, FbCommon.VARIABLE_PASS_FOURTH, false);
|
||||
}
|
||||
// 完成驳回任务
|
||||
taskService.complete(chooseTaskId);
|
||||
@@ -320,7 +324,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
String executionParentId = execution.getParentId();
|
||||
String taskDefinitionKey = task.getTaskDefinitionKey(); // 任务定义id
|
||||
List<ProcessFbConsultationUserLink> userLinks;
|
||||
ProcessFbConsultationUserLink userLink;
|
||||
ProcessFbConsultationUserLink userLink = new ProcessFbConsultationUserLink();
|
||||
List<String> linkIds;
|
||||
List<ProcessFbConsultationList> consultationLists = new ArrayList<>();
|
||||
switch (taskDefinitionKey) {
|
||||
@@ -421,9 +425,36 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl<Proces
|
||||
}
|
||||
});
|
||||
|
||||
setUserName(userLink);
|
||||
|
||||
return processInfoVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/28 16:26
|
||||
* @Description: 设置模块负责人和设计工程师的翻译
|
||||
**/
|
||||
private void setUserName(ProcessFbConsultationUserLink userLink) {
|
||||
if (userLink == null) return;
|
||||
String moduleOwnerId = userLink.getModuleOwnerId();
|
||||
String designEngineerId = userLink.getDesignEngineerId();
|
||||
if (StringUtils.isNotBlank(moduleOwnerId)) {
|
||||
List<String> names = new ArrayList<>();
|
||||
List<String> userIds = Arrays.asList(moduleOwnerId.split(","));
|
||||
List<SysUser> users = sysUserService.listByIds(userIds);
|
||||
users.forEach(user -> names.add(user.getUsername() + "(" + user.getRealname() + ")"));
|
||||
userLink.setModuleOwnerId_dictText(StringUtils.join(names, ","));
|
||||
}
|
||||
if (StringUtils.isNotBlank(designEngineerId)) {
|
||||
List<String> names = new ArrayList<>();
|
||||
List<String> userIds = Arrays.asList(designEngineerId.split(","));
|
||||
List<SysUser> users = sysUserService.listByIds(userIds);
|
||||
users.forEach(user -> names.add(user.getUsername() + "(" + user.getRealname() + ")"));
|
||||
userLink.setDesignEngineerId_dictText(StringUtils.join(names, ","));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/11/27 16:50
|
||||
|
||||
Reference in New Issue
Block a user