|
|
@ -150,7 +150,7 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
{ |
|
|
{ |
|
|
var query = new DQueryDom(new JoinAlias(typeof(HurryRecord))); |
|
|
var query = new DQueryDom(new JoinAlias(typeof(HurryRecord))); |
|
|
query.Columns.Add(DQSelectColumn.Sum("HurryNumber")); |
|
|
query.Columns.Add(DQSelectColumn.Sum("HurryNumber")); |
|
|
query.Where.Conditions.Add(DQCondition.IsNull(DQExpression.Field("ToOrderDetail_ID"))); |
|
|
|
|
|
|
|
|
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("WeightBill_ID", wid), DQCondition.IsNull(DQExpression.Field("ToOrderDetail_ID")))); |
|
|
var rst = query.EExecuteScalar(); |
|
|
var rst = query.EExecuteScalar(); |
|
|
if (rst != null) |
|
|
if (rst != null) |
|
|
return Convert.ToInt32(rst); |
|
|
return Convert.ToInt32(rst); |
|
|
@ -210,11 +210,22 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
|
|
|
|
|
|
[Rpc] |
|
|
[Rpc] |
|
|
public static int GetCurrentOrder(long id) |
|
|
public static int GetCurrentOrder(long id) |
|
|
|
|
|
{ |
|
|
|
|
|
return GetOrderDetailProperty<int>(id, "Order"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Rpc] |
|
|
|
|
|
public static int GetCurrentOrderPlanNumber(long id) |
|
|
|
|
|
{ |
|
|
|
|
|
return GetOrderDetailProperty<int>(id, "PlanNumber"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static T GetOrderDetailProperty<T>(long id,string property) |
|
|
{ |
|
|
{ |
|
|
var query = new DQueryDom(new JoinAlias(typeof(OrderDetail))); |
|
|
var query = new DQueryDom(new JoinAlias(typeof(OrderDetail))); |
|
|
query.Columns.Add(DQSelectColumn.Field("Order")); |
|
|
|
|
|
|
|
|
query.Columns.Add(DQSelectColumn.Field(property)); |
|
|
query.Where.Conditions.Add(DQCondition.EQ("ID", id)); |
|
|
query.Where.Conditions.Add(DQCondition.EQ("ID", id)); |
|
|
return query.EExecuteScalar<int>(); |
|
|
|
|
|
|
|
|
return (T)query.EExecuteScalar(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Rpc] |
|
|
[Rpc] |
|
|
|