|
@@ -2,6 +2,9 @@ package com.ydtech.modules.order.aop.aspect;
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.ydtech.constants.sys.SystemConstant;
|
|
import com.ydtech.constants.sys.SystemConstant;
|
|
|
|
|
+import com.ydtech.modules.admin.model.SysUserRole;
|
|
|
|
|
+import com.ydtech.modules.admin.service.SysUserRoleService;
|
|
|
|
|
+import com.ydtech.modules.admin.service.SysUserService;
|
|
|
import com.ydtech.modules.base.controller.BaseController;
|
|
import com.ydtech.modules.base.controller.BaseController;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
|
|
|
import com.ydtech.modules.protocol.service.PtlAgreementDeptService;
|
|
import com.ydtech.modules.protocol.service.PtlAgreementDeptService;
|
|
@@ -23,6 +26,8 @@ public class QuoteVerificationAspect {
|
|
|
|
|
|
|
|
private final PtlAgreementDeptService ptlAgreementDeptService;
|
|
private final PtlAgreementDeptService ptlAgreementDeptService;
|
|
|
|
|
|
|
|
|
|
+ private final SysUserRoleService sysUserRoleService;
|
|
|
|
|
+
|
|
|
@Before("@annotation(com.ydtech.modules.order.aop.QuoteVerification)")
|
|
@Before("@annotation(com.ydtech.modules.order.aop.QuoteVerification)")
|
|
|
public void doBefore(JoinPoint point) {
|
|
public void doBefore(JoinPoint point) {
|
|
|
Object[] args = point.getArgs();
|
|
Object[] args = point.getArgs();
|
|
@@ -36,7 +41,9 @@ public class QuoteVerificationAspect {
|
|
|
deptId = new BaseController().getDeptId();
|
|
deptId = new BaseController().getDeptId();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (Arrays.asList(SystemConstant.getSysRoleTeamLeader()).contains(deptId)) { //团队长可查询下面所有人员订单
|
|
|
|
|
|
|
+ String userId = new BaseController().getUserId();
|
|
|
|
|
+ SysUserRole userRole = sysUserRoleService.selectByUserId(userId);
|
|
|
|
|
+ if (Arrays.asList(SystemConstant.getSysRoleTeamLeader()).contains(userRole.getRoleId().toString())) { //团队长可查询下面所有人员订单
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|