Commit eb9d24e0 authored by neo's avatar neo

[bugfix] null validate befrom use list.size

parent df2faa4e
......@@ -116,7 +116,7 @@ public class JournalEntryImportServiceImpl {
}
public void ImportJournalEntryData(List<VoucherDtoOnlyForImport> journalEntryList, Integer importType, String userID) {
if (journalEntryList.size() > 0) {
if (journalEntryList != null && journalEntryList.size() > 0) {
Set<Integer> periods = journalEntryList.stream().collect(Collectors.groupingBy(
VoucherDtoOnlyForImport::getPeriod, Collectors.counting())).keySet();
......@@ -228,7 +228,7 @@ public class JournalEntryImportServiceImpl {
criteria.andImportTypeEqualTo(VatImportType.AuditAdjust.getCode());
if (queryDto.getPeriodId() > Constant.WholeYear) criteria.andPeriodEqualTo(queryDto.getPeriodId());
List<Voucher> query = voucherMapper.selectByExample(example);
if(qRsult.getPageInfo()==null)qRsult.setPageInfo(new PagingDto());
if (qRsult.getPageInfo() == null) qRsult.setPageInfo(new PagingDto());
qRsult.getPageInfo().setTotalCount(query.size());
BigDecimal sumDebit = new BigDecimal(0);
BigDecimal sumCredit = new BigDecimal(0);
......@@ -240,7 +240,7 @@ public class JournalEntryImportServiceImpl {
qRsult.getCalculateData().setDebit(sumDebit);
qRsult.getCalculateData().setCredit(sumCredit);
if(qRsult.getPageInfo().getTotalCount()>0){
if (qRsult.getPageInfo().getTotalCount() > 0) {
PagingList pagingList = new PagingList(query, qRsult.getPageInfo());
qRsult.setList(pagingList.getPagingList());
}
......
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