|
|
@ -1,17 +1,17 @@ |
|
|
|
using System; |
|
|
|
using Magicodes.ExporterAndImporter.Core; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Newtonsoft.Json; |
|
|
|
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.ComponentModel.DataAnnotations; |
|
|
|
using System.ComponentModel.DataAnnotations.Schema; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Text.Json; |
|
|
|
using System.Text.Json.Serialization; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Xml.Linq; |
|
|
|
using Magicodes.ExporterAndImporter.Core; |
|
|
|
|
|
|
|
using Newtonsoft.Json; |
|
|
|
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
|
|
|
|
namespace TaskManager.Entity |
|
|
|
{ |
|
|
@ -2082,7 +2082,7 @@ namespace TaskManager.Entity |
|
|
|
/// 需求日期
|
|
|
|
/// </summary>
|
|
|
|
[ExporterHeader(DisplayName = "需求日期", Format = "yyyy-MM-dd")] |
|
|
|
public DateTime? DateRequired { get; set; } |
|
|
|
public string? DateRequired { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 需求数量
|
|
|
@ -2232,8 +2232,10 @@ namespace TaskManager.Entity |
|
|
|
/// <summary>
|
|
|
|
/// 需求日期
|
|
|
|
/// </summary>
|
|
|
|
[ExporterHeader(DisplayName = "需求日期", Format = "yyyy-MM-dd")] |
|
|
|
public DateTime? ReckonDate { get; set; } |
|
|
|
[ExporterHeader(DisplayName = "需求日期")] |
|
|
|
|
|
|
|
|
|
|
|
public string? ReckonDate { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 需求数量
|
|
|
@ -3971,7 +3973,7 @@ namespace TaskManager.Entity |
|
|
|
/// 需求日期
|
|
|
|
/// </summary>
|
|
|
|
[ExporterHeader(DisplayName = "需求日期", Format = "yyyy-MM-dd")] |
|
|
|
public DateTime? DateRequired { get; set; } |
|
|
|
public string? DateRequired { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 需求数量
|
|
|
@ -4122,7 +4124,8 @@ namespace TaskManager.Entity |
|
|
|
/// 需求日期
|
|
|
|
/// </summary>
|
|
|
|
[ExporterHeader(DisplayName = "需求日期", Format = "yyyy-MM-dd")] |
|
|
|
public DateTime? ReckonDate { get; set; } |
|
|
|
|
|
|
|
public string? ReckonDate { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 需求数量
|
|
|
@ -4209,5 +4212,28 @@ namespace TaskManager.Entity |
|
|
|
public long TableId { get; set; } |
|
|
|
public string RecordJson { get; set; } // 存储记录的JSON
|
|
|
|
} |
|
|
|
public class DateTimeYYYYMMDDConverter : System.Text.Json.Serialization.JsonConverter<DateTime> |
|
|
|
{ |
|
|
|
private const string Format = "yyyy-MM-dd"; |
|
|
|
|
|
|
|
public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) |
|
|
|
{ |
|
|
|
if (reader.TokenType == JsonTokenType.String) |
|
|
|
{ |
|
|
|
if (DateTime.TryParse(reader.GetString(), out var dateTime)) |
|
|
|
{ |
|
|
|
return dateTime; |
|
|
|
} |
|
|
|
} |
|
|
|
return reader.GetDateTime(); |
|
|
|
} |
|
|
|
|
|
|
|
public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) |
|
|
|
{ |
|
|
|
writer.WriteStringValue(value.ToString(Format)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|