เพิ่มฟิวลำดับสอบ
This commit is contained in:
parent
c6dc582254
commit
925d7fe747
2 changed files with 62 additions and 2 deletions
|
|
@ -238,5 +238,19 @@ namespace BMA.EHR.Application.Repositories
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<string?> CheckBmaOfficer(string CitizenId)
|
||||||
|
{
|
||||||
|
var data = await _context.Profiles.FirstOrDefaultAsync(x => x.CitizenId == CitizenId);
|
||||||
|
if (data == null)
|
||||||
|
return null;
|
||||||
|
if (data.ProfileType.Trim().ToUpper() == "OFFICER")
|
||||||
|
return "officer";
|
||||||
|
if (data.EmployeeClass.Trim().ToUpper() == "PERM")
|
||||||
|
return "employee_perm";
|
||||||
|
if (data.EmployeeClass.Trim().ToUpper() == "TEMP")
|
||||||
|
return "employee_temp";
|
||||||
|
return "employee";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -112,9 +112,32 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
ReportingDate = x.ReportingDate,
|
ReportingDate = x.ReportingDate,
|
||||||
BmaOfficer = x.IsOfficer,
|
BmaOfficer = x.IsOfficer,
|
||||||
StatusId = x.PlacementStatus,
|
StatusId = x.PlacementStatus,
|
||||||
|
Number = x.Number,
|
||||||
Disclaim = x.IsRelief,
|
Disclaim = x.IsRelief,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
return Success(data);
|
|
||||||
|
var result = new List<dynamic>();
|
||||||
|
foreach (var p in data)
|
||||||
|
{
|
||||||
|
var _data = new
|
||||||
|
{
|
||||||
|
p.PersonalId,
|
||||||
|
p.FullName,
|
||||||
|
p.IdCard,
|
||||||
|
p.ProfilePhoto,
|
||||||
|
p.OrganizationName,
|
||||||
|
p.OrganizationShortName,
|
||||||
|
p.PositionNumber,
|
||||||
|
p.PositionPath,
|
||||||
|
p.ReportingDate,
|
||||||
|
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
||||||
|
p.StatusId,
|
||||||
|
p.Number,
|
||||||
|
p.Disclaim,
|
||||||
|
};
|
||||||
|
result.Add(_data);
|
||||||
|
}
|
||||||
|
return Success(result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -141,9 +164,32 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
ReportingDate = x.ReportingDate,
|
ReportingDate = x.ReportingDate,
|
||||||
BmaOfficer = x.IsOfficer,
|
BmaOfficer = x.IsOfficer,
|
||||||
StatusId = x.PlacementStatus,
|
StatusId = x.PlacementStatus,
|
||||||
|
Number = x.Number,
|
||||||
Disclaim = x.IsRelief,
|
Disclaim = x.IsRelief,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
return Success(data);
|
|
||||||
|
var result = new List<dynamic>();
|
||||||
|
foreach (var p in data)
|
||||||
|
{
|
||||||
|
var _data = new
|
||||||
|
{
|
||||||
|
p.PersonalId,
|
||||||
|
p.FullName,
|
||||||
|
p.IdCard,
|
||||||
|
p.ProfilePhoto,
|
||||||
|
p.OrganizationName,
|
||||||
|
p.OrganizationShortName,
|
||||||
|
p.PositionNumber,
|
||||||
|
p.PositionPath,
|
||||||
|
p.ReportingDate,
|
||||||
|
BmaOfficer = await _documentService.CheckBmaOfficer(p.IdCard),
|
||||||
|
p.StatusId,
|
||||||
|
p.Number,
|
||||||
|
p.Disclaim,
|
||||||
|
};
|
||||||
|
result.Add(_data);
|
||||||
|
}
|
||||||
|
return Success(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue