Browse Source

分账逻辑优化

liuj 1 month ago
parent
commit
fe605e93eb

+ 1 - 1
src/main/java/com/sunxung/factoring/service/ledger/impl/LedgerManagementServiceImpl.java

@@ -845,7 +845,7 @@ public class LedgerManagementServiceImpl implements LedgerManagementService {
             if (financingLoanInfo != null) {
                 oaOtherPaymentTradeVo.setCollectionAccountName(financingLoanInfo.getRepayAcctName());
                 oaOtherPaymentTradeVo.setCollectionAccount(financingLoanInfo.getRepayAcctNo());
-                oaOtherPaymentTradeVo.setCollectionBankName("");
+                oaOtherPaymentTradeVo.setCollectionBankName("苏商银行");
             }
         }
         HttpHeaders headers = new HttpHeaders();

+ 12 - 4
src/main/resources/data/update/smb0826.sql

@@ -29,9 +29,6 @@ ALTER TABLE `ledger_account_his_info` ADD COLUMN `is_smb_financing` tinyint(1) D
 ALTER TABLE `ledger_fund_goods_assign` ADD `has_assign_management` tinyint(1) DEFAULT NULL COMMENT '是否分配资方融资利息/本金 1-是 0-否';
 ALTER TABLE `ledger_fund_goods_assign` ADD `management_interest` decimal(17,2) DEFAULT '0.00' COMMENT '资方融资利息';
 ALTER TABLE `ledger_fund_goods_assign` ADD `management_principal` decimal(17,2) DEFAULT '0.00' COMMENT '资方融资本金';
-ALTER TABLE `ledger_fund_goods_assign_his` ADD `has_assign_management` tinyint(1) DEFAULT NULL COMMENT '是否分配资方融资利息/本金 1-是 0-否';
-ALTER TABLE `ledger_fund_goods_assign_his` ADD `management_interest` decimal(17,2) DEFAULT '0.00' COMMENT '资方融资利息';
-ALTER TABLE `ledger_fund_goods_assign_his` ADD `management_principal` decimal(17,2) DEFAULT '0.00' COMMENT '资方融资本金';
 
 -- 资方放款信息
 DROP TABLE IF EXISTS `financing_loan_info`;
@@ -89,4 +86,15 @@ INSERT INTO `t_dictionary` ( `name`, `parentId`, `code`, `value`, `gradation`, `
 VALUES ('苏商银行主合同文件', 1349, 'sushangFirstContrat', NULL, 3, '2024-02-07 14:54:49', '2024-02-07 14:54:49');
 
 INSERT INTO `t_dictionary` ( `name`, `parentId`, `code`, `value`, `gradation`, `gmt_create`, `gmt_modified`)
-VALUES ('苏商银行担保合同文件', 1349, 'sushangGuaranteeContrat', NULL, 3, '2024-02-07 14:54:49', '2024-02-07 14:54:49');
+VALUES ('苏商银行担保合同文件', 1349, 'sushangGuaranteeContrat', NULL, 3, '2024-02-07 14:54:49', '2024-02-07 14:54:49');
+
+ALTER TABLE `ledger_fund_goods_assign_his` ADD `has_assign_management` tinyint(1) DEFAULT NULL COMMENT '是否分配资方融资利息/本金 1-是 0-否';
+ALTER TABLE `ledger_fund_goods_assign_his` ADD `management_interest` decimal(17,2) DEFAULT '0.00' COMMENT '资方融资利息';
+ALTER TABLE `ledger_fund_goods_assign_his` ADD `management_principal` decimal(17,2) DEFAULT '0.00' COMMENT '资方融资本金';
+
+INSERT INTO `t_dictionary`(`name`, `parentId`, `code`, `value`, `gradation`, `gmt_create`, `gmt_modified`)
+VALUES ('应退利息',(select id from t_dictionary p where p.code = 'cashFlowOutType'), 'refundInterest', NULL, 11, NULL, NULL);
+INSERT INTO `t_dictionary`(`name`, `parentId`, `code`, `value`, `gradation`, `gmt_create`, `gmt_modified`)
+VALUES ('应退管理费',(select id from t_dictionary p where p.code = 'cashFlowOutType'), 'refundManagementFee', NULL, 12, NULL, NULL);
+INSERT INTO `t_dictionary`(`name`, `parentId`, `code`, `value`, `gradation`, `gmt_create`, `gmt_modified`)
+VALUES ('资方融资款项',(select id from t_dictionary p where p.code = 'cashFlowOutType'), 'outType_management_amount', NULL, 13, NULL, NULL);