| @ -0,0 +1,55 @@ | |||
| using BWP.B3ClientService.BO; | |||
| using Forks.EnterpriseServices.DomainObjects2; | |||
| using Forks.EnterpriseServices.DomainObjects2.DQuery; | |||
| using Forks.EnterpriseServices.JsonRpc; | |||
| using Newtonsoft.Json; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| namespace BWP.B3ClientService.Rpcs | |||
| { | |||
| [Rpc] | |||
| public static class PickOutConfirmRpc | |||
| { | |||
| [Rpc(RpcFlags.SkipAuth)] | |||
| public static string GetList(DateTime date) | |||
| { | |||
| var query = new DQueryDom(new JoinAlias(typeof(OrderDetail))); | |||
| query.Columns.Add(DQSelectColumn.Field("ID")); | |||
| query.Columns.Add(DQSelectColumn.Field("Order")); | |||
| query.Columns.Add(DQSelectColumn.Field("PlanNumber")); | |||
| query.Columns.Add(DQSelectColumn.Field("LiveColonyHouse_Name")); | |||
| query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("DeleteState", false), DQCondition.EQ("IsHurryButcher", false), DQCondition.EQ("Date", date))); | |||
| var list = new List<PickOutConfirmDmo>(); | |||
| using (var session = Dmo.NewSession()) | |||
| { | |||
| using (var reader = session.ExecuteReader(query)) | |||
| { | |||
| while (reader.Read()) | |||
| { | |||
| var entity = new PickOutConfirmDmo(); | |||
| entity.ID = (long)reader[0]; | |||
| entity.Order = (int)reader[1]; | |||
| entity.PlanNumber = (int)reader[2]; | |||
| entity.LiveColonyHouse_Name = (string)reader[3]; | |||
| list.Add(entity); | |||
| } | |||
| } | |||
| } | |||
| return JsonConvert.SerializeObject(list); | |||
| } | |||
| class PickOutConfirmDmo | |||
| { | |||
| public long ID { get; set; } | |||
| public int Order { get; set; } | |||
| public int PlanNumber { get; set; } | |||
| public string LiveColonyHouse_Name { get; set; } | |||
| } | |||
| } | |||
| } | |||