Commit 1c5e53d9 by Neo Turing

优化

parent fab67818
......@@ -1014,4 +1014,23 @@ namespace Kivii.Finances.Transforms
}
#endregion
public class VatInvoice
{
public decimal Amount { get; set; }
/// <summary>
/// 发票号码
/// </summary>
public string SerialCode { get; set; }
/// <summary>
/// 发票代码
/// </summary>
public string SerialNumber { get; set; }
/// <summary>
/// 开票日期
/// </summary>
public DateTime OperateTime { get; set; }
}
}
......@@ -445,19 +445,19 @@ namespace Kivii.Finances.Transforms
if (Type == AnalysisType.Depart)
{
sqlExpress.GroupBy(o => o.OwnerName);
sqlExpress.Select(o => new
{
Summary = o.OwnerName,
Amount = Sql.Sum(o.Amount),
Quantity = Sql.Count(o.Kvid),
AmountInvoice = Sql.Sum(o.AmountInvoice),
QuantityInvoice = Sql.Sum(o.AmountInvoice == o.Amount ? 1 : 0),
AmountUsed = Sql.Sum(o.AmountUsed),
QuantityUsed = Sql.Sum(o.AmountUsed == o.Amount ? 1 : 0),
AmountSplit = Sql.Sum(o.Amount),
QuantitySplit = Sql.Count(o.Kvid)
});
rtns.Results = conn.Select<Analysis>(sqlExpress);
sqlExpress.Select(o => new
{
Summary = o.OwnerName,
Amount = Sql.Sum(o.Amount),
Quantity = Sql.Count(o.Kvid),
AmountInvoice = Sql.Sum(o.AmountInvoice),
QuantityInvoice = Sql.Sum(o.AmountInvoice == o.Amount ? 1 : 0),
AmountUsed = Sql.Sum(o.AmountUsed),
QuantityUsed = Sql.Sum(o.AmountUsed == o.Amount ? 1 : 0),
AmountSplit = Sql.Sum(o.Amount),
QuantitySplit = Sql.Count(o.Kvid)
});
rtns.Results = conn.Select<Analysis>(sqlExpress);
//var group = results.GroupBy(o => o.OwnerName);
//foreach (var kv in group)
//{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment