Add Dna Id to table
This commit is contained in:
parent
3e8e461ebe
commit
27acadbb07
7 changed files with 1862 additions and 1 deletions
|
|
@ -850,6 +850,12 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
|
||||
ProfileId = profile.Id,
|
||||
ProfileType = profile.ProfileType,
|
||||
|
||||
RootDnaId = profile.RootDnaId,
|
||||
Child1DnaId = profile.Child1DnaId,
|
||||
Child2DnaId = profile.Child2DnaId,
|
||||
Child3DnaId = profile.Child3DnaId,
|
||||
Child4DnaId = profile.Child4DnaId,
|
||||
};
|
||||
|
||||
var startTime = "";
|
||||
|
|
@ -1691,6 +1697,12 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
|
||||
var old = await _userDutyTimeRepository.GetExist(req.ProfileId, req.EffectiveDate);
|
||||
|
||||
var profile = await _userProfileRepository.GetProfileByProfileIdAsync(req.ProfileId, AccessToken);
|
||||
if (profile == null)
|
||||
{
|
||||
return Error(GlobalMessages.DataNotFound, StatusCodes.Status404NotFound);
|
||||
}
|
||||
|
||||
if (old != null)
|
||||
{
|
||||
return Error(new Exception("ไม่สามารถทำรายการได้ เนื่องจากมีการกำหนดรอบการทำงานในวันที่นี้ไว้แล้ว"), StatusCodes.Status400BadRequest);
|
||||
|
|
@ -1702,6 +1714,12 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
DutyTimeId = req.RoundId,
|
||||
EffectiveDate = req.EffectiveDate,
|
||||
Remark = req.Remark,
|
||||
|
||||
RootDnaId = profile.RootDnaId,
|
||||
Child1DnaId = profile.Child1DnaId,
|
||||
Child2DnaId = profile.Child2DnaId,
|
||||
Child3DnaId = profile.Child3DnaId,
|
||||
Child4DnaId = profile.Child4DnaId,
|
||||
};
|
||||
|
||||
await _userDutyTimeRepository.AddAsync(data);
|
||||
|
|
@ -1871,6 +1889,13 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
POI = req.POI,
|
||||
Latitude = req.Latitude,
|
||||
Longitude = req.Longitude,
|
||||
|
||||
// add all Dna Id
|
||||
RootDnaId = profile.RootDnaId ?? Guid.Empty,
|
||||
Child1DnaId = profile.Child1DnaId ?? Guid.Empty,
|
||||
Child2DnaId = profile.Child2DnaId ?? Guid.Empty,
|
||||
Child3DnaId = profile.Child3DnaId ?? Guid.Empty,
|
||||
Child4DnaId = profile.Child4DnaId ?? Guid.Empty,
|
||||
};
|
||||
await _additionalCheckRequestRepository.AddAsync(request);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue