update order
This commit is contained in:
parent
755dd9d06e
commit
d65107ad40
1 changed files with 11 additions and 15 deletions
|
|
@ -900,22 +900,18 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
.FirstOrDefaultAsync(x => x.profileId == req.ProfileId && x.RetirementPeriod.Id == retireId);
|
||||
if (retireProfile != null)
|
||||
return Error("บุคคลนี้ได้ทำการเลือกไว้อยู่แล้ว");
|
||||
var numRaw = 1;
|
||||
// var num = 1;
|
||||
var numRaw = 0;
|
||||
|
||||
var profileRawCount = await _context.RetirementRawProfiles
|
||||
.Where(x => x.RetirementPeriod.Id == retireId)
|
||||
.OrderByDescending(x => x.Order)
|
||||
.FirstOrDefaultAsync();
|
||||
if (profileRawCount != null)
|
||||
numRaw = profileRawCount.Order + 1;
|
||||
|
||||
// var old_retire = await _context.RetirementProfiles
|
||||
// .Where(x => x.RetirementPeriod.Id == retireId)
|
||||
// .OrderByDescending(x => x.Order)
|
||||
// .FirstOrDefaultAsync();
|
||||
// if (old_retire != null)
|
||||
// num = old_retire.Order + 1;
|
||||
if (retire.TypeReport != null)
|
||||
{
|
||||
numRaw = 1;
|
||||
var profileRawCount = await _context.RetirementRawProfiles
|
||||
.Where(x => x.RetirementPeriod.Id == retireId)
|
||||
.OrderByDescending(x => x.Order)
|
||||
.FirstOrDefaultAsync();
|
||||
if (profileRawCount != null)
|
||||
numRaw = profileRawCount.Order + 1;
|
||||
}
|
||||
|
||||
if (retire.Type == "OFFICER")
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue