|
@@ -68,6 +68,7 @@ import org.springblade.system.user.vo.InformationQueryVO2;
|
|
import org.springblade.system.user.vo.UserVO;
|
|
import org.springblade.system.user.vo.UserVO;
|
|
import org.springblade.system.user.wrapper.UserWrapper;
|
|
import org.springblade.system.user.wrapper.UserWrapper;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.dao.DataAccessException;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
@@ -1649,8 +1650,11 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
for (String str : fileUserIdAndNames) {
|
|
for (String str : fileUserIdAndNames) {
|
|
String[] strArr = str.split("-");
|
|
String[] strArr = str.split("-");
|
|
if(strArr.length>1){
|
|
if(strArr.length>1){
|
|
- if (!names.contains(strArr[1])) {
|
|
|
|
- names.add(strArr[1]);
|
|
|
|
|
|
+ //判断是否是超级管理员并且是泓创智诚下的部门
|
|
|
|
+ if(!judgeRoleIdAndDeptId(Long.parseLong(strArr[0]))){
|
|
|
|
+ if (!names.contains(strArr[1])) {
|
|
|
|
+ names.add(strArr[1]);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1777,6 +1781,33 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
return page.setRecords(null);
|
|
return page.setRecords(null);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public boolean judgeRoleIdAndDeptId(Long userId ){
|
|
|
|
+ try {
|
|
|
|
+ String sqlForUser = "select role_id ,dept_id from blade_user where id = "+userId;
|
|
|
|
+ User user = jdbcTemplate.queryForObject(sqlForUser, new BeanPropertyRowMapper<>(User.class));
|
|
|
|
+ String sqlforSkipDept = "select id from blade_dept where parent_id = "+ 1536982621165592577L + " or id = "+ 1536982621165592577L;
|
|
|
|
+ List<Dept> depts = jdbcTemplate.query(sqlforSkipDept, new BeanPropertyRowMapper<>(Dept.class));
|
|
|
|
+ String roleId = user.getRoleId();
|
|
|
|
+ String deptId = user.getDeptId();
|
|
|
|
+ //既是超级管理员同时是泓创下面的部门才允许跳过填报人赋值
|
|
|
|
+ if(roleId.contains("1123598816738675201")){
|
|
|
|
+ Boolean flag = false;
|
|
|
|
+ for (Dept dept : depts) {
|
|
|
|
+ if(deptId.contains(dept.getId().toString())){
|
|
|
|
+ flag = true;
|
|
|
|
+ return flag;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return flag;
|
|
|
|
+ }else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ } catch (DataAccessException e) {
|
|
|
|
+ log.error(e.getMessage());
|
|
|
|
+ throw new RuntimeException("校验操作人角色异常");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
private List<String> getSJ(ContractInfo contract, InformationQueryVO vo, List<Long> lowestNodesPkeyIds) {
|
|
private List<String> getSJ(ContractInfo contract, InformationQueryVO vo, List<Long> lowestNodesPkeyIds) {
|
|
/*首件相关*/
|
|
/*首件相关*/
|
|
List<QueryProcessDataVO> queryDataResult = new ArrayList<>();
|
|
List<QueryProcessDataVO> queryDataResult = new ArrayList<>();
|