Commit 0002770c by Neo Turing

优化

parent 1c5e53d9
......@@ -106,6 +106,11 @@ namespace Kivii.Finances
{
if (payment.InvoiceTime.Value > payment.OperateTime) payment.AuditTime = payment.InvoiceTime;
else payment.AuditTime = payment.OperateTime;
if (payment.AuditTime != null)
{
payment.AuditorName = payment.AuditTime.Value.Year.ToString();
payment.AddOnlyProperties(o => o.AuditorName);
}
payment.AddOnlyProperties(o => o.AuditTime);
}
......
......@@ -346,6 +346,11 @@ namespace Kivii.Finances
{
if (payment.InvoiceTime.Value > payment.OperateTime) payment.AuditTime = payment.InvoiceTime;
else payment.AuditTime = payment.OperateTime;
if (payment.AuditTime != null)
{
payment.AuditorName = payment.AuditTime.Value.Year.ToString();
payment.AddOnlyProperties(o => o.AuditorName);
}
payment.AddOnlyProperties(o => o.AuditTime);
}
}
......@@ -746,6 +751,10 @@ namespace Kivii.Finances
{
if (splitPayment.InvoiceTime.Value > splitPayment.OperateTime) splitPayment.AuditTime = payment.InvoiceTime;
else splitPayment.AuditTime = payment.OperateTime;
if (splitPayment.AuditTime != null)
{
splitPayment.AuditorName = splitPayment.AuditTime.Value.Year.ToString();
}
}
}
......
......@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2024.5270")]
[assembly: AssemblyFileVersion("5.4.2024.5270")]
[assembly: AssemblyVersion("5.4.2025.1070")]
[assembly: AssemblyFileVersion("5.4.2025.1070")]
......@@ -18,9 +18,7 @@ namespace Kivii.Finances.Transforms
{
if (Item.OnlyPropertiesIsExist(o => o.AuditTime))
{
if (Item.Metadata.IsNullOrEmpty())
{
Item.Metadata = new Dictionary<string, string>();
if (Item.Metadata.IsNullOrEmpty())Item.Metadata = new Dictionary<string, string>();
if (Item.AuditTime != null)
{
Item.Metadata["ManualAuditTime"] = true.ToString();
......@@ -29,8 +27,12 @@ namespace Kivii.Finances.Transforms
{
Item.Metadata["ManualAuditTime"] = string.Empty;
}
Item.AddOnlyProperties(o => o.Metadata);
if (Item.AuditTime != null)
{
Item.AuditorName = Item.AuditTime.Value.Year.ToString();
Item.AddOnlyProperties(o => o.AuditorName);
}
Item.AddOnlyProperties(o => o.Metadata);
}
return base.OnPreRestfulUpdate(req, res, dbConnection, rtns);
}
......@@ -275,7 +277,7 @@ namespace Kivii.Finances.Transforms
var request = new RestfulQuery<Payment>();
request = request.PopulateWith(this);
var sqlExpress = autoQuery.CreateQuery(Request, conn, request, dynamicParams);
sqlExpress.Where(o => o.OffsetKvid != Guid.Empty && o.Amount >= 0 && Sql.In(o.Type, PaymentType.AliPay, PaymentType.WeChat, PaymentType.Bank, PaymentType.Cash, PaymentType.Pos));
sqlExpress.Where(o => o.OffsetKvid != Guid.Empty && Sql.In(o.Type, PaymentType.AliPay, PaymentType.WeChat, PaymentType.Bank, PaymentType.Cash, PaymentType.Pos));
var rtns = autoQuery.Execute(Request, conn, request, sqlExpress);
return rtns;
}
......
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