fix 外包人员增加工号可选

This commit is contained in:
2024-06-14 14:36:15 +08:00
parent 3d6bb69f11
commit c1417e667d
2 changed files with 8 additions and 1 deletions

View File

@@ -28,7 +28,9 @@ public class GainfoOutsourceService : IGainfoOutsourceService
{
var entity = request.Adapt<GainfoEntity>();
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(new OutsourceEntity