瀏覽代碼

B端服务费入账

wanglang 2 周之前
父節點
當前提交
1ef9629603

+ 13 - 4
trade-admin/src/main/java/com/trade/admin/finance/paymentcollection/service/impl/BPaymentCollectionServiceImpl.java

@@ -211,10 +211,10 @@ public class BPaymentCollectionServiceImpl implements BPaymentCollectionService
         if (billingIncomeInfo == null) {
             billingIncomeInfo = new BillingIncomeInfo();
             billingIncomeInfo.setAccountNumber(reviewDto.getAccountNumber());
-            // billingIncomeInfo.setAccountName(reviewDto.getAccountName());
+            billingIncomeInfo.setAccountName(reviewDto.getAccountName());
             billingIncomeInfo.setBillingIncomeId(income.getId());
-            // billingIncomeInfo.setBankName(reviewDto.getBankName());
-            // billingIncomeInfo.setOpeningBank(reviewDto.getOpeningBank());
+            billingIncomeInfo.setBankName(reviewDto.getBankName());
+            billingIncomeInfo.setOpeningBank(reviewDto.getOpeningBank());
             billingIncomeInfo.setVoucherNo(reviewDto.getVoucherNo());
             billingIncomeInfoService.save(billingIncomeInfo);
         } else {
@@ -282,8 +282,15 @@ public class BPaymentCollectionServiceImpl implements BPaymentCollectionService
         PaymentCollectionOperate paymentCollectionOperate = paymentCollectionOperateService
                 .getBusinessInfo(income.getId(), 1);
         detailDto.setPaymentCollectionOperate(paymentCollectionOperate);
-        businessRelateFileBaseService.fillBizObjFiles(detailDto, income.getId(),
+        BusinessRelateFile businessRelateFile =  businessRelateFileBaseService.getByCondition(income.getId(),
                 BillingConstant.ERECEIVE_PAYMENT_VOUCHER, FileTypeEnum.DISBURSEMENT_ENTRY.getCode());
+        if (businessRelateFile != null && businessRelateFile.getFileId()!= null) {
+            FileAbstractDto disbursementEntry = new FileAbstractDto(
+                    fileStorageService.getFileStorageById(businessRelateFile.getFileId()));
+            detailDto.setDisbursementEntry(disbursementEntry);
+        }
+//        businessRelateFileBaseService.fillBizObjFiles(detailDto, income.getId(),
+//                BillingConstant.ERECEIVE_PAYMENT_VOUCHER, FileTypeEnum.DISBURSEMENT_ENTRY.getCode());
         // BillingIncomeInfo billingIncomeInfo = billingIncomeInfoService.getBillingIncomeById(id);
         // if (billingIncomeInfo != null) {
         // BankAccountDto bankAccountDto = new BankAccountDto();
@@ -296,6 +303,8 @@ public class BPaymentCollectionServiceImpl implements BPaymentCollectionService
         if (billingIncomeInfo != null) {
             BankAccountDto bankAccountDto = new BankAccountDto();
             bankAccountDto.setAccountNumber(billingIncomeInfo.getAccountNumber());
+            bankAccountDto.setAccountName(billingIncomeInfo.getAccountName());
+            bankAccountDto.setOpeningBank(billingIncomeInfo.getOpeningBank());
             detailDto.setBankAccountDto(bankAccountDto);
             BillingIncomeInfoDto billingIncomeInfoDto = new BillingIncomeInfoDto();
             billingIncomeInfoDto.setVoucherNo(billingIncomeInfo.getVoucherNo());