|
|
|
@ -52,31 +52,15 @@ public class ChargeOrderService : BaseServices<ChargeOrder>
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.BatteryNo == chargeOrder.BatteryNo;
|
|
|
|
|
where = where == null ? condition2Expr : Expression.Lambda<Func<ChargeOrder, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
|
}
|
|
|
|
|
if (chargeOrder.CmdStatus!=0)
|
|
|
|
|
{
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.CmdStatus == chargeOrder.CmdStatus;
|
|
|
|
|
where = where == null ? condition2Expr : Expression.Lambda<Func<ChargeOrder, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(chargeOrder.ChargerNo))
|
|
|
|
|
{
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.ChargerNo == chargeOrder.ChargerNo;
|
|
|
|
|
where = where == null ? condition2Expr : Expression.Lambda<Func<ChargeOrder, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrEmpty(chargeOrder.ChargerGunNo))
|
|
|
|
|
{
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.ChargerGunNo == chargeOrder.ChargerGunNo;
|
|
|
|
|
where = where == null ? condition2Expr : Expression.Lambda<Func<ChargeOrder, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
|
}
|
|
|
|
|
if (chargeOrder.ChargeMode != 0)
|
|
|
|
|
{
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.ChargeMode == chargeOrder.ChargeMode;
|
|
|
|
|
where = where == null ? condition2Expr : Expression.Lambda<Func<ChargeOrder, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
|
}
|
|
|
|
|
if (chargeOrder.StartMode!=0)
|
|
|
|
|
{
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.StartMode == chargeOrder.StartMode;
|
|
|
|
|
where = where == null ? condition2Expr : Expression.Lambda<Func<ChargeOrder, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (chargeOrder.StartTime != null && chargeOrder.StartTime != DateTime.MinValue)
|
|
|
|
|
{
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.StartTime == chargeOrder.StartTime;
|
|
|
|
@ -87,12 +71,12 @@ public class ChargeOrderService : BaseServices<ChargeOrder>
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.EndTime == chargeOrder.EndTime;
|
|
|
|
|
where = where == null ? condition2Expr : Expression.Lambda<Func<ChargeOrder, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
|
}
|
|
|
|
|
if (chargeOrder.ChargeTimeCount!=0)
|
|
|
|
|
if (chargeOrder.ChargeTimeCount!=null)
|
|
|
|
|
{
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.ChargeTimeCount == chargeOrder.ChargeTimeCount;
|
|
|
|
|
where = where == null ? condition2Expr : Expression.Lambda<Func<ChargeOrder, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
|
}
|
|
|
|
|
if (chargeOrder.StopReason != 0)
|
|
|
|
|
if (chargeOrder.StopReason != null)
|
|
|
|
|
{
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.StopReason == chargeOrder.StopReason;
|
|
|
|
|
where = where == null ? condition2Expr : Expression.Lambda<Func<ChargeOrder, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
@ -107,7 +91,7 @@ public class ChargeOrderService : BaseServices<ChargeOrder>
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.SwapOrderSn == chargeOrder.SwapOrderSn;
|
|
|
|
|
where = where == null ? condition2Expr : Expression.Lambda<Func<ChargeOrder, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
|
}
|
|
|
|
|
if (chargeOrder.CloudReportStatus != 0)
|
|
|
|
|
if (chargeOrder.CloudReportStatus != null)
|
|
|
|
|
{
|
|
|
|
|
Expression<Func<ChargeOrder, bool>> condition2Expr = u => u.CloudReportStatus == chargeOrder.CloudReportStatus;
|
|
|
|
|
where = where == null ? condition2Expr : Expression.Lambda<Func<ChargeOrder, bool>>(Expression.AndAlso(where.Body, condition2Expr.Body), parameter);
|
|
|
|
|