|
|
|
@ -154,19 +154,19 @@ namespace BWP.B3SheepButcherManage.BL |
|
|
|
var planNumber = tuple.Item1 ?? 0; |
|
|
|
var butcherNumber = tuple.Item2 ?? 0; |
|
|
|
|
|
|
|
//var hurryDetail = new JoinAlias(typeof(HurryButcher_Detail));
|
|
|
|
//var hurry = new JoinAlias(typeof(HurryButcher));
|
|
|
|
//var hurryDom = new DQueryDom(hurryDetail);
|
|
|
|
//hurryDom.From.AddJoin(JoinType.Left, new DQDmoSource(hurry), DQCondition.EQ(hurryDetail, "HurryButcher_ID", hurry, "ID"));
|
|
|
|
//hurryDom.Where.Conditions.Add(DQCondition.EQ("Weigh_Detail_ID", weighDetailID));
|
|
|
|
//hurryDom.Where.Conditions.Add(DQCondition.Or(
|
|
|
|
// DQCondition.EQ(hurry, "BillState", 单据状态.已审核),
|
|
|
|
// DQCondition.EQ(hurry, "BillState", 单据状态.已完毕)));
|
|
|
|
//hurryDom.Columns.Add(DQSelectColumn.Sum("Number"));
|
|
|
|
//var hurryNumber = (int?)Session.ExecuteScalar(hurryDom);
|
|
|
|
|
|
|
|
//butcherNumber = (butcherNumber) + (hurryNumber ?? 0);
|
|
|
|
//planNumber = (planNumber) + (hurryNumber ?? 0);
|
|
|
|
var hurryDetail = new JoinAlias(typeof(HurryButcher_Detail)); |
|
|
|
var hurry = new JoinAlias(typeof(HurryButcher)); |
|
|
|
var hurryDom = new DQueryDom(hurryDetail); |
|
|
|
hurryDom.From.AddJoin(JoinType.Left, new DQDmoSource(hurry), DQCondition.EQ(hurryDetail, "HurryButcher_ID", hurry, "ID")); |
|
|
|
hurryDom.Where.Conditions.Add(DQCondition.EQ("Weigh_Detail_ID", weighDetailID)); |
|
|
|
hurryDom.Where.Conditions.Add(DQCondition.Or( |
|
|
|
DQCondition.EQ(hurry, "BillState", 单据状态.已审核), |
|
|
|
DQCondition.EQ(hurry, "BillState", 单据状态.已完毕))); |
|
|
|
hurryDom.Columns.Add(DQSelectColumn.Sum("Number")); |
|
|
|
var hurryNumber = (int?)Session.ExecuteScalar(hurryDom); |
|
|
|
|
|
|
|
butcherNumber = (butcherNumber) + (hurryNumber ?? 0); |
|
|
|
planNumber = (planNumber) + (hurryNumber ?? 0); |
|
|
|
|
|
|
|
var updatedom = new DQUpdateDom(typeof(WeightBill_Record)); |
|
|
|
updatedom.Where.Conditions.Add(DQCondition.EQ("ID", weighDetailID)); |
|
|
|
|