山证bug修复及功能 迁移

This commit is contained in:
吴方海
2024-06-04 18:19:49 +08:00
parent df65cd0add
commit acbd2e7678
39 changed files with 709 additions and 406 deletions
@@ -149,6 +149,7 @@ namespace YLErp.Modules.SwapModule
public SearchListResult<swap_flow_event> SearchEventList(SwapFlowQueryRequest req)
{
var predicate = PredicateBuilder.Create<swap_flow_event>(n =>n.PositionType>0&&n.DataState>0);
List<int> eventTypes = new List<int>() { (int)SwapEventTypeEnum., (int)SwapEventTypeEnum. };
if (req.TradeDate.HasValue)
{
predicate = predicate.And(n=>n.EventDate==req.TradeDate);
@@ -175,7 +176,7 @@ namespace YLErp.Modules.SwapModule
}
var eventQuery =from se in DbContext.swap_flow_event.Where(predicate)
join t in DbContext.trade.Where(x=>x.ValidState==ConsGlobal.Valid) on se.SwapTradeId equals t.id
join s in DbContext.swap_event.Where(x=>!x.Invalid) on se.EventId equals s.id into stemp
join s in DbContext.swap_event.Where(x => !x.Invalid && eventTypes.Contains(x.EventType)) on se.EventId equals s.id into stemp
from s in stemp.DefaultIfEmpty()
select se;
@@ -262,7 +263,7 @@ namespace YLErp.Modules.SwapModule
exportModel.PayDate = item.PayDate.OtcFormatDate();
exportModel.SwapTradeNo = item.SwapTradeNo;
exportModel.SwapPositionIdPadding = item.SwapPositionIdPadding;
exportModel.EventType = ((SwapEventTypeEnum)item.EventType).ToString();
exportModel.EventType = ((SwapFlowEventTypeEnum)item.EventType).ToString();
exportModel.EventReason = item.EventReason;
exportModel.PayDirection = ((SwapDirectionEnum)item.PayDirection).ToString();
exportModel.PositionType = item.PositionType==1?"多头":"空头";