|
|
@ -1,5 +1,6 @@ |
|
|
using BWP.B3ClientService.BO; |
|
|
using BWP.B3ClientService.BO; |
|
|
using BWP.B3ClientService.RpcBO; |
|
|
using BWP.B3ClientService.RpcBO; |
|
|
|
|
|
using BWP.B3ClientService.Rpcs.RpcBO; |
|
|
using BWP.B3Frameworks.Utils; |
|
|
using BWP.B3Frameworks.Utils; |
|
|
using Forks.EnterpriseServices.DomainObjects2; |
|
|
using Forks.EnterpriseServices.DomainObjects2; |
|
|
using Forks.EnterpriseServices.DomainObjects2.DQuery; |
|
|
using Forks.EnterpriseServices.DomainObjects2.DQuery; |
|
|
@ -65,11 +66,11 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
return serializer.Serialize(list); |
|
|
return serializer.Serialize(list); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static long DeleteDetail(GradeAndWeight_Detail entity) |
|
|
|
|
|
|
|
|
static long DeleteDetail(GradeAndWeight_Detail entity) |
|
|
{ |
|
|
{ |
|
|
using (var session = Dmo.NewSession()) |
|
|
using (var session = Dmo.NewSession()) |
|
|
{ |
|
|
{ |
|
|
if(entity.ID>0) |
|
|
|
|
|
|
|
|
if (entity.ID > 0) |
|
|
{ |
|
|
{ |
|
|
session.Delete(new DmoIdentity(typeof(GradeAndWeight_Detail), entity.ID)); |
|
|
session.Delete(new DmoIdentity(typeof(GradeAndWeight_Detail), entity.ID)); |
|
|
if (entity.OrderDetail_ID.HasValue) |
|
|
if (entity.OrderDetail_ID.HasValue) |
|
|
@ -90,10 +91,8 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
entity.Already -= 1; |
|
|
entity.Already -= 1; |
|
|
session.Update(entity); |
|
|
session.Update(entity); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
[Rpc] |
|
|
[Rpc] |
|
|
public static long UpdateOrInsertDetailOrDelete(string json) |
|
|
public static long UpdateOrInsertDetailOrDelete(string json) |
|
|
@ -111,7 +110,7 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static long UpdateOrInsertDetail(GradeAndWeight_Detail entity) |
|
|
|
|
|
|
|
|
static long UpdateOrInsertDetail(GradeAndWeight_Detail entity) |
|
|
{ |
|
|
{ |
|
|
using (var session = Dmo.NewSession()) |
|
|
using (var session = Dmo.NewSession()) |
|
|
{ |
|
|
{ |
|
|
@ -216,5 +215,33 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
} |
|
|
} |
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Rpc] |
|
|
|
|
|
public static string GetDataConfirmList(DateTime date, int? order) |
|
|
|
|
|
{ |
|
|
|
|
|
var main = new JoinAlias(typeof(OrderDetail)); |
|
|
|
|
|
var second = new JoinAlias(typeof(SecondOrder)); |
|
|
|
|
|
var query = new DQueryDom(main); |
|
|
|
|
|
query.From.AddJoin(JoinType.Left, new DQDmoSource(second), DQCondition.EQ(main, "ID", second, "OrderDetail_ID")); |
|
|
|
|
|
query.Columns.Add(DQSelectColumn.Field("Order")); |
|
|
|
|
|
query.Columns.Add(DQSelectColumn.Field("PlanNumber")); |
|
|
|
|
|
query.Columns.Add(DQSelectColumn.Field("HotFadeNumber", second)); |
|
|
|
|
|
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Date", date), DQCondition.GreaterThanOrEqual("OrderState", 10), DQCondition.EQ("DeleteState", false))); |
|
|
|
|
|
if (order.HasValue) |
|
|
|
|
|
query.Where.Conditions.Add(DQCondition.EQ("Order", order)); |
|
|
|
|
|
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("Order", true)); |
|
|
|
|
|
using (var session = Dmo.NewSession()) |
|
|
|
|
|
{ |
|
|
|
|
|
using (var reader = session.ExecuteReader(query)) |
|
|
|
|
|
{ |
|
|
|
|
|
var list = new List<DataConfirmList>(); |
|
|
|
|
|
while (reader.Read()) |
|
|
|
|
|
{ |
|
|
|
|
|
list.Add(new DataConfirmList { Order = (int)reader[0], PlanNumber = (int)reader[1], HotFadeNumber = (int?)reader[2] ?? 0 }); |
|
|
|
|
|
} |
|
|
|
|
|
return serializer.Serialize(list); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |