提交人:邹江涛

提交时间:2026年01月13日
提交内容:全额下拨代码调整
This commit is contained in:
root 2026-01-13 17:41:04 +08:00
parent 61d4fed580
commit e335e8de3a
1 changed files with 38 additions and 32 deletions

View File

@ -17,6 +17,7 @@ import java.math.BigDecimal;
public class FullAllocationService implements IBalanceService { public class FullAllocationService implements IBalanceService {
private static final Log logger = LogFactory.getLog(FullAllocationService.class); private static final Log logger = LogFactory.getLog(FullAllocationService.class);
/** /**
* @param transferType 划拨类型 UP上划DOWN 下拨 * @param transferType 划拨类型 UP上划DOWN 下拨
* @param strategyId 划拨策略ID 2234204585302439936 * @param strategyId 划拨策略ID 2234204585302439936
@ -26,11 +27,16 @@ public class FullAllocationService implements IBalanceService {
*/ */
@Override @Override
public BigDecimal getBalanceAmount(String transferType, Long strategyId, Long accountId, Long currencyId) { public BigDecimal getBalanceAmount(String transferType, Long strategyId, Long accountId, Long currencyId) {
logger.info("进入 FullAllocationService → getBalanceAmount 调用参数 → transferType: {}, strategyId: {}, accountId: {}, currencyId: {}", transferType, strategyId, accountId, currencyId);
BigDecimal valibalance = null; BigDecimal valibalance = null;
logger.info( "进入 FullAllocationService → getBalanceAmount 调用参数 → transferType: {}, strategyId: {}, accountId: {}, currencyId: {}", transferType, strategyId, accountId, currencyId); DynamicObject[] fcaTranstrategys = BusinessDataServiceHelper.load("fca_transtrategy", "id,number,name,istransdown,downway", new QFilter("id", QCP.equals, strategyId).toArray());
//母账户115871233966 if (fcaTranstrategys != null) {
//子账户:118587472156 DynamicObject fcaTranstrategy = fcaTranstrategys[0];
if ("DOWN".equals(transferType)) { boolean istransdown = fcaTranstrategy.getBoolean("istransdown");
if (istransdown) {
String downway = fcaTranstrategy.getString("downway");
if ("isfpm1".equals(downway) && "DOWN".equals(transferType)) {
DynamicObject amAccountbanks = BusinessDataServiceHelper.loadSingle(accountId, "am_accountbank"); DynamicObject amAccountbanks = BusinessDataServiceHelper.loadSingle(accountId, "am_accountbank");
// 申请公司 // 申请公司
DynamicObject company = amAccountbanks.getDynamicObject("company"); DynamicObject company = amAccountbanks.getDynamicObject("company");
@ -55,12 +61,12 @@ public class FullAllocationService implements IBalanceService {
"accountbank,valibalance,modifytime,company", new QFilter[]{(new QFilter("accountbank", QCP.equals, bdAccountbankId))}, "accountbank,valibalance,modifytime,company", new QFilter[]{(new QFilter("accountbank", QCP.equals, bdAccountbankId))},
null).orderBy(new String[]{"modifytime desc"}); null).orderBy(new String[]{"modifytime desc"});
DynamicObjectCollection dataRows = ORM.create().toPlainDynamicObjectCollection(dataSet); DynamicObjectCollection dataRows = ORM.create().toPlainDynamicObjectCollection(dataSet);
DynamicObject[] ifmAccountbalances = BusinessDataServiceHelper.load("ifm_accountbalance", "id,accountbank,valibalance", new QFilter("accountbank", QCP.equals, relationaccId).toArray());
valibalance = dataRows.get(0).getBigDecimal("valibalance"); valibalance = dataRows.get(0).getBigDecimal("valibalance");
} }
} }
} }
}
}
return valibalance; return valibalance;
} }
} }