This commit is contained in:
@@ -177,11 +177,11 @@ namespace AyaNova.Api.Controllers
|
|||||||
/// Accept CustomerServiceRequest
|
/// Accept CustomerServiceRequest
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">Source object id</param>
|
/// <param name="id">Source object id</param>
|
||||||
/// <param name="workorderid">Existing WorkOrder to accept to, if left empty creates new workorder</param>
|
/// <param name="workorderid">Existing WorkOrder to accept to, 0 creates new workorder</param>
|
||||||
/// <param name="apiVersion">From route path</param>
|
/// <param name="apiVersion">From route path</param>
|
||||||
/// <returns>CustomerServiceRequest with WorkOrderItemId set</returns>
|
/// <returns>CustomerServiceRequest with WorkOrderItemId set</returns>
|
||||||
[HttpPost("accept/{id}/{workorderid}")]
|
[HttpPost("accept/{id}/{workorderid}")]
|
||||||
public async Task<IActionResult> AcceptCustomerServiceRequest([FromRoute] long id, [FromRoute] long? workorderid, ApiVersion apiVersion)
|
public async Task<IActionResult> AcceptCustomerServiceRequest([FromRoute] long id, [FromRoute] long workorderid, ApiVersion apiVersion)
|
||||||
{
|
{
|
||||||
if (!serverState.IsOpen)
|
if (!serverState.IsOpen)
|
||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ namespace AyaNova.Biz
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//ACCEPT
|
//ACCEPT
|
||||||
//
|
//
|
||||||
internal async Task<CustomerServiceRequest> AcceptAsync(long csrId, long? workorderId) //MIGRATE_OUTSTANDING waiting for workorder to be completed or at least have a customerid which it currently doesn't
|
internal async Task<CustomerServiceRequest> AcceptAsync(long csrId, long workorderId) //MIGRATE_OUTSTANDING waiting for workorder to be completed or at least have a customerid which it currently doesn't
|
||||||
{
|
{
|
||||||
CustomerServiceRequest dbObject = await ct.CustomerServiceRequest.SingleOrDefaultAsync(m => m.Id == csrId);
|
CustomerServiceRequest dbObject = await ct.CustomerServiceRequest.SingleOrDefaultAsync(m => m.Id == csrId);
|
||||||
if (dbObject == null)
|
if (dbObject == null)
|
||||||
@@ -197,11 +197,9 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
|
|
||||||
throw new System.NotImplementedException("//MIGRATE_OUTSTANDING CustomerServiceRequestBiz::AcceptAsync - awaiting workorder completion ");
|
throw new System.NotImplementedException("//MIGRATE_OUTSTANDING CustomerServiceRequestBiz::AcceptAsync - awaiting workorder completion ");
|
||||||
|
// WorkOrder w=null;
|
||||||
|
//if (workorderId==0){WorkOrderBiz.GenerateWorkOrder()} //this is how it would work in theory
|
||||||
|
|
||||||
// WorkOrder w=null;
|
|
||||||
// if(workorderId==null){
|
|
||||||
// w=WorkOrderBiz.;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// CustomerServiceRequest SnapshotOfOriginalDBObj = new CustomerServiceRequest();
|
// CustomerServiceRequest SnapshotOfOriginalDBObj = new CustomerServiceRequest();
|
||||||
// CopyObject.Copy(dbObject, SnapshotOfOriginalDBObj);
|
// CopyObject.Copy(dbObject, SnapshotOfOriginalDBObj);
|
||||||
|
|||||||
Reference in New Issue
Block a user