fix: 修复日终价格新增页自动补全失效与查询开屏报错

EodPriceService.SearchUnderlyingList 三分支 Concat 投影成员不对称(债券缺 DataSource、期货/股票缺 UpdateUser),EF 翻译期抛 'DataSource' key not present 致 eodPriceQuery 开屏崩溃,补齐成员对称。eodPriceAdd.cshtml 原用 jQuery UI .autocomplete() 但 bundle 未打包该插件,调用即抛错、脚本中断、标的无法搜索;改为自带下拉补全(纯 jQuery+ajax,不依赖外部插件)。
This commit is contained in:
hjhan
2026-07-13 11:22:12 +08:00
parent 36d8909fe0
commit 5cc24f787e
2 changed files with 116 additions and 36 deletions
@@ -57,6 +57,10 @@ namespace YLErp.Modules.EodModule
IsBond=false,
id = source.id,
DataSource = source.DataSource,
// EF Core Concat 要求各分支投影成员集合完全一致:
// 债券分支设了 UpdateUser,故期货/股票分支也必须显式设(置 null),否则翻译期抛
// "The given key 'UpdateUser/DataSource' was not present in the dictionary"。
UpdateUser = (long?)null,
LaunchState = un.LaunchState,
MarketName = un.MarketName,
UnderlyingId = un.id,
@@ -84,6 +88,7 @@ namespace YLErp.Modules.EodModule
IsBond = false,
id = stockClose.id,
DataSource = stockClose.DataSource,
UpdateUser = (long?)null, // 对齐 Concat 投影成员,见 query1 注释
LaunchState = un.LaunchState,
MarketName = un.MarketName,
UnderlyingId = un.id,
@@ -110,7 +115,9 @@ namespace YLErp.Modules.EodModule
IsBond = true,
id = bondClose.id,
UpdateUser = bondClose.update_user,
// 债券 DataSource 在后处理统一置为固定值"中债估值"(见下方 foreach
// 债券 DataSource 在后处理统一置为人名/"中债估值"(见下方 foreach
// 此处仍须显式设 null 以对齐 Concat 各分支投影成员集合(见 query1 注释)。
DataSource = null,
LaunchState = un.LaunchState,
MarketName = un.MarketName,
UnderlyingId = un.id,