优化收付款单的查询
This commit is contained in:
@@ -23,7 +23,7 @@ public interface AccountHeadMapperEx {
|
||||
@Param("accountId") Long accountId,
|
||||
@Param("status") String status,
|
||||
@Param("remark") String remark,
|
||||
@Param("ahIdList") List<Long> ahIdList,
|
||||
@Param("number") String number,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
@@ -39,7 +39,7 @@ public interface AccountHeadMapperEx {
|
||||
@Param("accountId") Long accountId,
|
||||
@Param("status") String status,
|
||||
@Param("remark") String remark,
|
||||
@Param("ahIdList") List<Long> ahIdList);
|
||||
@Param("number") String number);
|
||||
|
||||
BigDecimal findAllMoney(
|
||||
@Param("supplierId") Integer supplierId,
|
||||
|
||||
@@ -97,9 +97,8 @@ public class AccountHeadService {
|
||||
String [] creatorArray = getCreatorArray(roleType);
|
||||
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
|
||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||
List<Long> ahIdList = accountItemService.getAhIdListByBillNumber(number);
|
||||
List<AccountHeadVo4ListEx> list = accountHeadMapperEx.selectByConditionAccountHead(type, creatorArray, billNo,
|
||||
beginTime, endTime, organId, creator, handsPersonId, accountId, status, remark, ahIdList, offset, rows);
|
||||
beginTime, endTime, organId, creator, handsPersonId, accountId, status, remark, number, offset, rows);
|
||||
if (null != list) {
|
||||
for (AccountHeadVo4ListEx ah : list) {
|
||||
if(ah.getChangeAmount() != null) {
|
||||
@@ -128,9 +127,8 @@ public class AccountHeadService {
|
||||
String [] creatorArray = getCreatorArray(roleType);
|
||||
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
|
||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||
List<Long> ahIdList = accountItemService.getAhIdListByBillNumber(number);
|
||||
result = accountHeadMapperEx.countsByAccountHead(type, creatorArray, billNo,
|
||||
beginTime, endTime, organId, creator, handsPersonId, accountId, status, remark, ahIdList);
|
||||
beginTime, endTime, organId, creator, handsPersonId, accountId, status, remark, number);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user