Ajuste de bloqueo usuario y correos por area
This commit is contained in:
parent
98096604a6
commit
3166d5116f
20
Microservicios/MsUsuarios/Context/CORREOSAREAMS.cs
Normal file
20
Microservicios/MsUsuarios/Context/CORREOSAREAMS.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
namespace MSAdminUsuarios.Context
|
||||||
|
{
|
||||||
|
public class CORREOSAREAMS
|
||||||
|
{
|
||||||
|
/*public int NU_PK_CORA { get; set; }
|
||||||
|
public int? NU_MODULO_CORA { get; set; }
|
||||||
|
public int? NU_AREA_CORA { get; set; }
|
||||||
|
public int? NU_SEDE_CORA { get; set; }
|
||||||
|
public int? BL_ESTADO_CORA { get; set; }
|
||||||
|
public string? TX_FKDOC_USUMS { get; set; }
|
||||||
|
public string? TX_CORREOS_CORA { get; set; }*/
|
||||||
|
public int NU_PK_CRRMS { get; set; }
|
||||||
|
public string? TX_AREA_CRRMS { get; set; }
|
||||||
|
public int? NU_FK_MS { get; set; }
|
||||||
|
public string? TX_FKDOC_USUMS { get; set; }
|
||||||
|
public string? TX_SEDES_CRRMS { get; set; }
|
||||||
|
public string? TX_CORREOS_CRRMS { get; set; }
|
||||||
|
public int? NU_ESTADO_CRRMS { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -1,13 +0,0 @@
|
|||||||
namespace MSAdminUsuarios.Context
|
|
||||||
{
|
|
||||||
public class CorreosArea
|
|
||||||
{
|
|
||||||
public int NU_PK_CORA { get; set; }
|
|
||||||
public int? NU_MODULO_CORA { get; set; }
|
|
||||||
public int? NU_AREA_CORA { get; set; }
|
|
||||||
public int? NU_SEDE_CORA { get; set; }
|
|
||||||
public int? BL_ESTADO_CORA { get; set; }
|
|
||||||
public string? TX_FKDOC_USUMS { get; set; }
|
|
||||||
public string? TX_CORREOS_CORA { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -22,7 +22,7 @@ namespace MSAdminUsuarios.Context
|
|||||||
public virtual DbSet<PERFIL> PERFILESMs { get; set; } = null!;
|
public virtual DbSet<PERFIL> PERFILESMs { get; set; } = null!;
|
||||||
public virtual DbSet<PERFILPORUSUARIO> PERFILESPORUSUARIOs { get; set; } = null!;
|
public virtual DbSet<PERFILPORUSUARIO> PERFILESPORUSUARIOs { get; set; } = null!;
|
||||||
public virtual DbSet<USUARIO> USUARIOSMs { get; set; } = null!;
|
public virtual DbSet<USUARIO> USUARIOSMs { get; set; } = null!;
|
||||||
public virtual DbSet<CorreosArea> CORREOSAREAMS { get; set; } = null!;
|
public virtual DbSet<CORREOSAREAMS> CORREOSAREAMS { get; set; } = null!;
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
{
|
{
|
||||||
@ -97,9 +97,9 @@ namespace MSAdminUsuarios.Context
|
|||||||
entity.Property(e => e.CL_FIRMA_USUMS).HasColumnType("CLOB");
|
entity.Property(e => e.CL_FIRMA_USUMS).HasColumnType("CLOB");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<CorreosArea>(entity =>
|
modelBuilder.Entity<CORREOSAREAMS>(entity =>
|
||||||
{
|
{
|
||||||
entity.HasKey(e => e.NU_PK_CORA);
|
entity.HasKey(e => e.NU_PK_CRRMS);
|
||||||
|
|
||||||
entity.ToTable("CORREOSAREAMS");
|
entity.ToTable("CORREOSAREAMS");
|
||||||
|
|
||||||
|
@ -29,6 +29,6 @@ namespace MSAdminUsuarios.Context
|
|||||||
public int? NU_CARGO_USUMS { get; set; }
|
public int? NU_CARGO_USUMS { get; set; }
|
||||||
public int? NU_MODALIDADCTT_USUMS { get; set; }
|
public int? NU_MODALIDADCTT_USUMS { get; set; }
|
||||||
public string? TX_SEDES_USUMS { get; set; }
|
public string? TX_SEDES_USUMS { get; set; }
|
||||||
|
public int? NU_BLOQUEO_USUMS { get; set; } = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ namespace MSAdminUsuarios.Controllers
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
List<CorreosArea> lista = this._context.CORREOSAREAMS.ToList();
|
List<CORREOSAREAMS> lista = this._context.CORREOSAREAMS.ToList();
|
||||||
|
|
||||||
return Ok(lista);
|
return Ok(lista);
|
||||||
} catch (Exception ex)
|
} catch (Exception ex)
|
||||||
@ -30,7 +30,7 @@ namespace MSAdminUsuarios.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public IActionResult post([FromBody] CorreosArea nuevo)
|
public IActionResult post([FromBody] CORREOSAREAMS nuevo)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -47,12 +47,12 @@ namespace MSAdminUsuarios.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPatch]
|
[HttpPatch]
|
||||||
public IActionResult patch([FromBody] CorreosArea actualizar)
|
public IActionResult patch([FromBody] CORREOSAREAMS actualizar)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CorreosArea? existente = this._context.CORREOSAREAMS.FirstOrDefault(c => c.NU_PK_CORA == actualizar.NU_PK_CORA);
|
CORREOSAREAMS? existente = this._context.CORREOSAREAMS.FirstOrDefault(c => c.NU_PK_CRRMS == actualizar.NU_PK_CRRMS);
|
||||||
if (existente == null) return BadRequest("Registro inexistente");
|
if (existente == null) return BadRequest("Registro inexistente");
|
||||||
|
|
||||||
this._context.Entry(existente).CurrentValues.SetValues(actualizar);
|
this._context.Entry(existente).CurrentValues.SetValues(actualizar);
|
||||||
|
@ -60,6 +60,7 @@ namespace MSAdminUsuarios.Controllers
|
|||||||
var existe = _context.PERFILESMs.Find(editado.NU_PK_PFL);
|
var existe = _context.PERFILESMs.Find(editado.NU_PK_PFL);
|
||||||
|
|
||||||
existe.TX_PERFIL_PFL = editado.TX_PERFIL_PFL;
|
existe.TX_PERFIL_PFL = editado.TX_PERFIL_PFL;
|
||||||
|
existe.NU_ROL_PFL = editado.NU_ROL_PFL;
|
||||||
existe.BL_ESTADO_PFL = editado.BL_ESTADO_PFL;
|
existe.BL_ESTADO_PFL = editado.BL_ESTADO_PFL;
|
||||||
|
|
||||||
_context.PERFILESMs.Update(existe);
|
_context.PERFILESMs.Update(existe);
|
||||||
|
@ -255,7 +255,7 @@ namespace MSAdminUsuarios.Controllers
|
|||||||
existe.NU_CARGO_USUMS = editado.NU_CARGO_USUMS;
|
existe.NU_CARGO_USUMS = editado.NU_CARGO_USUMS;
|
||||||
existe.NU_MODALIDADCTT_USUMS = editado.NU_MODALIDADCTT_USUMS;
|
existe.NU_MODALIDADCTT_USUMS = editado.NU_MODALIDADCTT_USUMS;
|
||||||
existe.TX_SEDES_USUMS = editado.TX_SEDES_USUMS;
|
existe.TX_SEDES_USUMS = editado.TX_SEDES_USUMS;
|
||||||
|
existe.NU_BLOQUEO_USUMS = editado.NU_BLOQUEO_USUMS;
|
||||||
|
|
||||||
ErrorModel errorPFLxUSUMS = await ActualizarRelaciones(existe.TX_PKDOC_USUMS, editado.TX_PKDOC_USUMS);
|
ErrorModel errorPFLxUSUMS = await ActualizarRelaciones(existe.TX_PKDOC_USUMS, editado.TX_PKDOC_USUMS);
|
||||||
|
|
||||||
|
@ -37,5 +37,6 @@ namespace MSAdminUsuarios.Dto
|
|||||||
public int? NU_CARGO_USUMS { get; set; }
|
public int? NU_CARGO_USUMS { get; set; }
|
||||||
public int? NU_MODALIDADCTT_USUMS { get; set; }
|
public int? NU_MODALIDADCTT_USUMS { get; set; }
|
||||||
public string? TX_SEDES_USUMS { get; set; }
|
public string? TX_SEDES_USUMS { get; set; }
|
||||||
|
public int? NU_BLOQUEO_USUMS { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
"ConString": "user id=HIMSCAP;password=ITTASA2017;data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=181.129.245.90)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=PROYECTOS)))"
|
"ConString": "user id=HIMSCAP;password=ITTASA2017;data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=181.129.245.90)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=PROYECTOS)))"
|
||||||
},
|
},
|
||||||
"RabbitMQConfig": {
|
"RabbitMQConfig": {
|
||||||
"HostName": "192.168.1.69",
|
"HostName": "localhost",
|
||||||
"UserName": "user",
|
"UserName": "guest",
|
||||||
"Password": "password"
|
"Password": "guest"
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
|
Loading…
Reference in New Issue
Block a user