Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
fc54729b33
|
|
@ -11,6 +11,7 @@ import com.securitycontrol.common.core.utils.JwtUtils;
|
||||||
import com.securitycontrol.common.redis.service.RedisService;
|
import com.securitycontrol.common.redis.service.RedisService;
|
||||||
import com.securitycontrol.common.security.service.TokenService;
|
import com.securitycontrol.common.security.service.TokenService;
|
||||||
import com.securitycontrol.common.security.utils.SecurityUtils;
|
import com.securitycontrol.common.security.utils.SecurityUtils;
|
||||||
|
import com.securitycontrol.system.api.domain.decision.SysMenu;
|
||||||
import com.securitycontrol.system.api.model.LoginUser;
|
import com.securitycontrol.system.api.model.LoginUser;
|
||||||
import io.jsonwebtoken.Claims;
|
import io.jsonwebtoken.Claims;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|
@ -24,8 +25,10 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* token 控制
|
* token 控制
|
||||||
|
|
@ -102,6 +105,7 @@ public class TokenController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验大屏跳转后台校验
|
* 校验大屏跳转后台校验
|
||||||
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @return Result<?>
|
* @return Result<?>
|
||||||
* @description
|
* @description
|
||||||
|
|
@ -116,13 +120,17 @@ public class TokenController {
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
String isAdmin = loginUser.getSysUser().getIsAdmin();
|
String isAdmin = loginUser.getSysUser().getIsAdmin();
|
||||||
String loginType = loginUser.getSysUser().getLoginType();
|
String loginType = loginUser.getSysUser().getLoginType();
|
||||||
if(!Objects.equals(isAdmin, Constant.IS_ADMIN) || !Objects.equals(loginType, Constant.BACK_LOGIN)){
|
List<SysMenu> sysMenuList = loginUser.getSysUser().getMenus();
|
||||||
|
if (Objects.equals(isAdmin, Constant.IS_ADMIN) && Objects.equals(loginType, Constant.BACK_LOGIN)) {
|
||||||
|
List<SysMenu> filterSysMenuList = sysMenuList.stream().filter(e -> !Objects.equals(e.getMenuName(),Constant.SG_SCREEN_NAME)).collect(Collectors.toList());
|
||||||
|
loginUser.getSysUser().setMenus(filterSysMenuList);
|
||||||
|
// 获取登录token
|
||||||
|
map.put("us", loginUser);
|
||||||
|
map.put("access_token", jwtToken);
|
||||||
|
return Result.ok(map, "校验成功");
|
||||||
|
} else {
|
||||||
return Result.fail("用户无访问后台权限");
|
return Result.fail("用户无访问后台权限");
|
||||||
}
|
}
|
||||||
// 获取登录token
|
|
||||||
map.put("us", loginUser);
|
|
||||||
map.put("access_token", jwtToken);
|
|
||||||
return Result.ok(map, "校验成功");
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("施工大屏跳转后台校验", e);
|
log.error("施工大屏跳转后台校验", e);
|
||||||
return Result.fail("校验失败");
|
return Result.fail("校验失败");
|
||||||
|
|
|
||||||
|
|
@ -105,12 +105,11 @@ public class SysLoginService
|
||||||
}
|
}
|
||||||
// 施工大屏菜单权限
|
// 施工大屏菜单权限
|
||||||
if (Objects.equals(loginType, Constant.SG_SCREEN) || Objects.equals(loginType, Constant.SC_SCREEN)) {
|
if (Objects.equals(loginType, Constant.SG_SCREEN) || Objects.equals(loginType, Constant.SC_SCREEN)) {
|
||||||
list = list.stream().filter(e -> Objects.equals(e.getMenuName(),Constant.SG_SCREEN_NAME)).collect(Collectors.toList());
|
return list;
|
||||||
} else {
|
} else {
|
||||||
// 后台菜单权限
|
// 后台菜单权限
|
||||||
list = list.stream().filter(e -> !Objects.equals(e.getMenuName(),Constant.SG_SCREEN_NAME)).collect(Collectors.toList());
|
return list.stream().filter(e -> !Objects.equals(e.getMenuName(),Constant.SG_SCREEN_NAME)).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
return list;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,12 +51,10 @@ public class SignProVo {
|
||||||
|
|
||||||
@ApiModelProperty("可研线路长度")
|
@ApiModelProperty("可研线路长度")
|
||||||
@Length(max = 32, message = "线路长度字符长度不能超过32", groups = {Query.class})
|
@Length(max = 32, message = "线路长度字符长度不能超过32", groups = {Query.class})
|
||||||
@Pattern(regexp = "(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))",message = "线路长度为大于0的数字",groups = {Query.class})
|
|
||||||
private String lineLength;
|
private String lineLength;
|
||||||
|
|
||||||
@ApiModelProperty("可研变电容量")
|
@ApiModelProperty("可研变电容量")
|
||||||
@Length(max = 32, message = "建设规模-线路字符长度不能超过32", groups = {Query.class})
|
@Length(max = 32, message = "建设规模-线路字符长度不能超过32", groups = {Query.class})
|
||||||
@Pattern(regexp = "(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))",message = "变电容量为大于0的数字",groups = {Query.class})
|
|
||||||
private String subsCap;
|
private String subsCap;
|
||||||
|
|
||||||
@ApiModelProperty("单项类型(1:变电;2:线路)")
|
@ApiModelProperty("单项类型(1:变电;2:线路)")
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ public class ParamSecureHandler implements AsyncHandlerInterceptor {
|
||||||
// IResourceService resourceService = (IResourceService) AdapterFactory.getInstance(Constants.CLASS_RESOURCE);
|
// IResourceService resourceService = (IResourceService) AdapterFactory.getInstance(Constants.CLASS_RESOURCE);
|
||||||
|
|
||||||
|
|
||||||
public static final String[] EXCLUDE_URLS = {"/sys/pro/addPro","/sys/pro/editPro","/sys/pro/importProData","/back/personnel/addPersonnel","/back/personnel/editPersonnel","/pageJump"};
|
public static final String[] EXCLUDE_URLS = {"/sys/pro/addPro","/sys/pro/editPro","/sys/pro/importProData","/back/personnel/addPersonnel","/back/personnel/editPersonnel","/pageJump","/validateToken"};
|
||||||
|
|
||||||
public boolean isFileUpload(HttpServletRequest request) {
|
public boolean isFileUpload(HttpServletRequest request) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,6 @@
|
||||||
tjp.pro_name AS proName,
|
tjp.pro_name AS proName,
|
||||||
tjp.pro_no AS proNo,
|
tjp.pro_no AS proNo,
|
||||||
sb.city_name AS orgName,
|
sb.city_name AS orgName,
|
||||||
sd.dict_name AS vlotage,
|
|
||||||
tjp.construction_nature AS constructionNature,
|
tjp.construction_nature AS constructionNature,
|
||||||
tjp.plan_nature AS planNature,
|
tjp.plan_nature AS planNature,
|
||||||
tjp.line,
|
tjp.line,
|
||||||
|
|
@ -250,7 +249,8 @@
|
||||||
tsp.start_date AS startDate,
|
tsp.start_date AS startDate,
|
||||||
tsp.end_date AS endDate,
|
tsp.end_date AS endDate,
|
||||||
tsp.complete_date AS completeDate,
|
tsp.complete_date AS completeDate,
|
||||||
tsp.org_id AS orgId
|
tsp.org_id AS orgId,
|
||||||
|
tsp.signle_no AS signleNo
|
||||||
FROM tb_sign_project tsp
|
FROM tb_sign_project tsp
|
||||||
WHERE tsp.id = #{id}
|
WHERE tsp.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue