|
|
|
@ -107,18 +107,19 @@ namespace BWP.B3ClientService.Rpcs |
|
|
|
weight.Department_ID = 2; |
|
|
|
weight.Employee_Name = entity.employee; |
|
|
|
weight.Employee_ID = entity.employeeID; |
|
|
|
weight.Zone_ID = entity.zoneID; |
|
|
|
weight.Zone_Name = entity.zoneName; |
|
|
|
weight.WeighTime = DateTime.Now; |
|
|
|
weight.Supplier_ID = entity.supplierID; |
|
|
|
weight.Supplier_Name = entity.supplier; |
|
|
|
var supInfo = GetSupplierZone(session, weight.Supplier_ID.Value); |
|
|
|
if (supInfo != null) |
|
|
|
{ |
|
|
|
weight.Zone_ID = supInfo.Item1; |
|
|
|
weight.Zone_Name = supInfo.Item2; |
|
|
|
} |
|
|
|
weight.BankAccount = entity.supplierIDCard; |
|
|
|
weight.PurchaseType_ID = entity.bType + 1; |
|
|
|
weight.PurchaseType_Name = entity.bType == 0 ? "社会" : "业务"; |
|
|
|
if (weight.Employee_ID == null && weight.PurchaseType_Name == "社会") |
|
|
|
{ |
|
|
|
weight.Employee_ID = 1; |
|
|
|
weight.Employee_Name = "王新辉"; |
|
|
|
} |
|
|
|
weight.Car_Name = entity.carNum; |
|
|
|
weight.Car_ID = entity.carID; |
|
|
|
weight.JingJianFee = entity.jjf; |
|
|
|
@ -163,19 +164,6 @@ namespace BWP.B3ClientService.Rpcs |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
static Tuple<long, string> GetSupplierZone(IDmoSession session, long supplierID) |
|
|
|
{ |
|
|
|
var supplier = new JoinAlias(typeof(Supplier)); |
|
|
|
var zone = new JoinAlias(typeof(Zone)); |
|
|
|
var query = new DQueryDom(supplier); |
|
|
|
query.From.AddJoin(JoinType.Left, new DQDmoSource(zone), DQCondition.EQ(supplier |
|
|
|
, "Zone_ID", zone, "ID")); |
|
|
|
query.Columns.Add(DQSelectColumn.Field("")); |
|
|
|
query.Columns.Add(DQSelectColumn.Field("")); |
|
|
|
query.Where.Conditions.Add(DQCondition.And(DQCondition.IsNotNull(DQExpression.Field(supplier, "Zone_ID")), DQCondition.EQ("ID", supplierID))); |
|
|
|
return query.EExecuteScalar<long, string>(session); |
|
|
|
} |
|
|
|
|
|
|
|
private static void FillSendPigWeightID(IDmoSession session, long id, long weightID) |
|
|
|
{ |
|
|
|
var update = new DQUpdateDom(typeof(SendPigRecord)); |
|
|
|
|