优化收付款单的查询

This commit is contained in:
季圣华
2022-11-21 22:24:01 +08:00
parent 60fc7b8d1b
commit 76bcf58e4f
4 changed files with 28 additions and 55 deletions

View File

@@ -261,29 +261,4 @@ public class AccountItemService {
public BigDecimal getEachAmountByBillId(Long billId) {
return accountItemMapperEx.getEachAmountByBillId(billId).abs();
}
public List<Long> getAhIdListByBillNumber(String number) throws Exception {
if(StringUtil.isNotEmpty(number)) {
DepotHead depotHead = depotHeadService.getDepotHead(number);
if(depotHead.getId()!=null) {
List<Long> ahIdList = new ArrayList<>();
AccountItemExample example = new AccountItemExample();
example.createCriteria().andBillIdEqualTo(depotHead.getId()).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
List<AccountItem> list = accountItemMapper.selectByExample(example);
if (list != null && list.size() > 0) {
for(AccountItem accountItem: list) {
ahIdList.add(accountItem.getHeaderId());
}
return ahIdList;
} else {
return null;
}
} else {
return null;
}
} else {
return null;
}
}
}