Commit 65f6e355 by yinyong

数据中心--资产负债表-借支单金额调整到其他应收款项中

parent 9e4313ea
......@@ -344,6 +344,7 @@ public class BalanceSheetService {
int rows = 5000;
int page = 1;
try {
param = "?btime=2020-03-15&etime=" + DateTimeUtil.dateToString(datePlusOne, DateTimeUtil.DATE_FORMAT);
SemiPageResultDTO responseDTO = JSONObject.parseObject(HttpUtil.httpGet(getSemiStockLogUrl + param +
"&page=" + page + "&rows=" + rows), SemiPageResultDTO.class);
if(responseDTO.getSuccess() && responseDTO.getData().getTotalItems() > 0){
......@@ -577,14 +578,10 @@ public class BalanceSheetService {
// 应付款项
BigDecimal accountsPayableSum = finishedAccountsPayableSum.add(semiAccountsPayableSum).add(logisticsAccountsPayableSum);
dcBalanceSheet.setAccountsPayable(accountsPayableSum);
// 借支单未还金额
BigDecimal amountBorrowedSum = dcBalanceSheetMapper.getAmountBorrowed(date);
if(amountBorrowedSum == null) amountBorrowedSum = BigDecimal.ZERO;
dcBalanceSheet.setAmountBorrowed(amountBorrowedSum);
// 应收款项(加借支单未还金额)
// 应收款项
BigDecimal accountsReceivableSum = dcSupplierTransactionMapper.getAccountsReceivable(date);
if(accountsReceivableSum == null) accountsReceivableSum = BigDecimal.ZERO;
dcBalanceSheet.setAccountsReceivable(accountsReceivableSum.add(amountBorrowedSum));
dcBalanceSheet.setAccountsReceivable(accountsReceivableSum);
// 成品供应商预付款项
BigDecimal finishedPrepaymentSum = dcSupplierTransactionMapper.getFinishedPrepaymentSum(date);
if(finishedPrepaymentSum == null) finishedPrepaymentSum = BigDecimal.ZERO;
......@@ -742,10 +739,14 @@ public class BalanceSheetService {
BigDecimal shortBorrowBalanceSum = dcShortTermBorrowMapper.getShortTermBorrowBalanceSum(date);
if(shortBorrowBalanceSum == null) shortBorrowBalanceSum = BigDecimal.ZERO;
dcBalanceSheet.setShortTermBorrow(shortBorrowBalanceSum);
// 借支单未还金额
BigDecimal amountBorrowedSum = dcBalanceSheetMapper.getAmountBorrowed(date);
if(amountBorrowedSum == null) amountBorrowedSum = BigDecimal.ZERO;
dcBalanceSheet.setAmountBorrowed(amountBorrowedSum);
// 其他应收款、其他应付款
BigDecimal otherAccountsReceivable = dcOtherCostMapper.getOtherAccountsReceivableSum(date); // 其他应收款
BigDecimal otherAccountsReceivable = dcOtherCostMapper.getOtherAccountsReceivableSum(date); // 其他应收款(加借支单未还金额)
if(otherAccountsReceivable == null) otherAccountsReceivable = BigDecimal.ZERO;
dcBalanceSheet.setOtherAccountsReceivable(otherAccountsReceivable);
dcBalanceSheet.setOtherAccountsReceivable(otherAccountsReceivable.add(amountBorrowedSum));
BigDecimal otherAccountsPayable = dcOtherCostMapper.getOtherAccountsPayableSum(date); // 其他应付款
if(otherAccountsPayable == null) otherAccountsPayable = BigDecimal.ZERO;
dcBalanceSheet.setOtherAccountsPayable(otherAccountsPayable);
......
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