fix: eod_commodity_future_price 入库前以 UnderlyingCode 重派生 UnderlyingId,防止 FR007 等价格行 UnderlyingId 与 FutureContractId 失同步
- 新增 EodPriceService.SyncUnderlyingIdFromCode:入库前以 UnderlyingCode(FutureContractId) 为准反查真实 UnderlyingId,不一致则告警并自动校正 - SaveEodFuturePrice(web编辑/新增)、SettlementPriceImportService(xlsx上传)、EodSyntheticPriceSaveService(系统合成价) 写入前调用 - 根治'网页端能查到、EOD结算查不到'的失同步问题
This commit is contained in:
@@ -159,6 +159,9 @@ namespace YLErp.Modules.EodModule.SettlementModule
|
||||
DataSource = EodPriceBase.系统
|
||||
};
|
||||
|
||||
// 入库前强制 UnderlyingId 与 UnderlyingCode(FutureContractId) 一致,避免网页/结算两套 JOIN 失同步。
|
||||
EodPriceService.SyncUnderlyingIdFromCode(DbContext, dto.CommodityPrice);
|
||||
|
||||
DbContext.eod_commodity_future_price.Add(dto.CommodityPrice);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user