Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public Iterable<Requirements> getRegistry(String sub, String ticketP,
- String extension_date, String req_num,
- String execution_date, String executor,
- String inn_company, String performer_status) {
- Iterable<Requirements> requirements = iRequirements.findAll();
- List<Object> req = iRequirements.getAlls();
- Iterator<Requirements> iterator = requirements.iterator();
- List<Object> alls = new ArrayList<>();
- while (iterator.hasNext()){
- Requirements requirements1 = iterator.next();
- if(sub != null && !sub.equals("")){
- if (!sub.contains(requirements1.getName_subsidiary())){
- iterator.remove();
- continue;
- }
- }
- if (ticketP != null && !ticketP.equals("")){
- if (!ticketP.contains(String.valueOf(requirements1.getTicketP()))) {
- iterator.remove();
- continue;
- }
- }
- if (extension_date != null && !execution_date.equals("")){
- if (execution_date.contains(requirements1.getName_subsidiary())) {
- iterator.remove();
- continue;
- }
- }
- if (req_num != null && !req_num.equals("")){
- if (req_num.contains(requirements1.getReq_num())){
- iterator.remove();
- continue;
- }
- }
- if (execution_date != null && !execution_date.equals("")){
- if (execution_date.contains(requirements1.getExecution_date().toString())) {
- iterator.remove();
- continue;
- }
- }
- if (executor != null && !executor.equals("")){
- if (executor.contains(requirements1.getExecutor())){
- iterator.remove();
- continue;
- }
- }
- if (inn_company != null && !inn_company.equals("")){
- if (inn_company.contains(requirements1.getInn_company())){
- iterator.remove();
- continue;
- }
- }
- if (performer_status != null && !performer_status.equals("")){
- if (performer_status.contains(requirements1.getPerformerStatus())){
- iterator.remove();
- continue;
- }
- }
- }
- return requirements;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement