|
@@ -433,14 +433,30 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
Long userId = requestUser.getId();
|
|
|
DataPermissionDto dpr = sysUserService.buildUserDataPermission(userId);
|
|
|
+ if (dpr.getHasThirdPmo()) {
|
|
|
+ // 乙方PMO
|
|
|
+ Long userSupplierId = requestUser.getSupplierId();
|
|
|
+ if (userSupplierId == null || userSupplierId == 0) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(String.format("请先在用户管理中绑定[%s]对应的供应商", RoleTypeEnum.THIRD_PMO.getDesc()));
|
|
|
+ }
|
|
|
+ supplierId = userSupplierId;
|
|
|
+ }
|
|
|
|
|
|
return this.baseMapper.query(iPage, serviceId, status, createId, userName, supplierId, custom, sopNo, days, dpr);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<TBDingSubmitQueryResult> query(SysUser account, Long serviceId, String status, Long createId, String userName, Long supplierId, String custom, String sopNo, Long days) {
|
|
|
- Long userId = account.getId();
|
|
|
+ public List<TBDingSubmitQueryResult> query(SysUser requestUser, Long serviceId, String status, Long createId, String userName, Long supplierId, String custom, String sopNo, Long days) {
|
|
|
+ Long userId = requestUser.getId();
|
|
|
DataPermissionDto dpr = sysUserService.buildUserDataPermission(userId);
|
|
|
+ if (dpr.getHasThirdPmo()) {
|
|
|
+ // 乙方PMO
|
|
|
+ Long userSupplierId = requestUser.getSupplierId();
|
|
|
+ if (userSupplierId == null || userSupplierId == 0) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(String.format("请先在用户管理中绑定[%s]对应的供应商",RoleTypeEnum.THIRD_PMO.getDesc()));
|
|
|
+ }
|
|
|
+ supplierId = userSupplierId;
|
|
|
+ }
|
|
|
return this.baseMapper.query(serviceId, status, createId, userName, supplierId, custom, sopNo, days, dpr);
|
|
|
}
|
|
|
|
|
@@ -449,6 +465,14 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
Long userId = requestUser.getId();
|
|
|
DataPermissionDto dpr = sysUserService.buildUserDataPermission(userId);
|
|
|
+ if (dpr.getHasThirdPmo()) {
|
|
|
+ // 乙方PMO
|
|
|
+ Long userSupplierId = requestUser.getSupplierId();
|
|
|
+ if (userSupplierId == null || userSupplierId == 0) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(String.format("请先在用户管理中绑定[%s]对应的供应商",RoleTypeEnum.THIRD_PMO.getDesc()));
|
|
|
+ }
|
|
|
+ supplierId = userSupplierId;
|
|
|
+ }
|
|
|
return this.baseMapper.count(serviceId, createId, userName, supplierId, custom, sopNo, dpr);
|
|
|
}
|
|
|
|
|
@@ -457,6 +481,14 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
Long userId = requestUser.getId();
|
|
|
DataPermissionDto dpr = sysUserService.buildUserDataPermission(userId);
|
|
|
+ if (dpr.getHasThirdPmo()) {
|
|
|
+ // 乙方PMO
|
|
|
+ Long userSupplierId = requestUser.getSupplierId();
|
|
|
+ if (userSupplierId == null || userSupplierId == 0) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(String.format("请先在用户管理中绑定[%s]对应的供应商",RoleTypeEnum.THIRD_PMO.getDesc()));
|
|
|
+ }
|
|
|
+ supplierId = userSupplierId;
|
|
|
+ }
|
|
|
return this.baseMapper.attendanceQuery(iPage, serviceId, userName, startTime, endTime, supplierId, custom, sopNo, Objects.nonNull(type) ? type.name() : null, Objects.nonNull(status) ? status.name() : null, dpr, abnormal);
|
|
|
}
|
|
|
|
|
@@ -465,6 +497,14 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
|
SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
Long userId = requestUser.getId();
|
|
|
DataPermissionDto dpr = sysUserService.buildUserDataPermission(userId);
|
|
|
+ if (dpr.getHasThirdPmo()) {
|
|
|
+ // 乙方PMO
|
|
|
+ Long userSupplierId = requestUser.getSupplierId();
|
|
|
+ if (userSupplierId == null || userSupplierId == 0) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(String.format("请先在用户管理中绑定[%s]对应的供应商",RoleTypeEnum.THIRD_PMO.getDesc()));
|
|
|
+ }
|
|
|
+ supplierId = userSupplierId;
|
|
|
+ }
|
|
|
return this.baseMapper.attendanceCount(serviceId, userName, startTime, endTime, supplierId, custom, sopNo, dpr);
|
|
|
}
|
|
|
|