sort retirement
This commit is contained in:
parent
3542906e41
commit
e24515906c
1 changed files with 43 additions and 42 deletions
|
|
@ -561,6 +561,8 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
}
|
}
|
||||||
var profile_old = await _context.RetirementProfiles
|
var profile_old = await _context.RetirementProfiles
|
||||||
.Where(x => x.RetirementPeriod == retire)
|
.Where(x => x.RetirementPeriod == retire)
|
||||||
|
.ToListAsync();
|
||||||
|
var _profile_old = profile_old
|
||||||
.OrderBy(x => rootOrder.ToObject<List<string>>().IndexOf(x.root))
|
.OrderBy(x => rootOrder.ToObject<List<string>>().IndexOf(x.root))
|
||||||
.ThenBy(x => posTypeNameOrder.ToObject<List<string>>().IndexOf(x.posTypeName ?? ""))
|
.ThenBy(x => posTypeNameOrder.ToObject<List<string>>().IndexOf(x.posTypeName ?? ""))
|
||||||
.ThenBy(x => posLevelNameOrder.ToObject<List<string>>().IndexOf(x.posLevelName ?? ""))
|
.ThenBy(x => posLevelNameOrder.ToObject<List<string>>().IndexOf(x.posLevelName ?? ""))
|
||||||
|
|
@ -601,10 +603,9 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
||||||
posExecutiveId = x.posExecutiveId,
|
posExecutiveId = x.posExecutiveId,
|
||||||
posExecutiveName = x.posExecutiveName,
|
posExecutiveName = x.posExecutiveName,
|
||||||
posNo = x.posNo,
|
posNo = x.posNo,
|
||||||
})
|
});
|
||||||
.ToListAsync();
|
|
||||||
var file_name = $"retire_tmp_{DateTime.Now.ToString("yyyyMMddTHHmmss")}";
|
var file_name = $"retire_tmp_{DateTime.Now.ToString("yyyyMMddTHHmmss")}";
|
||||||
var profile = Newtonsoft.Json.JsonConvert.SerializeObject(profile_old);
|
var profile = Newtonsoft.Json.JsonConvert.SerializeObject(_profile_old);
|
||||||
await _documentService.GenerateJsonFile(profile, "/retire", file_name);
|
await _documentService.GenerateJsonFile(profile, "/retire", file_name);
|
||||||
var history = new RetirementPeriodHistory
|
var history = new RetirementPeriodHistory
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue