This commit is contained in:
ai.astrakhantsev 2022-12-14 09:10:01 +05:00
parent 54d68cc52d
commit bf3a910433
2 changed files with 24 additions and 3 deletions

View File

@ -85,8 +85,8 @@ namespace AsbCloudInfrastructure.Repository
};
dto.Pressure = new PlanFactDto
{
Fact = entity.FlowFact,
Plan = entity.FlowPlan
Fact = entity.PressureFact,
Plan = entity.PressurePlan
};
dto.TopDriveSpeed = new PlanFactDto
{
@ -100,6 +100,27 @@ namespace AsbCloudInfrastructure.Repository
};
return dto;
}
protected override ProcessMap Convert(ProcessMapDto dto)
{
var entity = dto.Adapt<ProcessMap>();
entity.AxialLoadPlan = dto.AxialLoad.Plan;
entity.AxialLoadFact = dto.AxialLoad.Fact;
entity.FlowPlan = dto.Flow.Plan;
entity.FlowFact = dto.Flow.Fact;
entity.PressurePlan = dto.Pressure.Plan;
entity.PressureFact = dto.Pressure.Fact;
entity.TopDriveSpeedPlan = dto.TopDriveSpeed.Plan;
entity.TopDriveSpeedFact = dto.TopDriveSpeed.Fact;
entity.TopDriveTorquePlan = dto.TopDriveTorque.Plan;
entity.TopDriveTorqueFact = dto.TopDriveTorque.Fact;
return entity;
}
}
#nullable disable
}

View File

@ -110,7 +110,7 @@ namespace AsbCloudWebApi.Controllers
public override async Task<ActionResult<int>> UpdateAsync([FromBody] ProcessMapDto value, CancellationToken token)
{
value.IdUser = User.GetUserId() ?? -1;
return await base.InsertAsync(value, token);
return await base.UpdateAsync(value, token);
}
}
#nullable disable