从山证v2.3.0拷贝
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using YLErp.DBModels.Consts;
|
||||
using YLErp.Modules.CalculationModule;
|
||||
using YLErp.Modules.PricingModule;
|
||||
using YLErp.Modules.UnderlyingModule;
|
||||
using YLErp.Modules.VolatilityModule;
|
||||
using YLErp.Web.WebAPI.Models;
|
||||
|
||||
namespace YLErp.Web.WebAPI.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 标的数据
|
||||
/// </summary>
|
||||
public class UnderlyingController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取标的建议列表
|
||||
/// </summary>
|
||||
[HttpPost("m/api/underlying/suggest-items")]
|
||||
public JsonResult GetSuggestions(UnderlyingSuggestionRequest req)
|
||||
{
|
||||
var reqConv = new UnderlyingSelectRequest();
|
||||
|
||||
if (req != null)
|
||||
{
|
||||
reqConv.FilterCode = req.FilterCode;
|
||||
reqConv.VarietyId = req.VarietyId;
|
||||
|
||||
if (req.Scenario == "定价")
|
||||
{
|
||||
reqConv.UsePinYinFilter = true;
|
||||
}
|
||||
}
|
||||
|
||||
var items = new UnderlyingSelectService(CurUser).GetSelectItems(reqConv);
|
||||
|
||||
return JsonSuccess(items);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取标的价格
|
||||
/// </summary>
|
||||
[HttpPost("m/api/underlying/spot-price")]
|
||||
public JsonResult GetSpotPrice(UnderlyingSpotPriceRequest req)
|
||||
{
|
||||
var result = new UnderlyingSpotPriceService(CurUser).GetSpotPrice(req);
|
||||
|
||||
return JsonSuccess(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取标的分红率
|
||||
/// </summary>
|
||||
[HttpPost("m/api/underlying/dividenrate")]
|
||||
public JsonResult GetDividenRate(UnderlyingDividenRateRequest req)
|
||||
{
|
||||
var result = new UnderlyingDividenRateService(CurUser).GetDividenRate(req);
|
||||
|
||||
return JsonSuccess(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user