Browse Source

修改。

master
yibo 8 years ago
parent
commit
fe387a9fc4
3 changed files with 24 additions and 1 deletions
  1. +3
    -0
      B3ClientService/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs
  2. +2
    -0
      B3ClientService/BO/Bill/WeightBill/WeightBill.cs
  3. +19
    -1
      B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc.cs

+ 3
- 0
B3ClientService/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs View File

@ -34,5 +34,8 @@ namespace BWP.B3ClientService.BO
[DbColumn(DefaultValue = 0)] [DbColumn(DefaultValue = 0)]
public bool IsDrop { get; set; } public bool IsDrop { get; set; }
[DbColumn(DefaultValue = 0)]
public long SID { get; set; }
} }
} }

+ 2
- 0
B3ClientService/BO/Bill/WeightBill/WeightBill.cs View File

@ -48,6 +48,8 @@ namespace BWP.B3ClientService.BO
public decimal? ShackPrice { get; set; } public decimal? ShackPrice { get; set; }
public decimal? ShackMoney { get; set; }
public decimal? JingJianFee { get; set; } public decimal? JingJianFee { get; set; }
public decimal? DiscontMoney { get; set; } public decimal? DiscontMoney { get; set; }


+ 19
- 1
B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc.cs View File

@ -72,7 +72,16 @@ namespace BWP.B3ClientService.Rpcs.BillRpc
else else
{ {
if (entity.ID == 0) if (entity.ID == 0)
session.Insert(entity);
{
var existID = GetIDIfExist(session, entity.SID);
if (existID.HasValue)
{
entity.ID = existID.Value;
session.Update(entity);
}
else
session.Insert(entity);
}
else else
session.Update(entity); session.Update(entity);
} }
@ -81,6 +90,15 @@ namespace BWP.B3ClientService.Rpcs.BillRpc
return entity.ID; return entity.ID;
} }
static long? GetIDIfExist(IDmoSession session, long sid)
{
var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
query.Where.Conditions.Add(DQCondition.EQ("SID", sid));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Range = SelectRange.Top(1);
return query.EExecuteScalar<long?>(session);
}
[Rpc] [Rpc]
public static string GetBodyDiscontItemSetting() public static string GetBodyDiscontItemSetting()
{ {


Loading…
Cancel
Save