Commit 43a230e1 authored by zhkwei's avatar zhkwei

财务数据抽取和数据导入记录除了admin只能看到自己的操作记录

parent 70476bbe
...@@ -2155,6 +2155,10 @@ public class DataImportService extends BaseService { ...@@ -2155,6 +2155,10 @@ public class DataImportService extends BaseService {
criteria.andTypeEqualTo(param.getType()).andDisplayEqualTo(true); criteria.andTypeEqualTo(param.getType()).andDisplayEqualTo(true);
criteria.andOrganizationIdIn(orgIds); criteria.andOrganizationIdIn(orgIds);
} }
//财务数据抽取展示抽取记录除了admin能查看所有操作人员的操作,其余人员只能看到本身的
if (!"admin".equals(authUserHelper.getCurrentAuditor().get())) {
criteria.andOperatorEqualTo(authUserHelper.getCurrentAuditor().get());
}
example.setOrderByClause("update_time desc"); example.setOrderByClause("update_time desc");
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize()); Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
PageInfo<DataImportLogDto> pageInfo = new PageInfo<>(dataImportLogMapper.selectByExample(example).stream() PageInfo<DataImportLogDto> pageInfo = new PageInfo<>(dataImportLogMapper.selectByExample(example).stream()
...@@ -2193,7 +2197,12 @@ public class DataImportService extends BaseService { ...@@ -2193,7 +2197,12 @@ public class DataImportService extends BaseService {
DataImportLogExample.Criteria criteria = example.createCriteria(); DataImportLogExample.Criteria criteria = example.createCriteria();
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize()); Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
List<String> orgIds = organizationService.getMyOrgList().stream().map(OrgSelectDto::getId).collect(Collectors.toList()); List<String> orgIds = organizationService.getMyOrgList().stream().map(OrgSelectDto::getId).collect(Collectors.toList());
criteria.andOrganizationIdIn(orgIds).andCreateTimeBetween(strDate, endDate); //财务数据抽取展示抽取记录除了admin能查看所有操作人员的操作,其余人员只能看到本身的
if ("admin".equals(authUserHelper.getCurrentAuditor().get())) {
criteria.andOrganizationIdIn(orgIds).andCreateTimeBetween(strDate, endDate);
} else {
criteria.andOrganizationIdIn(orgIds).andCreateTimeBetween(strDate, endDate).andOperatorEqualTo(authUserHelper.getCurrentAuditor().get());
}
example.setOrderByClause("update_time desc"); example.setOrderByClause("update_time desc");
PageInfo<DataImportLogDto> pageInfo = new PageInfo<>(dataImportLogMapper.selectByExample(example).stream() PageInfo<DataImportLogDto> pageInfo = new PageInfo<>(dataImportLogMapper.selectByExample(example).stream()
.map(o -> beanUtil.copyProperties(o, new DataImportLogDto())).collect(Collectors.toList())); .map(o -> beanUtil.copyProperties(o, new DataImportLogDto())).collect(Collectors.toList()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment