baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
Executable
+103
@@ -0,0 +1,103 @@
|
||||
using Opsoft.Data;
|
||||
using System;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Shared
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
/// <summary>
|
||||
/// 路由前缀
|
||||
/// </summary>
|
||||
public const string RoutePrefix = "/O3App/api";
|
||||
|
||||
public static class DateTimes
|
||||
{
|
||||
/// <summary>
|
||||
/// 本应用默认时间:1900-01-01 00:00:00
|
||||
/// </summary>
|
||||
public static readonly DateTime Default = new DateTime(1900, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// 格林威治(GMT)基准时间:1970-01-01 00:00:00
|
||||
/// </summary>
|
||||
public static readonly DateTime GMTBenchMark = new DateTime(1970, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
public static DateTime GetExpiryDate(int unitType, DateTime? fkDate, int kfperiod)
|
||||
{
|
||||
return unitType switch
|
||||
{
|
||||
0 => Convert.ToDateTime(fkDate).AddDays(kfperiod),
|
||||
1 => Convert.ToDateTime(fkDate).AddMonths(kfperiod).AddDays(-1.0),
|
||||
2 => Convert.ToDateTime(fkDate).AddYears(kfperiod).AddDays(-1.0),
|
||||
_ => Convert.ToDateTime(fkDate).AddDays(kfperiod),
|
||||
};
|
||||
}
|
||||
|
||||
public static class DatabaseNames
|
||||
{
|
||||
/// <summary>
|
||||
/// oracle
|
||||
/// </summary>
|
||||
public const string Default = "PDAServerContext";
|
||||
}
|
||||
|
||||
public static class CharText
|
||||
{
|
||||
public const char Star = '*';
|
||||
public const char Vertical = '|';
|
||||
public const char Comma = ',';
|
||||
public const char Semicolon = ';';
|
||||
public const char Horizontal = '-';
|
||||
public const char Dollar = '$';
|
||||
public const char Slash = '/';
|
||||
public const char Backslash = '\\';
|
||||
public const char Dot = '.';
|
||||
public const char Plus = '+';
|
||||
}
|
||||
|
||||
public static class Whether
|
||||
{
|
||||
public const int No = 0;
|
||||
public const int Yes = 1;
|
||||
}
|
||||
|
||||
public static class AppNames
|
||||
{
|
||||
public static readonly string Self = "opsoft.netcore.O3App";
|
||||
}
|
||||
|
||||
public static class EnvironmentNames
|
||||
{
|
||||
public const string Product = "product";
|
||||
public const string Stage = "stage";
|
||||
public const string QA = "qa";
|
||||
}
|
||||
|
||||
public static class ContentTypes
|
||||
{
|
||||
public const string FormUrlEncoded = "application/x-www-form-urlencoded";
|
||||
public const string Json = "application/json";
|
||||
}
|
||||
|
||||
public static class Protocols
|
||||
{
|
||||
public const string HTTP = "http:";
|
||||
public const string HTTPS = "https:";
|
||||
public const string FTP = "ftp:";
|
||||
}
|
||||
|
||||
public static class DateTimeFormats
|
||||
{
|
||||
/// <summary>
|
||||
/// yyyy-MM-dd
|
||||
/// </summary>
|
||||
public const string Date = "yyyy-MM-dd";
|
||||
/// <summary>
|
||||
/// yyyy-MM-dd HH:mm:ss
|
||||
/// </summary>
|
||||
public const string DateTime = "yyyy-MM-dd HH:mm:ss";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user