แก้ออกคำสั่ง
This commit is contained in:
parent
186a3ee76a
commit
43e6593599
5 changed files with 51 additions and 57 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue