Merge branch 'develop' into working
This commit is contained in:
commit
320fb3386e
6 changed files with 92 additions and 88 deletions
|
|
@ -239,6 +239,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
||||
.Where(x => x.Draft! == true)
|
||||
.Where(x => x.Placement!.PlacementType!.Name == "สอบแข่งขัน")
|
||||
.Where(x => x.typeCommand.Trim().ToUpper() == "APPOINTED")
|
||||
.OrderBy(x => x.ExamNumber)
|
||||
.ToListAsync();
|
||||
|
||||
|
|
@ -297,6 +298,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
||||
.Where(x => x.Draft! == true)
|
||||
.Where(x => x.Placement!.PlacementType!.Name != "สอบแข่งขัน")
|
||||
.Where(x => x.typeCommand.Trim().ToUpper() == "APPOINTED")
|
||||
.OrderBy(x => x.ExamNumber)
|
||||
.ToListAsync();
|
||||
|
||||
|
|
@ -354,6 +356,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Where(x => x.Placement.Id == command.Placement.Id)
|
||||
.Where(x => !otherCommandReceivers.Contains(x.CitizenId!))
|
||||
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
||||
.Where(x => x.typeCommand.Trim().ToUpper() == "APPOINT")
|
||||
.Where(x => x.Draft! == true)
|
||||
.OrderBy(x => x.ExamNumber)
|
||||
.ToListAsync();
|
||||
|
|
@ -412,6 +415,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
.Where(x => x.Placement.Id == command.Placement.Id)
|
||||
.Where(x => !otherCommandReceivers.Contains(x.CitizenId!))
|
||||
.Where(x => x.PlacementStatus.Trim().ToUpper() == "PREPARE-CONTAIN")
|
||||
.Where(x => x.typeCommand.Trim().ToUpper() == "MOVE")
|
||||
.Where(x => x.Draft! == true)
|
||||
.OrderBy(x => x.ExamNumber)
|
||||
.ToListAsync();
|
||||
|
|
@ -9156,8 +9160,8 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
{
|
||||
ret.Add(new KeyValueItemResponse
|
||||
{
|
||||
Id = raw.result!.rootId,
|
||||
Name = raw.result!.root,
|
||||
Id = raw.result!.rootId??null,
|
||||
Name = raw.result!.root??null,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -9794,39 +9798,39 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
// }
|
||||
// }
|
||||
|
||||
// var Insignias = await _dbContext.Set<ProfileInsignia>()
|
||||
// .Include(x => x.Insignia)
|
||||
// .Where(x => orgIdSend.Contains(x.ProfileId))
|
||||
// .ToListAsync();
|
||||
// if (Insignias.Count > 0)
|
||||
// {
|
||||
// var apiUrlInsig = $"{_baseAPI}/org/dotnet/insignia/Dumb";
|
||||
// using (var client = new HttpClient())
|
||||
// {
|
||||
// client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
// foreach (var insignia in Insignias)
|
||||
// {
|
||||
// var _res = await client.PostAsJsonAsync(apiUrlInsig, new
|
||||
// {
|
||||
// profileId = profile.Id,
|
||||
// year = insignia.Year,
|
||||
// no = insignia.No,
|
||||
// volume = insignia.Volume,
|
||||
// section = insignia.Section,
|
||||
// page = insignia.Page,
|
||||
// receiveDate = insignia.ReceiveDate,
|
||||
// insigniaId = insignia.Insignia.Id, //where in node
|
||||
// dateAnnounce = insignia.DateAnnounce,
|
||||
// issue = insignia.Issue,
|
||||
// volumeNo = insignia.VolumeNo,
|
||||
// refCommandDate = insignia.RefCommandDate,
|
||||
// refCommandNo = insignia.RefCommandNo,
|
||||
// note = insignia.Note,
|
||||
// });
|
||||
// var _result = await _res.Content.ReadAsStringAsync();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
var Insignias = await _dbContext.Set<ProfileInsignia>()
|
||||
.Include(x => x.Insignia)
|
||||
.Where(x => profile.Id==x.ProfileId)
|
||||
.ToListAsync();
|
||||
if (Insignias.Count > 0)
|
||||
{
|
||||
var apiUrlInsig = $"{_baseAPI}/org/dotnet/insignia/Dumb";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
foreach (var insignia in Insignias)
|
||||
{
|
||||
var _res = await client.PostAsJsonAsync(apiUrlInsig, new
|
||||
{
|
||||
profileId = profile.Id,
|
||||
year = insignia.Year,
|
||||
no = insignia.No,
|
||||
volume = insignia.Volume,
|
||||
section = insignia.Section,
|
||||
page = insignia.Page,
|
||||
receiveDate = insignia.ReceiveDate,
|
||||
insigniaId = insignia.Insignia.Id, //where in node
|
||||
dateAnnounce = insignia.DateAnnounce,
|
||||
issue = insignia.Issue,
|
||||
volumeNo = insignia.VolumeNo,
|
||||
refCommandDate = insignia.RefCommandDate,
|
||||
refCommandNo = insignia.RefCommandNo,
|
||||
note = insignia.Note,
|
||||
});
|
||||
var _result = await _res.Content.ReadAsStringAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// var Honor = await _dbContext.Set<ProfileHonor>()
|
||||
// .Where(x => orgIdSend.Contains(x.ProfileId))
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
{
|
||||
profiles = profiles.OrderBy(x => x.order).ToList();
|
||||
}
|
||||
string SignDate = DateTime.Parse(retireHistorys.SignDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber();
|
||||
string SignDate = retireHistorys.SignDate != null ? DateTime.Parse(retireHistorys.SignDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : "-";
|
||||
return new { SignDate, retireHistorys.Detail, retireHistorys.Id, retireHistorys.CreatedAt, Year = retireHistorys.Year.ToThaiYear().ToString().ToThaiNumber(), retireHistorys.Round, retireHistorys.Type, retireHistorys.TypeReport, Total = retireHistorys.Total.ToString().ToThaiNumber(), profile = profiles };
|
||||
}
|
||||
}
|
||||
|
|
@ -194,7 +194,7 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
// };
|
||||
// retires.Add(data);
|
||||
// }
|
||||
string SignDate = DateTime.Parse(retire.SignDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber();
|
||||
string SignDate = retire.SignDate != null ? DateTime.Parse(retire.SignDate.ToString()).ToThaiFullDate().ToString().ToThaiNumber() : "-";
|
||||
return new { SignDate, retire.Detail, retire.Id, retire.CreatedAt, Year = retire.Year.ToThaiYear().ToString().ToThaiNumber(), retire.Round, retire.Type, retire.TypeReport, Total = profile_retire.Count.ToString().ToThaiNumber(), profile = profile_retire };
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
{
|
||||
public class KeyValueItemResponse
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.Empty;
|
||||
public Guid? Id { get; set; } = Guid.Empty;
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? Name { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue