fix birthday nullable
This commit is contained in:
@@ -45,8 +45,13 @@ public class GainfoCurrentResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 出生日期/生日
|
/// 出生日期/生日
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonConverter(typeof(ToDateJsonConverter))]
|
public string Birthday
|
||||||
public DateTime Birthday { get; set; }
|
{
|
||||||
|
get { return OriginalBirthday.HasValue ? OriginalBirthday.Value.ToString("yyyy-MM-dd") : "0000-00-00"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public DateTime? OriginalBirthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 厂区编码
|
/// 厂区编码
|
||||||
|
|||||||
@@ -69,13 +69,19 @@ public class GainfoDetailResponse
|
|||||||
public string Address { get; set; }
|
public string Address { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public DateTime OriginalBirthday { get; set; }
|
public DateTime? OriginalBirthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 出生日期
|
/// 出生日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonConverter(typeof(ObfuscateProviderJsonConverter), 0)]
|
[JsonConverter(typeof(ObfuscateProviderJsonConverter), 0)]
|
||||||
public string Birthday => OriginalBirthday.ToString("yyyy-MM-dd");
|
public string Birthday
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return OriginalBirthday.HasValue ? OriginalBirthday.Value.ToString("yyyy-MM-dd") : "0000-00-00";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 手机号码
|
/// 手机号码
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ public class GainfoService : IGainfoService
|
|||||||
.Select((ga, department, type) => new GainfoCurrentResponse
|
.Select((ga, department, type) => new GainfoCurrentResponse
|
||||||
{
|
{
|
||||||
UserNo = ga.No,
|
UserNo = ga.No,
|
||||||
Birthday = ga.Birthday,
|
OriginalBirthday = ga.Birthday,
|
||||||
DepartmentNo = department.No,
|
DepartmentNo = department.No,
|
||||||
DepartmentName = department.Name,
|
DepartmentName = department.Name,
|
||||||
Gender = ga.Gender,
|
Gender = ga.Gender,
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class GainfoEntity : SugarBaseEntity
|
|||||||
/// 生日
|
/// 生日
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(IsNullable = true, ColumnDescription = "生日")]
|
[SugarColumn(IsNullable = true, ColumnDescription = "生日")]
|
||||||
public DateTime Birthday { get; set; }
|
public DateTime? Birthday { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 身份证地址
|
/// 身份证地址
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace Dlhis.Entity.Basic.Entity
|
|||||||
public string idno { get; set; }
|
public string idno { get; set; }
|
||||||
public string native { get; set; }
|
public string native { get; set; }
|
||||||
public string sex { get; set; }
|
public string sex { get; set; }
|
||||||
public DateTime birthday { get; set; }
|
public DateTime? birthday { get; set; }
|
||||||
public string address { get; set; }
|
public string address { get; set; }
|
||||||
|
|
||||||
public string postcode { get; set; }
|
public string postcode { get; set; }
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ public class SapPersonItem
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime GBDAT { get; set; }
|
public DateTime? GBDAT { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user