Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java =================================================================== diff -u -r13073 -r13074 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 13073) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/service/JasperReportManagerImpl.java (.../JasperReportManagerImpl.java) (revision 13074) @@ -7698,15 +7698,14 @@ return ret; } - - private void addEntryItem(List ret, GodownEntryItem item) { - if(item == null || ret == null){ + private void addEntryItem(List vos,String supplierName,Long amout,Double cost){ + if(vos == null){ return; } - GodownEntryItemVo vo = CollectionUtils.find(ret, new Predicate (){ + GodownEntryItemVo vo = CollectionUtils.find(vos, new Predicate (){ @Override public boolean evaluate(GodownEntryItemVo object) { - if(StringTools.equals(item.getSupplierName(), object.getSupplierName())){ + if(StringTools.equals(supplierName, object.getSupplierName())){ return true; } return false; @@ -7715,31 +7714,25 @@ }); if(vo == null){ vo = new GodownEntryItemVo(); - vo.setSupplierName(item.getSupplierName()); - ret.add(vo); + vo.setSupplierName(supplierName); + vos.add(vo); } - vo.addAmountAndTotalPrice(item.getAmount(), item.getCost()); + vo.addAmountAndTotalPrice(amout, cost); } - private void addEntryItem(List ret, MaterialEntryItem item) { - if(item == null || ret == null){ + private void addEntryItem(List vos, GodownEntryItem item) { + if(item == null){ return; } - GodownEntryItemVo vo = CollectionUtils.find(ret, new Predicate (){ - @Override - public boolean evaluate(GodownEntryItemVo object) { - if(StringTools.equals(item.getSupplierName(), object.getSupplierName())){ - return true; - } - return false; - } - - }); - if(vo == null){ - vo = new GodownEntryItemVo(); - vo.setSupplierName(item.getSupplierName()); - ret.add(vo); + addEntryItem(vos,item.getSupplierName(),item.getAmount(),item.getCost()); + } + private void addEntryItem(List vos, MaterialEntryItem item) { + if(item == null){ + return; } - vo.addAmountAndTotalPrice((long)item.getAmount(), item.getCost()); + Integer amout = item.getAmount(); + if(amout != null){ + addEntryItem(vos,item.getSupplierName(),amout.longValue(),item.getCost()); + } } @Override