|
@@ -32,6 +32,7 @@ import org.springblade.system.user.entity.User;
|
|
|
import org.springblade.system.user.feign.IUserClient;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.management.MalformedObjectNameException;
|
|
@@ -394,27 +395,15 @@ public class EVisaTaskCheckController {
|
|
|
next.setDisabled(true);
|
|
|
} else {
|
|
|
//校验流程
|
|
|
- if (eVisaRoleList.size() >= userRoleList.size()) {
|
|
|
- //循环审批人的角色集合,并判断电签配置中是否含有这个角色
|
|
|
- for (JSONObject userRole : userRoleList) {
|
|
|
- if (!eVisaRoleList.contains(userRole.getString("roleId"))) {
|
|
|
- //但凡有个不符合条件,禁选
|
|
|
- next.setDisabled(true);
|
|
|
- //设置提示信息
|
|
|
- String name = jdbcTemplate.queryForObject(" select name from blade_user WHERE id = " + userRole.get("userId"), String.class);
|
|
|
- next.setTips(name + "没有电签权限,请检查电签配置或查看表单是否隐藏");
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- //小于,反向判断
|
|
|
- List<String> userRoleIds = userRoleList.stream().map(jsonObject -> jsonObject.getString("roleId")).distinct().collect(Collectors.toList());
|
|
|
- for (String eVisaRole : eVisaRoleList) {
|
|
|
- if (!userRoleIds.contains(eVisaRole)) {
|
|
|
- //但凡有个不符合条件,禁选
|
|
|
- next.setDisabled(true);
|
|
|
- break;
|
|
|
- }
|
|
|
+ //循环审批人的角色集合,并判断电签配置中是否含有这个角色
|
|
|
+ for (JSONObject userRole : userRoleList) {
|
|
|
+ if (!eVisaRoleList.contains(userRole.getString("roleId"))) {
|
|
|
+ //但凡有个不符合条件,禁选
|
|
|
+ next.setDisabled(true);
|
|
|
+ //设置提示信息
|
|
|
+ String name = jdbcTemplate.queryForObject(" select name from blade_user WHERE id = " + userRole.get("userId"), String.class);
|
|
|
+ next.setTips(name + "没有电签权限,请检查电签配置或查看表单是否隐藏");
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
}
|