feat(esppApi): код закрытия вынес в параметры метода
This commit is contained in:
@@ -30,13 +30,13 @@ namespace PARR.EsppApi
|
||||
}
|
||||
|
||||
|
||||
public Task<EsppResultBase<EsppResponse>> SetStatusIsDoneAsync(string recordId, string resultMsg)//TODO упростить можно без RecordIdQuery
|
||||
public Task<EsppResultBase<EsppResponse>> SetStatusIsDoneAsync(string recordId, string resultMsg, EsppOrderClosingCodeEnum closingCode)//TODO упростить можно без RecordIdQuery
|
||||
{
|
||||
return SetStatusAsync(recordId, "4-Выполнен", resultMsg);
|
||||
return SetStatusAsync(recordId, "4-Выполнен", resultMsg, closingCode);
|
||||
}
|
||||
|
||||
|
||||
private async Task<EsppResultBase<EsppResponse>> SetStatusAsync(string recordId, string newStatusStr, string resultMsg)
|
||||
private async Task<EsppResultBase<EsppResponse>> SetStatusAsync(string recordId, string newStatusStr, string resultMsg, EsppOrderClosingCodeEnum? closingCode = null)
|
||||
{
|
||||
//TODO assignee сразу назначаем принудительно, чтобы было понятно кто менял объект
|
||||
//var query = $"<ROOT operation=\"SaveTask\" returnFormat=\"json\">{{" +
|
||||
@@ -48,7 +48,7 @@ namespace PARR.EsppApi
|
||||
|
||||
//var result = await esppHttpService.SendAsync<EsppResponse>(QuerySanitize(query));
|
||||
|
||||
var request = new SetStatusRequest
|
||||
var request = new SetStatusRequest(closingCode ?? EsppOrderClosingCodeEnum.Complete)
|
||||
{
|
||||
recordid = recordId,
|
||||
status = newStatusStr,
|
||||
|
||||
Reference in New Issue
Block a user