public static bool IsSame(this 交割单 item1, 交割单 item2) { return(item1.组合号 == item2.组合号 && item1.交割日期.Date == item2.交割日期.Date && item1.证券代码 == item2.证券代码 && item1.买卖标志 == item2.买卖标志 && item1.SortSequence == item2.SortSequence); }
public static bool IsMatch(交割单 itemDel, 软件委托 itemSoft) { if ((itemDel.证券代码 == itemSoft.证券代码 || itemDel.证券名称 == itemSoft.证券名称) && IsSameDirect(itemDel.买卖标志, itemSoft.买卖标志) && Math.Abs(itemDel.成交数量) == Math.Abs(itemSoft.成交数量) && Math.Abs(itemDel.成交价格 - itemSoft.成交价格) <= (decimal)0.001) { return(true); } return(false); }
private static 交割单 GetTotal(List <交割单> deliResult, string totalRowHeader = "合计") { var first = deliResult.First(); var deliTotal = new 交割单() { SortSequence = -1, 交割日期 = first.交割日期, 组合号 = first.组合号, 备注 = totalRowHeader, }; foreach (var item in deliResult) { deliTotal.成交金额 += item.成交金额; deliTotal.发生金额 += item.发生金额; deliTotal.过户费 += item.过户费; deliTotal.印花税 += item.印花税; deliTotal.手续费 += item.手续费; deliTotal.其他费 += item.其他费; } return(deliTotal); }