bug修复
This commit is contained in:
@@ -4312,11 +4312,12 @@ namespace YLErp.Modules.RiskModule
|
||||
{
|
||||
var um = ums.FirstOrDefault(x => x.UnderlyingCode == item.security_id);
|
||||
var bondPrice = EodPriceQueryService.GetBondPrice(dealDate, item.security_id);
|
||||
double lastPrice = bondPrice != null ? bondPrice.ClosePrice : (um.Price ?? 0) * Convert.ToDouble(ConsGlobal.bondPriceMultiple);
|
||||
double lastPrice = bondPrice != null ? bondPrice.ClosePrice : (um?.Price ?? 0) * Convert.ToDouble(ConsGlobal.bondPriceMultiple);
|
||||
var bond = new UnderlyingBond();
|
||||
if (um.IsBond()&&string.IsNullOrEmpty(um.ExJson)) {
|
||||
if (um!=null&& um.IsBond()&&string.IsNullOrEmpty(um.ExJson)) {
|
||||
bond = JsonHelper.Deserialize<UnderlyingBond>(um.ExJson);
|
||||
}
|
||||
bond.IssueSize = bond.IssueSize ?? 0;
|
||||
return new CheckQuotaMoitorModel
|
||||
{
|
||||
Qty = item.position_qty ?? 0,
|
||||
@@ -4333,7 +4334,7 @@ namespace YLErp.Modules.RiskModule
|
||||
Delta = (decimal)((item.side == 0 ? item.deal_full_price_avg : -item.deal_full_price_avg) * (item.position_qty ?? 0) * ConsGlobal.bondPriceMultiple),
|
||||
UnderlyingId = um?.id ?? 0,
|
||||
LastPrice = (decimal)lastPrice,
|
||||
Circulation = (bond.IssueSize * 100000000m) ?? 0,
|
||||
Circulation = (bond.IssueSize * 100000000) ?? 0,
|
||||
Pnl = (decimal)((item.full_price_now - item.deal_full_price_avg) * (item.position_qty ?? 0) * ConsGlobal.bondPriceMultiple),
|
||||
Current = item.Current,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user