|
|
|
@ -12,7 +12,11 @@ namespace BWP.B3ClientService.BO |
|
|
|
[BOClass] |
|
|
|
public class WeightBillCheck |
|
|
|
{ |
|
|
|
public long B3ID { get; set; } |
|
|
|
public long ID { get; set; } |
|
|
|
|
|
|
|
[ReferenceTo(typeof(WeightBill), "B3ID")] |
|
|
|
[Join("ID", "ID")] |
|
|
|
public long? B3ID { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 单据创建人用户名
|
|
|
|
@ -31,7 +35,7 @@ namespace BWP.B3ClientService.BO |
|
|
|
if (Exist(id)) |
|
|
|
return; |
|
|
|
var entity = new WeightBillCheck(); |
|
|
|
entity.B3ID = id; |
|
|
|
entity.ID = id; |
|
|
|
entity.Creator = creator; |
|
|
|
entity.ModifyTime = DateTime.Now; |
|
|
|
using (var session = Dmo.NewSession()) |
|
|
|
@ -44,15 +48,15 @@ namespace BWP.B3ClientService.BO |
|
|
|
static bool Exist(long id) |
|
|
|
{ |
|
|
|
var query = new DQueryDom(new JoinAlias(typeof(WeightBillCheck))); |
|
|
|
query.Where.Conditions.Add(DQCondition.EQ("B3ID", id)); |
|
|
|
query.Where.Conditions.Add(DQCondition.EQ("ID", id)); |
|
|
|
return query.EExists(); |
|
|
|
} |
|
|
|
|
|
|
|
public static void SetSynced(long id) |
|
|
|
public static void SetSynced(long b3ID) |
|
|
|
{ |
|
|
|
var update = new DQUpdateDom(typeof(WeightBillCheck)); |
|
|
|
update.Columns.Add(new DQUpdateColumn("Sync", true)); |
|
|
|
update.Where.Conditions.Add(DQCondition.EQ("B3ID", id)); |
|
|
|
update.Where.Conditions.Add(DQCondition.EQ("B3ID", b3ID)); |
|
|
|
update.EExecute(); |
|
|
|
} |
|
|
|
} |
|
|
|
|