|
@@ -7,6 +7,7 @@ import com.github.pagehelper.PageHelper;
|
|
|
import com.platform.common.bean.AbstractPageResultBean;
|
|
|
import com.platform.common.cache.ConfigCache;
|
|
|
import com.platform.common.constant.RedisKeyConstants;
|
|
|
+import com.platform.common.model.UserInfo;
|
|
|
import com.platform.common.util.*;
|
|
|
import com.platform.dao.bean.MyPage;
|
|
|
import com.platform.dao.dto.fill.FillGatherTaskDTO;
|
|
@@ -17,6 +18,7 @@ import com.platform.dao.enums.*;
|
|
|
import com.platform.dao.mapper.fill.*;
|
|
|
import com.platform.dao.mapper.upms.SysUserMapper;
|
|
|
import com.platform.dao.util.MessageTemplateUtil;
|
|
|
+import com.platform.dao.vo.SysRoleVO;
|
|
|
import com.platform.dao.vo.query.fill.FillGatherTaskVO;
|
|
|
import com.platform.dao.vo.query.fill.FillInfoVO;
|
|
|
import com.platform.service.base.impl.BaseServiceImpl;
|
|
@@ -62,6 +64,22 @@ public class FillGatherTaskServiceImpl extends BaseServiceImpl<FillGatherTaskMap
|
|
|
@Override
|
|
|
public AbstractPageResultBean<FillGatherTaskVO> selectPageList(FillGatherTaskDTO record, int pageNum, int pageSize) {
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
+ UserInfo userInfo = SecurityUtils.getUserInfo();
|
|
|
+ String userId = userInfo.getUserId();
|
|
|
+ record.setCreatedUserId(userId);
|
|
|
+ // 获取当前用户角色
|
|
|
+ StringBuilder roleCodes = new StringBuilder();
|
|
|
+ userInfo.getRoleCodes().forEach(item-> {
|
|
|
+ roleCodes.append(item).append(",");
|
|
|
+ });
|
|
|
+ String roleArray = roleCodes.toString();
|
|
|
+ if(roleArray.contains(SysRoleCodeEnum.FILL_CHECKER_LEADER.name())){
|
|
|
+ record.setCreatedUserId(null);
|
|
|
+ record.setCheckLeader(userId);
|
|
|
+ }else if(roleArray.contains(SysRoleCodeEnum.FILL_CHECKER.name())){
|
|
|
+ record.setCreatedUserId(null);
|
|
|
+ record.setChecker(userId);
|
|
|
+ }
|
|
|
return new MyPage(mapper.selectList(record));
|
|
|
}
|
|
|
|