Commit 12066850 by kangxiaoshan

权限

parent bbdf0c21
......@@ -1858,14 +1858,18 @@ public class ContractServiceImpl implements ContractService {
List<Object[]> contactdata = contractRepository.findByContractCode(codesList);
if(contactdata!=null){
Map<String, String> dicdata =contactdata.stream().
collect(Collectors.toMap(p -> p[0].toString(), p -> p[nextIndex].toString(), (key1, key2) -> key1));
if (contactdata != null) {
Map<String, String> dicdata = contactdata.stream().
collect(Collectors.toMap(p -> p[0].toString(), p -> p[nextIndex] == null ? "all" : p[nextIndex].toString(), (key1, key2) -> key1));
return 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
|| "all".equals(authdata.get(dicdata.get(p.getContractCode())))).collect(Collectors.toList());
}else{
} else {
return list;
}
......
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