add LeaveRange to LeaveRequest
add "dear": String, //*เรียน(4) "leaveTotal": String, //*จำนวนวันขอยกเลิก(12)
This commit is contained in:
parent
203e901767
commit
d7be2da281
8 changed files with 1029 additions and 15 deletions
|
|
@ -642,6 +642,15 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
|
||||
var fullName = $"{profile!.Prefix!.Name}{profile!.FirstName} {profile!.LastName}";
|
||||
|
||||
var rootOc = _userProfileRepository.GetRootOcId(profile.OcId ?? Guid.Empty);
|
||||
var approver = string.Empty;
|
||||
if (rootOc != null)
|
||||
{
|
||||
var list = await _commandRepository.GetOrgApproverAsync(rootOc ?? Guid.Empty);
|
||||
if (list.Count > 0)
|
||||
approver = list.First().Name;
|
||||
}
|
||||
|
||||
var result = new
|
||||
{
|
||||
template = "แบบใบขอยกเลิกวันลา",
|
||||
|
|
@ -656,7 +665,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
positionLeaveName = profile!.Position == null ? "-" : profile!.Position!.Name,
|
||||
organizationName = profile!.Oc ?? "",
|
||||
leaveDateStart = data.LeaveStartDate.Date.ToThaiShortDate(),
|
||||
leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate()
|
||||
leaveDateEnd = data.LeaveEndDate.Date.ToThaiShortDate(),
|
||||
dear = approver,
|
||||
leaveTotal = data.LeaveTotal
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
var leaveRequest = new LeaveRequest
|
||||
{
|
||||
Type = leaveType,
|
||||
LeaveRange = req.LeaveRange,
|
||||
LeaveStartDate = req.LeaveStartDate,
|
||||
LeaveEndDate = req.LeaveEndDate,
|
||||
LeaveWrote = req.LeaveWrote ?? "",
|
||||
|
|
@ -506,6 +507,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
var result = new GetLeaveRequestByIdDto
|
||||
{
|
||||
Id = rawData.Id,
|
||||
LeaveRange = rawData.LeaveRange ?? "",
|
||||
LeaveTypeName = rawData.Type.Name,
|
||||
LeaveTypeId = rawData.Type.Id,
|
||||
FullName = $"{profile.Prefix.Name}{profile.FirstName} {profile.LastName}",
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest
|
|||
|
||||
public string? LeaveWrote { get; set; }
|
||||
|
||||
public string? LeaveRange { get; set; } = "ALL";
|
||||
|
||||
public string? LeaveAddress { get; set; }
|
||||
|
||||
public string? LeaveNumber { get; set; }
|
||||
|
|
@ -43,13 +45,13 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest
|
|||
|
||||
public string? OrdainDayLocationNumber { get; set; }
|
||||
|
||||
public DateTime? OrdainDayOrdination { get; set; }
|
||||
public DateTime? OrdainDayOrdination { get; set; }
|
||||
|
||||
public string? OrdainDayBuddhistLentName { get; set; }
|
||||
|
||||
public string? OrdainDayBuddhistLentAddress { get; set; }
|
||||
|
||||
public bool? HajjDayStatus { get; set; }
|
||||
public bool? HajjDayStatus { get; set; }
|
||||
|
||||
public string? AbsentDaySummon { get; set; }
|
||||
|
||||
|
|
@ -61,7 +63,7 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest
|
|||
|
||||
public string? AbsentDayAt { get; set; }
|
||||
|
||||
public string? StudyDaySubject { get; set; }
|
||||
public string? StudyDaySubject { get; set; }
|
||||
|
||||
public string? StudyDayDegreeLevel { get; set; }
|
||||
|
||||
|
|
@ -71,7 +73,7 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest
|
|||
|
||||
public string? StudyDayTrainingName { get; set; }
|
||||
|
||||
public string? StudyDayCountry { get; set; }
|
||||
public string? StudyDayCountry { get; set; }
|
||||
|
||||
public string? StudyDayScholarship { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -5,17 +5,17 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest
|
|||
{
|
||||
public class GetLeaveRequestByIdDto
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.Empty;
|
||||
public Guid Id { get; set; } = Guid.Empty;
|
||||
|
||||
public string LeaveTypeName { get; set; } = string.Empty;
|
||||
public string LeaveTypeName { get; set; } = string.Empty;
|
||||
|
||||
public Guid LeaveTypeId { get; set; } = Guid.Empty;
|
||||
public Guid LeaveTypeId { get; set; } = Guid.Empty;
|
||||
|
||||
public string FullName { get; set; } = string.Empty;
|
||||
public string FullName { get; set; } = string.Empty;
|
||||
|
||||
public DateTime DateSendLeave { get; set; } = DateTime.MinValue;
|
||||
public DateTime DateSendLeave { get; set; } = DateTime.MinValue;
|
||||
|
||||
public string Status { get; set; } = string.Empty;
|
||||
public string Status { get; set; } = string.Empty;
|
||||
|
||||
public DateTime LeaveStartDate { get; set; } = DateTime.Now;
|
||||
|
||||
|
|
@ -23,6 +23,8 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest
|
|||
|
||||
public string LeaveWrote { get; set; } = string.Empty;
|
||||
|
||||
public string? LeaveRange { get; set; } = string.Empty;
|
||||
|
||||
public string LeaveAddress { get; set; } = string.Empty;
|
||||
|
||||
public string LeaveNumber { get; set; } = string.Empty;
|
||||
|
|
@ -33,15 +35,15 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest
|
|||
|
||||
public string LeaveDraftDocument { get; set; }
|
||||
|
||||
public DateTime? LeaveLastStart { get; set; } = DateTime.MinValue;
|
||||
public DateTime? LeaveLastStart { get; set; } = DateTime.MinValue;
|
||||
|
||||
public DateTime? LeaveLastEnd { get; set; } = DateTime.MinValue;
|
||||
public DateTime? LeaveLastEnd { get; set; } = DateTime.MinValue;
|
||||
|
||||
public float LeaveTotal { get; set; } = 0;
|
||||
|
||||
public DateTime? LeaveBirthDate { get; set; } = DateTime.MinValue;
|
||||
|
||||
public DateTime? LeaveGovernmentDate { get; set; } = DateTime.MinValue;
|
||||
public DateTime? LeaveGovernmentDate { get; set; } = DateTime.MinValue;
|
||||
|
||||
public double LeaveSalary { get; set; } = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue