แก้ list พ้น
This commit is contained in:
parent
bebd9620a5
commit
817f7a91ac
8 changed files with 92 additions and 77 deletions
|
|
@ -525,7 +525,6 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
|
||||
if (org == null || org.result == null)
|
||||
return Error("ไม่พบหน่วยงานนี้ในระบบ", 404);
|
||||
|
||||
uppdated.root = org.result.root;
|
||||
uppdated.rootId = org.result.rootId;
|
||||
uppdated.rootShortName = org.result.rootShortName;
|
||||
|
|
@ -543,6 +542,18 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
uppdated.child4ShortName = req.node <= 3 ? null : org.result.child4ShortName;
|
||||
}
|
||||
|
||||
var apiUrlUpdate = $"{_configuration["API"]}/org/pos/officer/master-old/book";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _resUpdate = await client.PostAsJsonAsync(apiUrlUpdate, new
|
||||
{
|
||||
posMasterOldId = uppdated.posmasterId,
|
||||
posMasterId = req.posmasterId,
|
||||
profileId = req.profileId,
|
||||
});
|
||||
}
|
||||
uppdated.typeCommand = req.typeCommand == null ? null : req.typeCommand.Trim().ToUpper();
|
||||
uppdated.posmasterId = req.posmasterId;
|
||||
uppdated.node = req.node;
|
||||
|
|
|
|||
|
|
@ -574,6 +574,18 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
uppdated.child4ShortName = req.node <= 3 ? null : org.result.child4ShortName;
|
||||
}
|
||||
|
||||
var apiUrlUpdate = $"{_configuration["API"]}/org/pos/employee/master-old/book";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _resUpdate = await client.PostAsJsonAsync(apiUrlUpdate, new
|
||||
{
|
||||
posMasterOldId = uppdated.posmasterId,
|
||||
posMasterId = req.posmasterId,
|
||||
profileId = req.profileId,
|
||||
});
|
||||
}
|
||||
uppdated.typeCommand = req.typeCommand == null ? null : req.typeCommand.Trim().ToUpper();
|
||||
uppdated.posmasterId = req.posmasterId;
|
||||
uppdated.node = req.node;
|
||||
|
|
|
|||
|
|
@ -884,6 +884,18 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
person.child4ShortName = req.node <= 3 ? null : org.result.child4ShortName;
|
||||
}
|
||||
|
||||
|
||||
var apiUrlUpdate = $"{_configuration["API"]}/org/pos/officer/master/book";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _resUpdate = await client.PostAsJsonAsync(apiUrlUpdate, new
|
||||
{
|
||||
posMasterId = req.posmasterId,
|
||||
profileId = req.profileId,
|
||||
});
|
||||
}
|
||||
person.Draft = false;
|
||||
person.typeCommand = req.typeCommand == null ? null : req.typeCommand.Trim().ToUpper();
|
||||
person.ReportingDate = req.reportingDate;
|
||||
|
|
@ -1254,6 +1266,16 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
if (profile == null)
|
||||
return Error(GlobalMessages.DataNotFound, 404);
|
||||
|
||||
var apiUrlUpdate = $"{_configuration["API"]}/org/pos/officer/master/clear";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _resUpdate = await client.PostAsJsonAsync(apiUrlUpdate, new
|
||||
{
|
||||
posMasterId = profile.posmasterId,
|
||||
});
|
||||
}
|
||||
profile.root = null;
|
||||
profile.rootId = null;
|
||||
profile.rootShortName = null;
|
||||
|
|
|
|||
|
|
@ -643,6 +643,18 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
uppdated.child4ShortName = req.node <= 3 ? null : org.result.child4ShortName;
|
||||
}
|
||||
|
||||
var apiUrlUpdate = $"{_configuration["API"]}/org/pos/officer/master-old/book";
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
|
||||
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
|
||||
var _resUpdate = await client.PostAsJsonAsync(apiUrlUpdate, new
|
||||
{
|
||||
posMasterOldId = uppdated.posmasterId,
|
||||
posMasterId = req.posmasterId,
|
||||
profileId = req.profileId,
|
||||
});
|
||||
}
|
||||
uppdated.posmasterId = req.posmasterId;
|
||||
uppdated.node = req.node;
|
||||
uppdated.nodeId = req.nodeId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue