public static CoordinationDto ToOrderCoordination(this Order p) { var result = new CoordinationDto(); p.ToOrderDto(result); result.CoordinationLogs = new List <CoordinationLogDto>(); if (p.CoordinationLogs != null && p.CoordinationLogs.Count > 0) { var logQuery = p.CoordinationLogs.AsQueryable(); result.CoordinationLogs = logQuery.Select(l => new CoordinationLogDto() { AddDatetime = l.AddDatetime, Content = l.Content, Type = l.Type, OperationPerson = l.OperationPerson }).OrderBy(t => t.AddDatetime).ToList(); } return(result); }
public void TestCoordination() { BootStrapper.ConfigureDependencies(); //AuthManager.SaveUser(new CurrentUserInfo() //{ // Code = "aa", // CashbagCode = "0000000326", // OperatorAccount = "cc", // OperatorName = "dd", // CashbagKey = "33cd87fd33d2493eb99b71a8a91d2ccf" //}); BPiaoBao.AppServices.DomesticTicket.OrderService orderservice = ObjectFactory.GetInstance <OrderService>(); string OrderId = "01312091002468804592"; string Content = "测试协调12121"; //添加 // orderservice.AddCoordinationDto(OrderId, Content); //查询 CoordinationDto cd = orderservice.GetCoordinationDto(OrderId); }