fix 外包人员增加工号可选
This commit is contained in:
@@ -14,6 +14,11 @@ public class GainfoOutsourceRequest
|
|||||||
[Required(ErrorMessage = "姓名不可为空")]
|
[Required(ErrorMessage = "姓名不可为空")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工号
|
||||||
|
/// </summary>
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 证件号
|
/// 证件号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ public class GainfoOutsourceService : IGainfoOutsourceService
|
|||||||
{
|
{
|
||||||
var entity = request.Adapt<GainfoEntity>();
|
var entity = request.Adapt<GainfoEntity>();
|
||||||
entity.No = Guid.NewGuid().ToString();
|
entity.No = Guid.NewGuid().ToString();
|
||||||
entity.Code = await GetOutSourceCodeAsync();
|
entity.Code = request.Code.IsPresent()
|
||||||
|
? request.Code
|
||||||
|
: await GetOutSourceCodeAsync();
|
||||||
|
|
||||||
await _dbContext.InsertAsync(entity);
|
await _dbContext.InsertAsync(entity);
|
||||||
await _dbContext.InsertAsync(new OutsourceEntity
|
await _dbContext.InsertAsync(new OutsourceEntity
|
||||||
|
|||||||
Reference in New Issue
Block a user