Browse Source

通过验质分圈改头数,导致排宰顺序没标识为未同步产生的错误。

master
yibo 8 years ago
parent
commit
034bc73414
2 changed files with 6 additions and 7 deletions
  1. +4
    -5
      B3ClientService/Rpcs/BillRpc/HouseAndSanctionRpc.cs
  2. +2
    -2
      B3ClientService/Rpcs/BillRpc/OrderDetailRpc.cs

+ 4
- 5
B3ClientService/Rpcs/BillRpc/HouseAndSanctionRpc.cs View File

@ -207,7 +207,7 @@ namespace BWP.B3ClientService.Rpcs.BillRpc
session.ExecuteNonQuery(dUpdate); session.ExecuteNonQuery(dUpdate);
} }
static bool UpdateOrderNumber(IDmoSession session, long weightID, int newNumber, int oldNumber)
static bool UpdateOrderNumber(IDmoSessionWithTransaction session, long weightID, int newNumber, int oldNumber)
{ {
if (newNumber == oldNumber) if (newNumber == oldNumber)
return false; return false;
@ -229,10 +229,9 @@ namespace BWP.B3ClientService.Rpcs.BillRpc
return true; return true;
else if (oldNumber - unOrderNumber - order.Sum(x => x.Item2) > 0) else if (oldNumber - unOrderNumber - order.Sum(x => x.Item2) > 0)
return true; return true;
var update = new DQUpdateDom(typeof(OrderDetail));
update.Where.Conditions.Add(DQCondition.EQ("ID", tags.First().Item1));
update.Columns.Add(new DQUpdateColumn("PlanNumber", DQExpression.Add(DQExpression.Field("PlanNumber"), DQExpression.Value(newNumber - oldNumber))));
session.ExecuteNonQuery(update);
var entity = tags.First();
OrderDetailRpc.UpdateOrderDetailPartial(session, entity.Item1, "PlanNumber", entity.Item2 + newNumber - oldNumber);
OrderDetailRpc.UpdateSecondOrder(entity.Item1, session);
return false; return false;
} }


+ 2
- 2
B3ClientService/Rpcs/BillRpc/OrderDetailRpc.cs View File

@ -254,7 +254,7 @@ namespace BWP.B3ClientService.Rpcs.BillRpc
throw new Exception("不允许插入到已进行烫毛计数顺序之前"); throw new Exception("不允许插入到已进行烫毛计数顺序之前");
} }
static void UpdateOrderDetailPartial(IDmoSession session, long id, string property, object value)
public static void UpdateOrderDetailPartial(IDmoSession session, long id, string property, object value)
{ {
var update = new DQUpdateDom(typeof(OrderDetail)); var update = new DQUpdateDom(typeof(OrderDetail));
update.Columns.Add(new DQUpdateColumn(property, value)); update.Columns.Add(new DQUpdateColumn(property, value));
@ -280,7 +280,7 @@ namespace BWP.B3ClientService.Rpcs.BillRpc
return 1; return 1;
} }
private static void UpdateSecondOrder(long id, IDmoSessionWithTransaction session)
public static void UpdateSecondOrder(long id, IDmoSessionWithTransaction session)
{ {
var update = new DQUpdateDom(typeof(SecondOrder)); var update = new DQUpdateDom(typeof(SecondOrder));
update.Columns.Add(new DQUpdateColumn("Sync", false)); update.Columns.Add(new DQUpdateColumn("Sync", false));


Loading…
Cancel
Save