wanglang 1 hete%!(EXTRA string=óta)
szülő
commit
9c579f630c

+ 23 - 2
trade-admin/src/main/java/com/trade/admin/business/separateaccounts/service/impl/BSeparateAccountsServiceImpl.java

@@ -27,8 +27,11 @@ import com.trade.service.business.separateaccounts.dto.SeparateAccountsSearchDto
 import com.trade.service.business.separateaccounts.service.SeparateAccountsInfoService;
 import com.trade.service.business.separateaccounts.service.SeparateAccountsService;
 import com.trade.service.business.separateaccounts.vo.SeparateAccountsPageVo;
+import com.trade.service.filestorage.dto.FileAbstractDto;
+import com.trade.service.filestorage.entity.BusinessRelateFile;
 import com.trade.service.filestorage.enums.FileTypeEnum;
 import com.trade.service.filestorage.service.BusinessRelateFileBaseService;
+import com.trade.service.filestorage.service.TFileStorageService;
 import com.trade.service.finance.constant.BillingConstant;
 import com.trade.service.finance.paymentcollection.domain.BillingIncome;
 import com.trade.service.finance.paymentcollection.domain.BillingIncomeInfo;
@@ -79,6 +82,8 @@ public class BSeparateAccountsServiceImpl implements BSeparateAccountsService {
     private BusinessRelateFileBaseService businessRelateFileBaseService;
     @Resource
     private BBillingDisbursementServiceImpl bBillingDisbursementService;
+    @Resource
+    private TFileStorageService fileStorageService;
 
     @Override
     public boolean saveSeparateAccounts(BillingIncome income, String operator) {
@@ -150,6 +155,8 @@ public class BSeparateAccountsServiceImpl implements BSeparateAccountsService {
             paymentCollectionOperate.setReviewer(userNickName);
             paymentCollectionOperateService.updateById(paymentCollectionOperate);
         }
+        separateAccounts.setStatus(BillingConstant.ENTRY_STATUS_RECEIVED);
+        separateAccountsService.updateById(separateAccounts);
         return true;
     }
 
@@ -201,8 +208,15 @@ public class BSeparateAccountsServiceImpl implements BSeparateAccountsService {
                 incomeInfoDto.setReviewRemark(paymentCollectionOperate.getReviewRemark());
                 incomeInfoDto.setReviewer(paymentCollectionOperate.getReviewer());
             }
-            businessRelateFileBaseService.fillBizObjFiles(separateAccountsSubmitVo, billingIncome.getId(),
+            BusinessRelateFile businessRelateFile = businessRelateFileBaseService.getByCondition(billingIncome.getId(),
                     BillingConstant.ERECEIVE_PAYMENT_VOUCHER, FileTypeEnum.DISBURSEMENT_ENTRY.getCode());
+            if (businessRelateFile != null && businessRelateFile.getFileId() != null) {
+                FileAbstractDto disbursementEntry = new FileAbstractDto(
+                        fileStorageService.getFileStorageById(businessRelateFile.getFileId()));
+                separateAccountsSubmitVo.setDisbursementEntry(disbursementEntry);
+            }
+            // businessRelateFileBaseService.fillBizObjFiles(separateAccountsSubmitVo, billingIncome.getId(),
+            // BillingConstant.ERECEIVE_PAYMENT_VOUCHER, FileTypeEnum.DISBURSEMENT_ENTRY.getCode());
             separateAccountsSubmitVo.setIncomeInfoDto(incomeInfoDto);
         }
         return separateAccountsSubmitVo;
@@ -236,8 +250,15 @@ public class BSeparateAccountsServiceImpl implements BSeparateAccountsService {
                 incomeInfoDto.setReviewRemark(paymentCollectionOperate.getReviewRemark());
                 incomeInfoDto.setReviewer(paymentCollectionOperate.getReviewer());
             }
-            businessRelateFileBaseService.fillBizObjFiles(separateAccountsDetailVo, billingIncome.getId(),
+            BusinessRelateFile businessRelateFile = businessRelateFileBaseService.getByCondition(billingIncome.getId(),
                     BillingConstant.ERECEIVE_PAYMENT_VOUCHER, FileTypeEnum.DISBURSEMENT_ENTRY.getCode());
+            if (businessRelateFile != null && businessRelateFile.getFileId() != null) {
+                FileAbstractDto disbursementEntry = new FileAbstractDto(
+                        fileStorageService.getFileStorageById(businessRelateFile.getFileId()));
+                separateAccountsDetailVo.setDisbursementEntry(disbursementEntry);
+            }
+            // businessRelateFileBaseService.fillBizObjFiles(separateAccountsDetailVo, billingIncome.getId(),
+            // BillingConstant.ERECEIVE_PAYMENT_VOUCHER, FileTypeEnum.DISBURSEMENT_ENTRY.getCode());
             separateAccountsDetailVo.setIncomeInfoDto(incomeInfoDto);
         }
         separateAccountsDetailVo

+ 1 - 1
trade-service/src/main/resources/mapper/finance/disbursement/BillingDisbursementMapper.xml

@@ -47,7 +47,7 @@
         <id column="payment_type" property="paymentType"/>
         <id column="status" property="status"/>
         <id column="transaction_number" property="transactionNumber"/>
-        <id column="entry_business_number" property="transactionNumber"/>
+        <id column="entry_business_number" property="entryBusinessNumber"/>
         <id column="payee_type" property="payeeType"/>
         <id column="payment_amount" property="paymentAmount"/>
         <id column="payment_currency" property="paymentCurrency"/>