|
|
|
@ -88,16 +88,26 @@ namespace BWP.B3QingDaoWanFu.TypeIOCs |
|
|
|
comb.AlreadyOutStoreNum = comb.Details.Sum(x => (x.AlreadyOutStoreNum ?? 0).Value); |
|
|
|
comb.AlreadyOutStoreSecondNumber = comb.Details.Sum(x => (x.AlreadyOutStoreSecondNumber ?? 0).Value); |
|
|
|
} |
|
|
|
|
|
|
|
order.OldOrderID = id; |
|
|
|
UpdateOldOrderID(session, order); |
|
|
|
SaleForecastBL.CreateOrderContext = null; |
|
|
|
orderBL.Nullify(order); |
|
|
|
orderBL.Update(comb); |
|
|
|
if (comb.BillState == 单据状态.未审核 && order.SaleForecast_ID.HasValue) |
|
|
|
orderBL.Check(comb); |
|
|
|
order.OldOrderID = id; |
|
|
|
orderBL.Update(order); |
|
|
|
orderBL.Nullify(order); |
|
|
|
order.ID = id; |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
void UpdateOldOrderID(IDmoSession session, Order order) |
|
|
|
{ |
|
|
|
var update = new DQUpdateDom(typeof(Order)); |
|
|
|
update.Columns.Add(new DQUpdateColumn("OldOrderID", order.OldOrderID)); |
|
|
|
update.Where.Conditions.Add(DQCondition.EQ("ID", order.ID)); |
|
|
|
session.ExecuteNonQuery(update); |
|
|
|
} |
|
|
|
|
|
|
|
void CombineSaleOutStore(IDmoSession session, Order order, long id) |
|
|
|
{ |
|
|
|
var bl = BIFactory.Create<ISaleOutStoreBL>(session); |
|
|
|
|