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);
|
.FirstOrDefaultAsync(x => x.profileId == req.ProfileId && x.RetirementPeriod.Id == retireId);
|
||||||
if (retireProfile != null)
|
if (retireProfile != null)
|
||||||
return Error("บุคคลนี้ได้ทำการเลือกไว้อยู่แล้ว");
|
return Error("บุคคลนี้ได้ทำการเลือกไว้อยู่แล้ว");
|
||||||
var numRaw = 1;
|
var numRaw = 0;
|
||||||
// var num = 1;
|
|
||||||
|
|
||||||
var profileRawCount = await _context.RetirementRawProfiles
|
if (retire.TypeReport != null)
|
||||||
.Where(x => x.RetirementPeriod.Id == retireId)
|
{
|
||||||
.OrderByDescending(x => x.Order)
|
numRaw = 1;
|
||||||
.FirstOrDefaultAsync();
|
var profileRawCount = await _context.RetirementRawProfiles
|
||||||
if (profileRawCount != null)
|
.Where(x => x.RetirementPeriod.Id == retireId)
|
||||||
numRaw = profileRawCount.Order + 1;
|
.OrderByDescending(x => x.Order)
|
||||||
|
.FirstOrDefaultAsync();
|
||||||
// var old_retire = await _context.RetirementProfiles
|
if (profileRawCount != null)
|
||||||
// .Where(x => x.RetirementPeriod.Id == retireId)
|
numRaw = profileRawCount.Order + 1;
|
||||||
// .OrderByDescending(x => x.Order)
|
}
|
||||||
// .FirstOrDefaultAsync();
|
|
||||||
// if (old_retire != null)
|
|
||||||
// num = old_retire.Order + 1;
|
|
||||||
|
|
||||||
if (retire.Type == "OFFICER")
|
if (retire.Type == "OFFICER")
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue