Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
284acf95ce
|
|
@ -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) {
|
||||||
BigDecimal valibalance = null;
|
|
||||||
logger.info("进入 FullAllocationService → getBalanceAmount 调用参数 → transferType: {}, strategyId: {}, accountId: {}, currencyId: {}", transferType, strategyId, accountId, currencyId);
|
logger.info("进入 FullAllocationService → getBalanceAmount 调用参数 → transferType: {}, strategyId: {}, accountId: {}, currencyId: {}", transferType, strategyId, accountId, currencyId);
|
||||||
//母账户:115871233966
|
|
||||||
//子账户:118587472156
|
BigDecimal valibalance = null;
|
||||||
if ("DOWN".equals(transferType)) {
|
DynamicObject[] fcaTranstrategys = BusinessDataServiceHelper.load("fca_transtrategy", "id,number,name,istransdown,downway", new QFilter("id", QCP.equals, strategyId).toArray());
|
||||||
|
if (fcaTranstrategys != null) {
|
||||||
|
DynamicObject fcaTranstrategy = fcaTranstrategys[0];
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue