Commit 82665baf by kangxiaoshan

权限

parent d9110314
......@@ -29,4 +29,8 @@ coverage-report
manager.iml
manage.iml
target
\ No newline at end of file
target
.idea/*
*.iml
.idea/workspace.xml
manage.iml
......@@ -1805,14 +1805,14 @@ public class ContractServiceImpl implements ContractService {
if (RoleEnum.FINANCE.getKey().equals(loginAccount.getRole())) {
filterContractMoney(codesList, authdata, list, 1);
list = filterContractMoney(codesList, authdata, list, 1);
} else if (RoleEnum.SALSEMAN.getKey().equals(loginAccount.getRole())) {
filterContractMoney(codesList, authdata, list, 2);
list = filterContractMoney(codesList, authdata, list, 2);
} else if (RoleEnum.PM.getKey().equals(loginAccount.getRole())) {
filterContractMoney(codesList, authdata, list, 3);
list = filterContractMoney(codesList, authdata, list, 3);
}
}
......@@ -1844,17 +1844,17 @@ public class ContractServiceImpl implements ContractService {
return list;
}
private void filterContractMoney(List<String> codesList, Map<String, Object> authdata, List<ContractMoney> list, int nextIndex) {
private List<ContractMoney> filterContractMoney(List<String> codesList, Map<String, Object> authdata, List<ContractMoney> list, int nextIndex) {
if (codesList == null || codesList.size() == 0) {
return;
return list;
}
Map<String, String> dicdata = contractRepository.findByContractCode(
codesList).stream().
collect(Collectors.toMap(p -> p[0].toString(), p -> p[nextIndex].toString(), (key1, key2) -> key1));
list.stream().filter(p -> authdata.get(dicdata.get(p.getContractCode())) == null ? false : true).collect(Collectors.toList());
return list.stream().filter(p -> authdata.get(dicdata.get(p.getContractCode())) == null ? false : true).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