|
|
@ -205,7 +205,7 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
var entity = serializer.Deserialize<OrderDetail>(insert); |
|
|
var entity = serializer.Deserialize<OrderDetail>(insert); |
|
|
using (var session = Dmo.NewSession()) |
|
|
using (var session = Dmo.NewSession()) |
|
|
{ |
|
|
{ |
|
|
CheckCanInsert(session, entity.Order, entity.Date.Value); |
|
|
|
|
|
|
|
|
//CheckCanInsert(session, entity.Order, entity.Date.Value);
|
|
|
entity.ModifyTime = DateTime.Now; |
|
|
entity.ModifyTime = DateTime.Now; |
|
|
UpdateOrder(session, entity.Order - 1, 1, entity.Date); |
|
|
UpdateOrder(session, entity.Order - 1, 1, entity.Date); |
|
|
session.Insert(entity); |
|
|
session.Insert(entity); |
|
|
@ -239,9 +239,9 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
{ |
|
|
{ |
|
|
using (var session = Dmo.NewSession()) |
|
|
using (var session = Dmo.NewSession()) |
|
|
{ |
|
|
{ |
|
|
var secondSplit = InnerBLUtil.GetDmoPropertyByID<bool>(session, typeof(OrderDetail), "SecondarySplit", id); |
|
|
|
|
|
if (secondSplit) |
|
|
|
|
|
throw new Exception("已进行烫毛计数,不能修改"); |
|
|
|
|
|
|
|
|
//var secondSplit = InnerBLUtil.GetDmoPropertyByID<bool>(session, typeof(OrderDetail), "SecondarySplit", id);
|
|
|
|
|
|
//if (secondSplit)
|
|
|
|
|
|
// throw new Exception("已进行烫毛计数,不能修改");
|
|
|
UpdateOrderDetailPartial(session, id, "PlanNumber", number); |
|
|
UpdateOrderDetailPartial(session, id, "PlanNumber", number); |
|
|
session.Commit(); |
|
|
session.Commit(); |
|
|
} |
|
|
} |
|
|
@ -265,8 +265,8 @@ namespace BWP.B3ClientService.Rpcs.BillRpc |
|
|
using (var session = Dmo.NewSession()) |
|
|
using (var session = Dmo.NewSession()) |
|
|
{ |
|
|
{ |
|
|
var entity = InnerBLUtil.GetSingleDmo<OrderDetail>(session, "ID", id, "Order", "Date", "SecondarySplit"); |
|
|
var entity = InnerBLUtil.GetSingleDmo<OrderDetail>(session, "ID", id, "Order", "Date", "SecondarySplit"); |
|
|
if (entity.SecondarySplit) |
|
|
|
|
|
throw new Exception("已进行烫毛计数,不能修改"); |
|
|
|
|
|
|
|
|
//if (entity.SecondarySplit)
|
|
|
|
|
|
// throw new Exception("已进行烫毛计数,不能修改");
|
|
|
UpdateOrder(session, entity.Order, -1, entity.Date); |
|
|
UpdateOrder(session, entity.Order, -1, entity.Date); |
|
|
UpdateOrderDetailPartial(session, id, "DeleteState", true); |
|
|
UpdateOrderDetailPartial(session, id, "DeleteState", true); |
|
|
session.Commit(); |
|
|
session.Commit(); |
|
|
|