|
@@ -35,6 +35,8 @@ import cn.iocoder.yudao.module.system.api.dept.PostApi;
|
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
|
import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
|
|
import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
|
|
import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
|
|
import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi;
|
|
|
|
+import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
|
|
|
+import cn.iocoder.yudao.module.system.api.permission.dto.DeptDataPermissionRespDTO;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -99,6 +101,9 @@ public class OaUniversalServiceImpl implements OaUniversalService {
|
|
@Resource
|
|
@Resource
|
|
private PostApi postApi;
|
|
private PostApi postApi;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private PermissionApi permissionApi;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public Long stagingOaUniversal(OaUniversalSaveReqVO stagingReqVO) {
|
|
public Long stagingOaUniversal(OaUniversalSaveReqVO stagingReqVO) {
|
|
@@ -119,7 +124,7 @@ public class OaUniversalServiceImpl implements OaUniversalService {
|
|
oaUniversal.setDeptId(loginEmployee.getDeptId());
|
|
oaUniversal.setDeptId(loginEmployee.getDeptId());
|
|
oaUniversal.setPostId(loginEmployee.getPostId());
|
|
oaUniversal.setPostId(loginEmployee.getPostId());
|
|
oaUniversal.setPosition(loginEmployee.getPosition());
|
|
oaUniversal.setPosition(loginEmployee.getPosition());
|
|
- oaUniversal.setCreator(String.valueOf(loginEmployee.getId()));
|
|
+
|
|
oaUniversal.setUserId(loginUserId);
|
|
oaUniversal.setUserId(loginUserId);
|
|
oaUniversal.setAuditStatus(DictDataConstants.OA_AUDIT_STATUS_STAGING);
|
|
oaUniversal.setAuditStatus(DictDataConstants.OA_AUDIT_STATUS_STAGING);
|
|
oaUniversal.setInfoSource("0");
|
|
oaUniversal.setInfoSource("0");
|
|
@@ -175,7 +180,7 @@ public class OaUniversalServiceImpl implements OaUniversalService {
|
|
oaUniversal.setDeptId(loginEmployee.getDeptId());
|
|
oaUniversal.setDeptId(loginEmployee.getDeptId());
|
|
oaUniversal.setPostId(loginEmployee.getPostId());
|
|
oaUniversal.setPostId(loginEmployee.getPostId());
|
|
oaUniversal.setPosition(loginEmployee.getPosition());
|
|
oaUniversal.setPosition(loginEmployee.getPosition());
|
|
- oaUniversal.setCreator(String.valueOf(loginEmployee.getId()));
|
|
+
|
|
oaUniversal.setUserId(loginUserId);
|
|
oaUniversal.setUserId(loginUserId);
|
|
oaUniversal.setInfoSource("0");
|
|
oaUniversal.setInfoSource("0");
|
|
|
|
|
|
@@ -659,6 +664,12 @@ public class OaUniversalServiceImpl implements OaUniversalService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public PageResult<OaUniversalRespVO> getOaUniversalPage(OaUniversalPageReqVO pageReqVO) {
|
|
public PageResult<OaUniversalRespVO> getOaUniversalPage(OaUniversalPageReqVO pageReqVO) {
|
|
|
|
+
|
|
|
|
+ Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
|
|
|
|
+ DeptDataPermissionRespDTO deptDataPermission = permissionApi.getDeptDataPermission(loginUserId);
|
|
|
|
+ pageReqVO.setDeptDataPermission(deptDataPermission);
|
|
|
|
+ pageReqVO.setUserId(loginUserId);
|
|
|
|
+
|
|
PageResult<OaUniversalDO> oaUniversalDOPageResult = oaUniversalMapper.selectPage(pageReqVO);
|
|
PageResult<OaUniversalDO> oaUniversalDOPageResult = oaUniversalMapper.selectPage(pageReqVO);
|
|
PageResult<OaUniversalRespVO> oaUniversalRespVOPageResult = BeanUtils.toBean(oaUniversalDOPageResult, OaUniversalRespVO.class);
|
|
PageResult<OaUniversalRespVO> oaUniversalRespVOPageResult = BeanUtils.toBean(oaUniversalDOPageResult, OaUniversalRespVO.class);
|
|
|
|
|