แก้ออกคำสั่ง
This commit is contained in:
parent
186a3ee76a
commit
43e6593599
5 changed files with 51 additions and 57 deletions
|
|
@ -3158,7 +3158,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionType = placementProfile.posTypeName,
|
||||
positionLevel = placementProfile.posLevelName,
|
||||
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
|
||||
salaryRef = "คำสั่งแต่งตั้ง คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
|
||||
templateDoc = "คำสั่งแต่งตั้ง คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
|
||||
});
|
||||
var _result = await _res.Content.ReadAsStringAsync();
|
||||
}
|
||||
|
|
@ -3313,7 +3313,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionType = placementProfile.posTypeName,
|
||||
positionLevel = placementProfile.posLevelName,
|
||||
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
|
||||
salaryRef = "คำสั่งย้าย คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
|
||||
templateDoc = "คำสั่งย้าย คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
|
||||
});
|
||||
var _result = await _res.Content.ReadAsStringAsync();
|
||||
}
|
||||
|
|
@ -3468,7 +3468,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
positionType = placementProfile.posTypeName,
|
||||
positionLevel = placementProfile.posLevelName,
|
||||
refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}",
|
||||
salaryRef = "คำสั่งเลื่อน คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
|
||||
templateDoc = "คำสั่งเลื่อน คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}",
|
||||
});
|
||||
var _result = await _res.Content.ReadAsStringAsync();
|
||||
}
|
||||
|
|
@ -9576,7 +9576,7 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
{
|
||||
try
|
||||
{
|
||||
var orgIdSend = new List<Guid>() { Guid.Parse("08dc4c9f-ca39-44dd-8f93-04024aedccbe"), Guid.Parse("08dc4c9f-b4e7-47ae-8cb9-87b615151ada"), Guid.Parse("08dc4c9f-9da6-443e-8a72-30b8be40d954"), Guid.Parse("08dc4c9f-8487-4966-8ca6-11ba71d91971"), Guid.Parse("08dc4c9f-6e7e-4c75-8996-a48295978eca"), Guid.Parse("08dc4c9f-4166-4146-8460-f8af7cc8a4f1"), Guid.Parse("08dc4c9f-2710-4e98-8340-c9f2a65467db"), Guid.Parse("08dc4c9f-0ef3-4e51-805f-74766c67c1df"), Guid.Parse("08dc4c9e-f8be-4dae-89ed-30d662a29eed"), Guid.Parse("08dc4c9e-dd93-4072-8f37-482e7b91da28"), Guid.Parse("08dc4c9e-30c6-4674-8a35-4275eb70038f"), Guid.Parse("08dc4c9e-060b-4ae1-8068-bcf59b1d4642"), Guid.Parse("08dc4c9d-e7a2-4a26-84b8-655fac120ceb"), Guid.Parse("08dc4c9d-d0fe-4393-8948-d1ef0dece9e3"), Guid.Parse("08dc4c9d-b930-4be9-8428-82f802f28d99"), Guid.Parse("08dc4c9d-a10d-49ea-8484-a9646be5f6da"), Guid.Parse("08dc4c9d-8937-4432-865f-ffd3992feb25"), Guid.Parse("08dc4c9d-72f7-4f8a-8916-4b1791ca24c8"), Guid.Parse("08dc4c9d-5993-46b9-8ae8-96c4edbc163d"), Guid.Parse("08dc4c9d-291b-4761-8013-81027aac3b3d"), Guid.Parse("08dc4c9d-147d-4117-83fa-5211ca38f639"), Guid.Parse("08dc4c9b-277f-4b4e-8a60-08581ec7a2cc"), Guid.Parse("08dc4c9b-1148-4b92-8589-a94f4870102e"), Guid.Parse("08dc4c9a-f6d7-4ca3-80b0-0609375e1c76"), Guid.Parse("08dc4c9a-c587-4754-87ad-430a0e10b072"), Guid.Parse("08dc4c9a-9d74-4436-8709-33bd7aa5d5f7"), Guid.Parse("08dc4c9a-65c9-4306-80bf-f279e011f2a8"), Guid.Parse("08dc4c9a-2588-4766-8f6e-5051eb3423f5"), Guid.Parse("08dc4c99-d3f1-4640-8307-ddaaa6c3a541"), Guid.Parse("08dc4c99-bc91-41e9-87fd-9c29def6618d"), Guid.Parse("08dc4c99-9c44-4e4a-876c-59688334acd5"), Guid.Parse("08dc4c99-8170-4a65-8e20-c08845d3ea86"), Guid.Parse("08dc4c99-31b4-4027-8509-b322a173d7d3"), Guid.Parse("08dc4c99-12ca-46d7-813c-c35acc6ec7ae"), Guid.Parse("08dc4c98-f71d-472e-89a7-c9a6cb731650"), Guid.Parse("08dc4c98-dc64-4a8f-846d-342f05a49d02"), Guid.Parse("08dc4c98-c01c-47cf-83c9-7974df162e55"), Guid.Parse("08dc4c98-a219-4402-8624-00a9ad3a65cb"), Guid.Parse("08dc4c98-8739-401f-8180-65a982ee4237"), Guid.Parse("08dc4966-b6ac-4b49-85d4-2e5319d9b009"), Guid.Parse("08dc432c-2bc5-4b81-8089-9c057c51192c"), Guid.Parse("08dc4307-0adc-4bcd-8213-5479bb010236"), Guid.Parse("08dc4271-7bf5-4600-839c-6c93a35d33a6"), Guid.Parse("08dc4261-8aa8-4a85-8991-fb2ac9bcb132"), Guid.Parse("08dc3f36-8af2-4fd4-83bf-6f25126eec13"), Guid.Parse("08dc3f1a-ed56-469f-8b1e-c4fe6b30442a"), Guid.Parse("08dc3e6c-4b50-4b2e-8584-a3a0462c1b29"), Guid.Parse("08dc3e51-df19-47d9-8dd4-063fe6011eb3"), Guid.Parse("08dc3db9-257d-470d-8256-3dc24f6fa332"), Guid.Parse("08dc7bcd-7248-42ba-8f0e-d50b2f7faed7") };
|
||||
var orgIdSend = new List<Guid>() { Guid.Parse("08dc31bb-0707-4ce0-82fd-7e76903e9fca"), Guid.Parse("08dc30ee-2be8-40d0-81bf-b3f2f52dc0ad") };
|
||||
var profiles = await _dbContext.Set<Profile>()
|
||||
.Include(x => x.Prefix)
|
||||
.Include(x => x.Gender)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
//"DefaultConnection": "User Id=sys;Password=P@ssw0rd;DBA Privilege=SYSDBA;Data Source=localhost:1521/ORCLCDB",
|
||||
"DefaultConnection": "server=192.168.1.80;user=root;password=adminVM123;port=3306;database=bma_ehr_demo;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
"DefaultConnection": "server=192.168.1.61;user=root;password=adminVM123;port=4061;database=bma_ehr;Convert Zero Datetime=True;Allow User Variables=true;Pooling=True;"
|
||||
},
|
||||
"Jwt": {
|
||||
"Key": "HP-FnQMUj9msHMSD3T9HtdEnphAKoCJLEl85CIqROFI",
|
||||
|
|
@ -42,5 +42,5 @@
|
|||
"MailFrom": "saraban.csc.rd@bangkok.go.th",
|
||||
"Port": "25"
|
||||
},
|
||||
"API": "https://bma-ehr.frappet.com/api/v1"
|
||||
"API": "https://bma-ehr.frappet.synology.me/api/v1"
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
// return Error(GlobalMessages.DataNotFound);
|
||||
|
||||
await _repositoryNoti.PushNotificationAsync(
|
||||
req.ReceiverUserId,
|
||||
Guid.Parse(req.ReceiverUserId),
|
||||
req.Subject,
|
||||
req.Body,
|
||||
req.Payload,
|
||||
|
|
@ -111,7 +111,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
}
|
||||
|
||||
[HttpPost("profile")]
|
||||
public async Task<ActionResult<ResponseObject>> UpdatePropertyByUserKeycloak([FromBody] NotiRequest req)
|
||||
public async Task<ActionResult<ResponseObject>> UpdatePropertyByUserProfile([FromBody] NotiRequest req)
|
||||
{
|
||||
// var profile = await _context.Profiles.FirstOrDefaultAsync(x => x.KeycloakId == req.ReceiverUserId);
|
||||
// if (profile == null)
|
||||
|
|
@ -138,8 +138,6 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
}
|
||||
return Success();
|
||||
// }
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
||||
[HttpPut("{id:length(36)}")]
|
||||
|
|
|
|||
|
|
@ -784,54 +784,50 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
person.posLevelId = req.posLevelId;
|
||||
person.posLevelName = req.posLevelName;
|
||||
|
||||
// apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{person.profileId}";
|
||||
// using (var client = new HttpClient())
|
||||
// {
|
||||
// client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
// var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
|
||||
// var _res = await client.SendAsync(_req);
|
||||
// var _result = await _res.Content.ReadAsStringAsync();
|
||||
if (person.profileId != null)
|
||||
{
|
||||
apiUrl = $"{_configuration["API"]}/org/profile/profileid/position/{person.profileId}";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl);
|
||||
var _res = await client.SendAsync(_req);
|
||||
var _result = await _res.Content.ReadAsStringAsync();
|
||||
|
||||
// var org = JsonConvert.DeserializeObject<OrgRequest>(_result);
|
||||
var org = JsonConvert.DeserializeObject<OrgRequest>(_result);
|
||||
|
||||
// if (org == null || org.result == null)
|
||||
// {
|
||||
// person.IsOld = false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
||||
// // person.AmountOld = org.result.xxxxxxxx;
|
||||
// person.nodeOld = org.result.node;
|
||||
// person.nodeIdOld = org.result.nodeId;
|
||||
// // person.posmasterIdOld = org.result.xxxxxxxx;
|
||||
|
||||
// person.rootOld = org.result.root;
|
||||
// person.rootIdOld = org.result.rootId;
|
||||
// person.rootShortNameOld = org.result.rootShortName;
|
||||
// person.child1Old = org.result.child1;
|
||||
// person.child1IdOld = org.result.child1Id;
|
||||
// person.child1ShortNameOld = org.result.child1ShortName;
|
||||
// person.child2Old = org.result.child2;
|
||||
// person.child2IdOld = org.result.child2Id;
|
||||
// person.child2ShortNameOld = org.result.child2ShortName;
|
||||
// person.child3Old = org.result.child3;
|
||||
// person.child3IdOld = org.result.child3Id;
|
||||
// person.child3ShortNameOld = org.result.child3ShortName;
|
||||
// person.child4Old = org.result.child4;
|
||||
// person.child4IdOld = org.result.child4Id;
|
||||
// person.child4ShortNameOld = org.result.child4ShortName;
|
||||
// // person.orgRevisionIdOld = org.result.xxxxxxx;
|
||||
// // person.positionIdOld = org.result.xxxxxxx;
|
||||
// person.posMasterNoOld = org.result.posMasterNo;
|
||||
// person.positionNameOld = org.result.position;
|
||||
// // person.positionFieldOld = org.result.xxxxxxx;
|
||||
// person.posTypeIdOld = org.result.posTypeId;
|
||||
// person.posTypeNameOld = org.result.posTypeName;
|
||||
// person.posLevelIdOld = org.result.posLevelId;
|
||||
// person.posLevelNameOld = org.result.posLevelName;
|
||||
// }
|
||||
// }
|
||||
if (org == null || org.result == null)
|
||||
{
|
||||
person.IsOld = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
person.nodeOld = org.result.node;
|
||||
person.nodeIdOld = org.result.nodeId;
|
||||
person.rootOld = org.result.root;
|
||||
person.rootIdOld = org.result.rootId;
|
||||
person.rootShortNameOld = org.result.rootShortName;
|
||||
person.child1Old = org.result.child1;
|
||||
person.child1IdOld = org.result.child1Id;
|
||||
person.child1ShortNameOld = org.result.child1ShortName;
|
||||
person.child2Old = org.result.child2;
|
||||
person.child2IdOld = org.result.child2Id;
|
||||
person.child2ShortNameOld = org.result.child2ShortName;
|
||||
person.child3Old = org.result.child3;
|
||||
person.child3IdOld = org.result.child3Id;
|
||||
person.child3ShortNameOld = org.result.child3ShortName;
|
||||
person.child4Old = org.result.child4;
|
||||
person.child4IdOld = org.result.child4Id;
|
||||
person.child4ShortNameOld = org.result.child4ShortName;
|
||||
person.posMasterNoOld = org.result.posMasterNo;
|
||||
person.positionNameOld = org.result.position;
|
||||
person.posTypeIdOld = org.result.posTypeId;
|
||||
person.posTypeNameOld = org.result.posTypeName;
|
||||
person.posLevelIdOld = org.result.posLevelId;
|
||||
person.posLevelNameOld = org.result.posLevelName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
person.PlacementStatus = "PREPARE-CONTAIN";
|
||||
person.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace BMA.EHR.Placement.Service.Requests
|
|||
public string Subject { get; set; }
|
||||
public string Body { get; set; }
|
||||
public string Payload { get; set; }
|
||||
public Guid ReceiverUserId { get; set; }
|
||||
public string ReceiverUserId { get; set; }
|
||||
public bool IsSendMail { get; set; }
|
||||
public bool IsSendInbox { get; set; }
|
||||
public bool IsSendNotification { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue