@ -9,10 +9,12 @@ import java.util.List;
import java.util.Map ;
import java.util.Map ;
import com.vaadin.flow.component.UI ;
import com.vaadin.flow.component.UI ;
import com.vaadin.flow.component.html.Anchor ;
import com.vaadin.flow.component.html.* ;
import com.vaadin.flow.server.StreamRegistration ;
import com.vaadin.flow.server.StreamRegistration ;
import com.vaadin.flow.server.StreamResource ;
import com.vaadin.flow.server.StreamResource ;
import mx.gob.jumapacelaya.services.EmailService ;
import mx.gob.jumapacelaya.services.ReportService ;
import mx.gob.jumapacelaya.services.ReportService ;
import org.springframework.beans.factory.annotation.Value ;
import org.springframework.security.core.Authentication ;
import org.springframework.security.core.Authentication ;
import org.springframework.security.core.context.SecurityContextHolder ;
import org.springframework.security.core.context.SecurityContextHolder ;
import org.vaadin.lineawesome.LineAwesomeIcon ;
import org.vaadin.lineawesome.LineAwesomeIcon ;
@ -22,9 +24,6 @@ import com.vaadin.flow.component.dependency.CssImport;
import com.vaadin.flow.component.dialog.Dialog ;
import com.vaadin.flow.component.dialog.Dialog ;
import com.vaadin.flow.component.grid.GridVariant ;
import com.vaadin.flow.component.grid.GridVariant ;
import com.vaadin.flow.component.gridpro.GridPro ;
import com.vaadin.flow.component.gridpro.GridPro ;
import com.vaadin.flow.component.html.H3 ;
import com.vaadin.flow.component.html.Image ;
import com.vaadin.flow.component.html.Span ;
import com.vaadin.flow.component.icon.Icon ;
import com.vaadin.flow.component.icon.Icon ;
import com.vaadin.flow.component.icon.VaadinIcon ;
import com.vaadin.flow.component.icon.VaadinIcon ;
import com.vaadin.flow.component.notification.Notification ;
import com.vaadin.flow.component.notification.Notification ;
@ -54,28 +53,28 @@ import mx.gob.jumapacelaya.services.SecurityService;
@CssImport ( "./themes/sistema-mantenimiento/styles.css" )
@CssImport ( "./themes/sistema-mantenimiento/styles.css" )
public class DetallesMantView extends VerticalLayout implements BeforeEnterObserver {
public class DetallesMantView extends VerticalLayout implements BeforeEnterObserver {
private H3 id ;
private VerticalLayout mainLayout ;
private HorizontalLayout headerLayout ;
private HorizontalLayout layout2 ;
private HorizontalLayout layout3 ;
private HorizontalLayout botonesLayout ;
@Value ( "${app.base-url}" )
private String baseUrl ;
private final H3 id ;
private final EmailService emailService ;
private HorizontalLayout fechasLayout ;
private HorizontalLayout fechasLayout ;
private TextField txtId ;
private TextField txtId ;
private TextField txtEquipo ;
private ComboBox < TiposMantenimiento > cbTipo ;
private TextField txtFecha ;
private TextField txtFechaProgramada ;
private TextField txtSituacion ;
private ComboBox < Usuario > cbUsuario ;
private ComboBox < DepartamentosModel > cbDepartamento ;
private GridPro < HardwareDetalle > gridHardware ;
private GridPro < ActualizacioneSeguridadModel > gridActualizaciones ;
private Button btnEditar ;
private Button btnEditarFirmas ;
private Button btnImprimirRepo ;
private Button btnCancelar ;
private Button btnGuardar ;
private final TextField txtEquipo ;
private final ComboBox < TiposMantenimiento > cbTipo ;
private final TextField txtFecha ;
private final TextField txtFechaProgramada ;
private final TextField txtSituacion ;
private final ComboBox < Usuario > cbUsuario ;
private final ComboBox < DepartamentosModel > cbDepartamento ;
private final GridPro < HardwareDetalle > gridHardware ;
private final GridPro < ActualizacioneSeguridadModel > gridActualizaciones ;
private final Button btnEditar ;
private final Button btnEditarFirmas ;
private final Button btnImprimirRepo = new Button ( "Imprimir Reporte" , new Icon ( VaadinIcon . PRINT ) ) ;
private final Button btnCancelar ;
private final Button btnGuardar ;
private final Button btnEnviarEncuesta = new Button ( "Enviar encuesta" , LineAwesomeIcon . ENVELOPE_SOLID . create ( ) ) ;
private int planAnualIdActual ;
private int planAnualIdActual ;
private int mantenimientoIdActual ;
private int mantenimientoIdActual ;
private Dialog confirmDialog ;
private Dialog confirmDialog ;
@ -86,34 +85,31 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
private Image firmaUsuarioImg ;
private Image firmaUsuarioImg ;
private Image firmaSmtImg ;
private Image firmaSmtImg ;
private Image firmaGciaImg ;
private Image firmaGciaImg ;
Notification avisoEncuestaNtf ;
private VerticalLayout userSignLayout ;
private VerticalLayout userSignLayout ;
private VerticalLayout smtSignLayout ;
private VerticalLayout smtSignLayout ;
private VerticalLayout gciaSignLayout ;
private VerticalLayout gciaSignLayout ;
private final SecurityService securityService ;
private final DatabaseService service ;
private final DatabaseService service ;
private final ReportService reportService ;
public DetallesMantView ( SecurityService securityService , DatabaseService service , ReportService reportService ) {
public DetallesMantView ( SecurityService securityService , DatabaseService service , ReportService reportService , EmailService emailService ) {
this . service = service ;
this . service = service ;
this . securityService = securityService ;
this . reportService = reportService ;
setPadding ( true ) ;
setPadding ( true ) ;
mainLayout = new VerticalLayout ( ) ;
VerticalLayout mainLayout = new VerticalLayout ( ) ;
mainLayout . setHeightFull ( ) ;
mainLayout . setHeightFull ( ) ;
mainLayout . getStyle ( )
mainLayout . getStyle ( )
. set ( "box-shadow" , "0 4px 8px rgba(0,0,0,0.2)" )
. set ( "border-radius" , "12px" )
. set ( "background-color" , "white" )
. set ( "padding" , "1rem" )
. set ( "margin" , "1rem auto" ) ;
. set ( "box-shadow" , "0 4px 8px rgba(0,0,0,0.2)" )
. set ( "border-radius" , "12px" )
. set ( "background-color" , "white" )
. set ( "padding" , "1rem" )
. set ( "margin" , "1rem auto" ) ;
id = new H3 ( ) ;
id = new H3 ( ) ;
headerLayout = new HorizontalLayout ( ) ;
HorizontalLayout headerLayout = new HorizontalLayout ( ) ;
headerLayout . setWidthFull ( ) ;
headerLayout . setWidthFull ( ) ;
headerLayout . add ( id ) ;
headerLayout . add ( id ) ;
@ -129,7 +125,7 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
cbDepartamento . setItems ( service . getDepartamentos ( ) ) ;
cbDepartamento . setItems ( service . getDepartamentos ( ) ) ;
cbDepartamento . setItemLabelGenerator ( DepartamentosModel : : getNombre ) ;
cbDepartamento . setItemLabelGenerator ( DepartamentosModel : : getNombre ) ;
layout2 = new HorizontalLayout ( ) ;
HorizontalLayout layout2 = new HorizontalLayout ( ) ;
layout2 . setWidthFull ( ) ;
layout2 . setWidthFull ( ) ;
txtEquipo = new TextField ( "Equipo:" ) ;
txtEquipo = new TextField ( "Equipo:" ) ;
txtEquipo . setReadOnly ( true ) ;
txtEquipo . setReadOnly ( true ) ;
@ -147,7 +143,7 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
txtSituacion . setReadOnly ( true ) ;
txtSituacion . setReadOnly ( true ) ;
fechasLayout . add ( txtFechaProgramada , txtFecha , txtSituacion ) ;
fechasLayout . add ( txtFechaProgramada , txtFecha , txtSituacion ) ;
layout3 = new HorizontalLayout ( ) ;
HorizontalLayout layout3 = new HorizontalLayout ( ) ;
layout3 . setWidthFull ( ) ;
layout3 . setWidthFull ( ) ;
cbUsuario . setReadOnly ( true ) ;
cbUsuario . setReadOnly ( true ) ;
cbDepartamento . setReadOnly ( true ) ;
cbDepartamento . setReadOnly ( true ) ;
@ -159,22 +155,22 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
/ / Grid que muestra los detalles del hardware
/ / Grid que muestra los detalles del hardware
gridHardware = new GridPro < > ( ) ;
gridHardware = new GridPro < > ( ) ;
gridHardware . addColumn ( item - > item . getDescripcion ( ) )
gridHardware . addColumn ( item - > item . getDescripcion ( ) )
. setHeader ( "Descripción" ) ;
. setHeader ( "Descripción" ) ;
gridHardware . addEditColumn ( HardwareDetalle : : getNumSerie )
gridHardware . addEditColumn ( HardwareDetalle : : getNumSerie )
. text ( ( item , newValue ) - > item . setNumSerie ( newValue ) )
. setHeader ( "No. Serie" )
. setEditorComponent ( new TextField ( ) ) ;
. text ( ( item , newValue ) - > item . setNumSerie ( newValue ) )
. setHeader ( "No. Serie" )
. setEditorComponent ( new TextField ( ) ) ;
gridHardware . addEditColumn ( HardwareDetalle : : getModelo )
gridHardware . addEditColumn ( HardwareDetalle : : getModelo )
. text ( ( item , newValue ) - > item . setModelo ( newValue ) )
. setHeader ( "Modelo" )
. setEditorComponent ( new TextField ( ) ) ;
. text ( ( item , newValue ) - > item . setModelo ( newValue ) )
. setHeader ( "Modelo" )
. setEditorComponent ( new TextField ( ) ) ;
gridHardware . addEditColumn ( HardwareDetalle : : getPlaca )
gridHardware . addEditColumn ( HardwareDetalle : : getPlaca )
. text ( ( item , newValue ) - > item . setPlaca ( newValue ) )
. setHeader ( "Placa" )
. setEditorComponent ( new TextField ( ) ) ;
. text ( ( item , newValue ) - > item . setPlaca ( newValue ) )
. setHeader ( "Placa" )
. setEditorComponent ( new TextField ( ) ) ;
gridHardware . setWidthFull ( ) ;
gridHardware . setWidthFull ( ) ;
gridHardware . setEditOnClick ( false ) ;
gridHardware . setEditOnClick ( false ) ;
@ -186,14 +182,14 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
/ / Grid que muestra las actualizaciones de seguridad
/ / Grid que muestra las actualizaciones de seguridad
gridActualizaciones = new GridPro < > ( ) ;
gridActualizaciones = new GridPro < > ( ) ;
gridActualizaciones . addEditColumn ( ActualizacioneSeguridadModel : : getDescripcion )
gridActualizaciones . addEditColumn ( ActualizacioneSeguridadModel : : getDescripcion )
. text ( ( item , newValue ) - > item . setDescripcion ( newValue ) )
. setHeader ( "Descripción" )
. setEditorComponent ( new TextField ( ) ) ;
. text ( ( item , newValue ) - > item . setDescripcion ( newValue ) )
. setHeader ( "Descripción" )
. setEditorComponent ( new TextField ( ) ) ;
gridActualizaciones . addEditColumn ( ActualizacioneSeguridadModel : : getOtrasactualizaciones )
gridActualizaciones . addEditColumn ( ActualizacioneSeguridadModel : : getOtrasactualizaciones )
. text ( ( item , newValue ) - > item . setOtrasactualizaciones ( newValue ) )
. setHeader ( "Otras Actualizaciones" )
. setEditorComponent ( new TextField ( ) ) ;
. text ( ( item , newValue ) - > item . setOtrasactualizaciones ( newValue ) )
. setHeader ( "Otras Actualizaciones" )
. setEditorComponent ( new TextField ( ) ) ;
gridActualizaciones . setWidthFull ( ) ;
gridActualizaciones . setWidthFull ( ) ;
gridActualizaciones . setEditOnClick ( false ) ;
gridActualizaciones . setEditOnClick ( false ) ;
@ -201,16 +197,18 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
gridActualizaciones . addThemeVariants ( GridVariant . LUMO_ROW_STRIPES ) ;
gridActualizaciones . addThemeVariants ( GridVariant . LUMO_ROW_STRIPES ) ;
HorizontalLayout botonesHeaderLyt = new HorizontalLayout ( ) ;
botonesHeaderLyt . setWidthFull ( ) ;
botonesHeaderLyt . add ( btnImprimirRepo , btnEnviarEncuesta ) ;
botonesLayout = new HorizontalLayout ( ) ;
HorizontalLayout botonesLayout = new HorizontalLayout ( ) ;
botonesLayout . setWidthFull ( ) ;
botonesLayout . setWidthFull ( ) ;
botonesLayout . setJustifyContentMode ( JustifyContentMode . CENTER ) ;
botonesLayout . setJustifyContentMode ( JustifyContentMode . CENTER ) ;
btnEditar = new Button ( "Editar" , new Icon ( VaadinIcon . EDIT ) ) ;
btnEditar = new Button ( "Editar" , new Icon ( VaadinIcon . EDIT ) ) ;
btnImprimirRepo = new Button ( "Imprimir Reporte" , new Icon ( VaadinIcon . PRINT ) ) ;
btnEditarFirmas = new Button ( "Editar firmas" , LineAwesomeIcon . SIGNATURE_SOLID . create ( ) ) ;
btnEditarFirmas = new Button ( "Editar firmas" , LineAwesomeIcon . SIGNATURE_SOLID . create ( ) ) ;
btnGuardar = new Button ( "Guardar" , LineAwesomeIcon . SAVE_SOLID . create ( ) ) ;
btnGuardar = new Button ( "Guardar" , LineAwesomeIcon . SAVE_SOLID . create ( ) ) ;
btnCancelar = new Button ( "Cancelar" , new Icon ( VaadinIcon . CLOSE_CIRCLE_O ) ) ;
btnCancelar = new Button ( "Cancelar" , new Icon ( VaadinIcon . CLOSE_CIRCLE_O ) ) ;
botonesLayout . add ( btnEditar , btnEditarFirmas , btnImprimirRepo , btn Guardar , btnCancelar ) ;
botonesLayout . add ( btnEditar , btnEditarFirmas , btnGuardar , btnCancelar ) ;
btnGuardar . setVisible ( false ) ;
btnGuardar . setVisible ( false ) ;
btnGuardar . getStyle ( ) . set ( "background-color" , "#008000" ) ;
btnGuardar . getStyle ( ) . set ( "background-color" , "#008000" ) ;
@ -304,6 +302,12 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
} ) ;
} ) ;
btnEnviarEncuesta . addClickListener ( e - > {
avisoEncuestaNtf . close ( ) ;
enviarCorreo ( ) ;
} ) ;
/ / Se dispara el dialogo de confirmacion
/ / Se dispara el dialogo de confirmacion
btnGuardar . addClickListener ( e - > confirmDialog . open ( ) ) ;
btnGuardar . addClickListener ( e - > confirmDialog . open ( ) ) ;
@ -317,10 +321,10 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
txtJustificacion . setRequired ( true ) ;
txtJustificacion . setRequired ( true ) ;
confirmDialog . add (
confirmDialog . add (
new VerticalLayout (
new Span ( "¿Estás seguro de que deseas actualizar el mantenimiento?" ) ,
txtJustificacion
)
new VerticalLayout (
new Span ( "¿Estás seguro de que deseas actualizar el mantenimiento?" ) ,
txtJustificacion
)
) ;
) ;
Button btnConfirmar = new Button ( "Actualizar" , event - > {
Button btnConfirmar = new Button ( "Actualizar" , event - > {
@ -371,111 +375,113 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
addSignatureSection ( ) ;
addSignatureSection ( ) ;
mainLayout . add ( headerLayout , layout2 , fechasLayout , layout3 , gridHardware , gridActualizaciones , firmasLAyout , botonesLayout ) ;
add ( mainLayout ) ;
mainLayout . add ( headerLayout , layout2 , fechasLayout , layout3 , gridHardware , gridActualizaciones , firmasLAyout , botonesLayout ) ;
add ( botonesHeaderLyt , mainLayout ) ;
this . setSpacing ( false ) ;
this . emailService = emailService ;
}
}
private void realizarActualizacion ( ) {
private void realizarActualizacion ( ) {
boolean exito = true ;
boolean exito = true ;
/ / Obtén los objetos seleccionados
TiposMantenimiento tipoSeleccionado = cbTipo . getValue ( ) ;
Usuario usuarioSeleccionado = cbUsuario . getValue ( ) ;
DepartamentosModel departamentoSeleccionado = cbDepartamento . getValue ( ) ;
/ / Obtén los objetos seleccionados
TiposMantenimiento tipoSeleccionado = cbTipo . getValue ( ) ;
Usuario usuarioSeleccionado = cbUsuario . getValue ( ) ;
DepartamentosModel departamentoSeleccionado = cbDepartamento . getValue ( ) ;
int tipoId = tipoSeleccionado ! = null ? Integer . parseInt ( tipoSeleccionado . getTipomantId ( ) ) : 0 ;
int empleadoId = usuarioSeleccionado ! = null ? Integer . parseInt ( usuarioSeleccionado . getEmpleadoId ( ) ) : 0 ;
String departamentoId = departamentoSeleccionado ! = null ? departamentoSeleccionado . getDepartamentoId ( ) : null ;
int tipoId = tipoSeleccionado ! = null ? Integer . parseInt ( tipoSeleccionado . getTipomantId ( ) ) : 0 ;
int empleadoId = usuarioSeleccionado ! = null ? Integer . parseInt ( usuarioSeleccionado . getEmpleadoId ( ) ) : 0 ;
String departamentoId = departamentoSeleccionado ! = null ? departamentoSeleccionado . getDepartamentoId ( ) : null ;
/ / Fechas ( corrige el campo )
DateTimeFormatter formatter = DateTimeFormatter . ofPattern ( "dd/MM/yyyy" ) ;
LocalDate fechaProg = ! txtFechaProgramada . getValue ( ) . isEmpty ( ) ? LocalDate . parse ( txtFechaProgramada . getValue ( ) , formatter ) : null ;
LocalDate fechaRealizado = ! txtFecha . getValue ( ) . isEmpty ( ) ? LocalDate . parse ( txtFecha . getValue ( ) , formatter ) : null ;
/ / Fechas ( corrige el campo )
DateTimeFormatter formatter = DateTimeFormatter . ofPattern ( "dd/MM/yyyy" ) ;
LocalDate fechaProg = ! txtFechaProgramada . getValue ( ) . isEmpty ( ) ? LocalDate . parse ( txtFechaProgramada . getValue ( ) , formatter ) : null ;
LocalDate fechaRealizado = ! txtFecha . getValue ( ) . isEmpty ( ) ? LocalDate . parse ( txtFecha . getValue ( ) , formatter ) : null ;
/ / Obtener las firmas como en MantenimientoView
byte [ ] userSignatureBytes = userSignPad . getImageBase64 ( ) ;
byte [ ] smtSignatureBytes = smtSignPad . getImageBase64 ( ) ;
/ / Obtener las firmas como en MantenimientoView
byte [ ] userSignatureBytes = userSignPad . getImageBase64 ( ) ;
byte [ ] smtSignatureBytes = smtSignPad . getImageBase64 ( ) ;
String userSignatureBase64 = ( userSignatureBytes ! = null ) ? Base64 . getEncoder ( ) . encodeToString ( userSignatureBytes ) : null ;
String smtSignatureBase64 = ( smtSignatureBytes ! = null ) ? Base64 . getEncoder ( ) . encodeToString ( smtSignatureBytes ) : null ;
String userSignatureBase64 = ( userSignatureBytes ! = null ) ? Base64 . getEncoder ( ) . encodeToString ( userSignatureBytes ) : null ;
String smtSignatureBase64 = ( smtSignatureBytes ! = null ) ? Base64 . getEncoder ( ) . encodeToString ( smtSignatureBytes ) : null ;
/ / Si la firma está vacía , conserva la anterior
if ( userSignatureBase64 = = null | | esFirmaVacia ( userSignatureBase64 ) ) {
userSignatureBase64 = service . getDetalleMantenimientoPorPlanAnualId ( planAnualIdActual ) . getFirmaUser ( ) ;
}
if ( smtSignatureBase64 = = null | | esFirmaVacia ( smtSignatureBase64 ) ) {
smtSignatureBase64 = service . getDetalleMantenimientoPorPlanAnualId ( planAnualIdActual ) . getFirmaSmt ( ) ;
}
/ / Si la firma está vacía , conserva la anterior
if ( userSignatureBase64 = = null | | esFirmaVacia ( userSignatureBase64 ) ) {
userSignatureBase64 = service . getDetalleMantenimientoPorPlanAnualId ( planAnualIdActual ) . getFirmaUser ( ) ;
}
if ( smtSignatureBase64 = = null | | esFirmaVacia ( smtSignatureBase64 ) ) {
smtSignatureBase64 = service . getDetalleMantenimientoPorPlanAnualId ( planAnualIdActual ) . getFirmaSmt ( ) ;
}
/ / ACTUALIZA PLANANUAL ( nombre del equipo y fecha programada )
if ( ! service . actualizarPlanAnual ( planAnualIdActual , txtEquipo . getValue ( ) ) ) {
exito = false ;
}
/ / ACTUALIZA MANTENIMIENTOS ( tipo , departamento , usuario , fecha realizado )
if ( ! service . actualizarMantenimiento (
/ / ACTUALIZA PLANANUAL ( nombre del equipo y fecha programada )
if ( ! service . actualizarPlanAnual ( planAnualIdActual , txtEquipo . getValue ( ) ) ) {
exito = false ;
}
/ / ACTUALIZA MANTENIMIENTOS ( tipo , departamento , usuario , fecha realizado )
if ( ! service . actualizarMantenimiento (
mantenimientoIdActual ,
mantenimientoIdActual ,
tipoId ,
tipoId ,
departamentoId ,
departamentoId ,
empleadoId ,
empleadoId ,
fechaRealizado ,
fechaRealizado ,
txtEquipo . getValue ( ) ,
txtEquipo . getValue ( ) ,
userSignatureBase64 ,
smtSignatureBase64
) ) {
exito = false ;
}
userSignatureBase64 ,
smtSignatureBase64
) ) {
exito = false ;
}
/ / ACTUALIZA HARDWARE ( grid )
for ( HardwareDetalle detalle : gridHardware . getListDataView ( ) . getItems ( ) . toList ( ) ) {
if ( ! service . actualizarHardwareDetalle ( detalle ) ) {
exito = false ;
}
/ / ACTUALIZA HARDWARE ( grid )
for ( HardwareDetalle detalle : gridHardware . getListDataView ( ) . getItems ( ) . toList ( ) ) {
if ( ! service . actualizarHardwareDetalle ( detalle ) ) {
exito = false ;
}
}
}
/ / ACTUALIZA ACTUALIZACIONES DE SEGURIDAD ( grid )
for ( ActualizacioneSeguridadModel actualizacion : gridActualizaciones . getListDataView ( ) . getItems ( ) . toList ( ) ) {
if ( ! service . actualizarActualizacionSeg ( actualizacion ) ) {
exito = false ;
}
/ / ACTUALIZA ACTUALIZACIONES DE SEGURIDAD ( grid )
for ( ActualizacioneSeguridadModel actualizacion : gridActualizaciones . getListDataView ( ) . getItems ( ) . toList ( ) ) {
if ( ! service . actualizarActualizacionSeg ( actualizacion ) ) {
exito = false ;
}
}
}
if ( exito ) {
Notification . show ( "Registros actualizados correctamente" , 3000 , Notification . Position . MIDDLE )
if ( exito ) {
Notification . show ( "Registros actualizados correctamente" , 3000 , Notification . Position . MIDDLE )
. addThemeVariants ( NotificationVariant . LUMO_SUCCESS ) ;
. addThemeVariants ( NotificationVariant . LUMO_SUCCESS ) ;
} else {
Notification . show ( "Error al actualizar uno o más registros" , 3000 , Notification . Position . MIDDLE )
} else {
Notification . show ( "Error al actualizar uno o más registros" , 3000 , Notification . Position . MIDDLE )
. addThemeVariants ( NotificationVariant . LUMO_ERROR ) ;
. addThemeVariants ( NotificationVariant . LUMO_ERROR ) ;
}
/ / Opcional : volver a modo solo lectura
txtEquipo . setReadOnly ( true ) ;
cbTipo . setReadOnly ( true ) ;
txtFecha . setReadOnly ( true ) ;
cbUsuario . setReadOnly ( true ) ;
cbDepartamento . setReadOnly ( true ) ;
btnImprimirRepo . setVisible ( true ) ;
btnEditar . setVisible ( true ) ;
btnEditarFirmas . setVisible ( true ) ;
btnGuardar . setVisible ( false ) ;
btnCancelar . setVisible ( false ) ;
gridHardware . setEditOnClick ( false ) ;
gridHardware . getEditor ( ) . cancel ( ) ;
if ( firmaUsuarioImg ! = null & & userSignPad . getParent ( ) . isPresent ( ) ) {
userSignLayout . replace ( userSignPad , firmaUsuarioImg ) ;
}
if ( firmaSmtImg ! = null & & smtSignPad . getParent ( ) . isPresent ( ) ) {
smtSignLayout . replace ( smtSignPad , firmaSmtImg ) ;
}
}
/ / Opcional : volver a modo solo lectura
txtEquipo . setReadOnly ( true ) ;
cbTipo . setReadOnly ( true ) ;
txtFecha . setReadOnly ( true ) ;
cbUsuario . setReadOnly ( true ) ;
cbDepartamento . setReadOnly ( true ) ;
btnImprimirRepo . setVisible ( true ) ;
btnEditar . setVisible ( true ) ;
btnEditarFirmas . setVisible ( true ) ;
btnGuardar . setVisible ( false ) ;
btnCancelar . setVisible ( false ) ;
gridHardware . setEditOnClick ( false ) ;
gridHardware . getEditor ( ) . cancel ( ) ;
if ( firmaUsuarioImg ! = null & & userSignPad . getParent ( ) . isPresent ( ) ) {
userSignLayout . replace ( userSignPad , firmaUsuarioImg ) ;
}
if ( firmaSmtImg ! = null & & smtSignPad . getParent ( ) . isPresent ( ) ) {
smtSignLayout . replace ( smtSignPad , firmaSmtImg ) ;
}
}
}
/ / Metodo para verificar si la firma corresponde a una cadena de firma vacia
/ / Metodo para verificar si la firma corresponde a una cadena de firma vacia
private boolean esFirmaVacia ( String firmaBase64 ) {
private boolean esFirmaVacia ( String firmaB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BAgAABQbUBAgQIECAQCAhqgOgEAQIECBAQVBsgQIAAAQKBgKAGiE4QIECAAAFBtQECBAgQIBAICGqA6AQBAgQIEBBUGyBAgAABAoGAoAaIThAgQIAAAUG1AQIECBAgEAgIaoDoBAECBAgQEFQbIECAAAECgYCgBohOECBAgAABQbUBAgQIECAQCAhqgOgEAQIECBAQVBsgQIAAAQKBgKAGiE4QIECAAAFBtQECBAgQIBAICGqA6AQBAgQIEBBUGyBAgAABAoGAoAaIThAgQIAAAUG1AQIECBAgEAgIaoDoBAECBAgQEFQbIECAAAECgYCgBohOECBAgAABQbUBAgQIECAQCAhqgOgEAQIECBAQVBsgQIAAAQKBgKAGiE4QIECAAAFBtQECBAgQIBAICGqA6AQBAgQIEBBUGyBAgAABAoGAoAaIThAgQIAAAUG1AQIECBAgEAgIaoDoBAECBAgQEFQbIECAAAECgYCgBohOECBAgAABQbUBAgQIECAQCAhqgOgEAQIECBAQVBsgQIAAAQKBgKAGiE4QIECAAAFBtQECBAgQIBAICGqA6AQBAgQIEBBUGyBAgAABAoGAoAaIThAgQIAAAUG1AQIECBAgEAgIaoDoBAECBAgQEFQbIECAAAECgYCgBohOECBAgAABQbUBAgQIECAQCAhqgOgEAQIECBAQVBsgQIAAAQKBgKAGiE4QIECAAAFBtQECBAgQIBAICGqA6AQBAgQIEBBUGyBAgAABAoGAoAaIThAgQIAAAUG1AQIECBAgEAgIaoDoBAECBAgQEFQbIECAAAECgYCgBohOECBAgAABQbUBAgQIECAQCAhqgOgEAQIECBAQVBsgQIAAAQKBgKAGiE4QIECAAAFBtQECBAgQIBAICGqA6AQBAgQIEBBUGyBAgAABAoGAoAaIThAgQIAAAUG1AQIECBAgEAgIaoDoBAECBAgQEFQbIECAAAECgYCgBohOECBAgACBA8Bc7Tp3N5/2AAAAAElFTkSuQmCC " ;
return firmaBase64 . equals ( firmaVacia ) ;
return firmaBase64 . equals ( firmaVacia ) ;
}
}
@ -515,18 +521,75 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
}
}
/ / METODO PARA ENVIAR LOS CORREOS ELECTRONICOS
private void enviarCorreo ( ) {
Usuario usuarioDestino = cbUsuario . getValue ( ) ;
if ( usuarioDestino ! = null & & usuarioDestino . getEmail ( ) ! = null ) {
String destinatario = usuarioDestino . getEmail ( ) ;
String asunto = "Encuesta de satisfacción -Mantenimiento #" + mantenimientoIdActual ;
String token = service . crearTokenEncuesta ( mantenimientoIdActual ) ;
String linkEncuesta = baseUrl + "/encuesta?token=" + token ;
String cuerpo = "<html>" +
"<body>" +
"<a href = " + linkEncuesta + ">" +
"<img src='cid:image_id'/>" +
"</a>" +
"</body>" +
"</html>" ;
String imagePath = "META-INF/resources/images/imgCorreo/imgEncuesta.png" ;
emailService . enviarCorreo ( destinatario , asunto , cuerpo , imagePath ) ;
Notification . show ( "Encuesta enviada correctamente para el mantenimiento No. " + mantenimientoIdActual , 3000 , Notification . Position . MIDDLE )
. addThemeVariants ( NotificationVariant . LUMO_SUCCESS ) ;
} else {
Notification . show ( "Por favor, seleccione un usuario destino" , 3000 , Notification . Position . MIDDLE ) ;
}
}
@Override
@Override
public void beforeEnter ( BeforeEnterEvent event ) {
public void beforeEnter ( BeforeEnterEvent event ) {
String idParam = event . getLocation ( ) . getQueryParameters ( ) . getParameters ( ) . get ( "id" ) ! = null
String idParam = event . getLocation ( ) . getQueryParameters ( ) . getParameters ( ) . get ( "id" ) ! = null
? event . getLocation ( ) . getQueryParameters ( ) . getParameters ( ) . get ( "id" ) . stream ( ) . findFirst ( ) . orElse ( null )
? event . getLocation ( ) . getQueryParameters ( ) . getParameters ( ) . get ( "id" ) . stream ( ) . findFirst ( ) . orElse ( null )
: null ;
: null ;
String encParam = event . getLocation ( ) . getQueryParameters ( ) . getParameters ( ) . getOrDefault ( "enc" , List . of ( ) )
. stream ( ) . findFirst ( ) . orElse ( "N" ) . toUpperCase ( ) ;
if ( idParam ! = null ) {
if ( idParam ! = null ) {
try {
try {
int planId = Integer . parseInt ( idParam ) ;
int planId = Integer . parseInt ( idParam ) ;
DetalleMantenimientoModel detalle = service . getDetalleMantenimientoPorPlanAnualId ( planId ) ;
DetalleMantenimientoModel detalle = service . getDetalleMantenimientoPorPlanAnualId ( planId ) ;
if ( encParam . equalsIgnoreCase ( "N" ) ) {
Icon icono = new Icon ( VaadinIcon . WARNING ) ;
icono . setSize ( "40px" ) ;
NativeLabel aviso = new NativeLabel ( "Aviso:" ) ;
aviso . getStyle ( ) . set ( "font-weight" , "bold" ) ;
NativeLabel label = new NativeLabel ( "¡No se ha respondido una encuesta para este mantenimiento!" ) ;
VerticalLayout textLyt = new VerticalLayout ( aviso , label ) ;
textLyt . setPadding ( false ) ;
textLyt . setSpacing ( false ) ;
HorizontalLayout layout = new HorizontalLayout ( icono , textLyt ) ;
layout . setJustifyContentMode ( JustifyContentMode . CENTER ) ;
layout . setAlignItems ( Alignment . CENTER ) ;
avisoEncuestaNtf = new Notification ( layout ) ;
avisoEncuestaNtf . setPosition ( Notification . Position . TOP_CENTER ) ;
avisoEncuestaNtf . addThemeVariants ( NotificationVariant . LUMO_WARNING ) ;
avisoEncuestaNtf . setDuration ( 5000 ) ;
avisoEncuestaNtf . open ( ) ;
} else {
btnEnviarEncuesta . setEnabled ( false ) ;
btnEnviarEncuesta . getStyle ( ) . set ( "opacity" , "0.5" ) ;
}
if ( detalle ! = null ) {
if ( detalle ! = null ) {
this . planAnualIdActual = detalle . getPlanAnualId ( ) ;
this . planAnualIdActual = detalle . getPlanAnualId ( ) ;
this . mantenimientoIdActual = detalle . getId ( ) ;
this . mantenimientoIdActual = detalle . getId ( ) ;
@ -534,9 +597,9 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
id . setText ( "Plan ID: " + idParam ) ;
id . setText ( "Plan ID: " + idParam ) ;
txtEquipo . setValue ( String . valueOf ( detalle . getNombreEquipo ( ) ) ) ;
txtEquipo . setValue ( String . valueOf ( detalle . getNombreEquipo ( ) ) ) ;
cbTipo . setValue (
cbTipo . setValue (
cbTipo . getListDataView ( ) . getItems ( )
. filter ( t - > t . getNombre ( ) . equals ( detalle . getTipo ( ) ) )
. findFirst ( ) . orElse ( null )
cbTipo . getListDataView ( ) . getItems ( )
. filter ( t - > t . getNombre ( ) . equals ( detalle . getTipo ( ) ) )
. findFirst ( ) . orElse ( null )
) ;
) ;
DateTimeFormatter formatter = DateTimeFormatter . ofPattern ( "dd/MM/yyyy" ) ;
DateTimeFormatter formatter = DateTimeFormatter . ofPattern ( "dd/MM/yyyy" ) ;
@ -548,14 +611,14 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
txtFecha . setValue ( fechaReal ) ;
txtFecha . setValue ( fechaReal ) ;
txtSituacion . setValue ( situacion ) ;
txtSituacion . setValue ( situacion ) ;
cbUsuario . setValue (
cbUsuario . setValue (
cbUsuario . getListDataView ( ) . getItems ( )
. filter ( u - > u . getNombre ( ) . equals ( detalle . getUsuario ( ) ) )
. findFirst ( ) . orElse ( null )
cbUsuario . getListDataView ( ) . getItems ( )
. filter ( u - > u . getNombre ( ) . equals ( detalle . getUsuario ( ) ) )
. findFirst ( ) . orElse ( null )
) ;
) ;
cbDepartamento . setValue (
cbDepartamento . setValue (
cbDepartamento . getListDataView ( ) . getItems ( )
. filter ( d - > d . getNombre ( ) . equals ( detalle . getDepartamento ( ) ) )
. findFirst ( ) . orElse ( null )
cbDepartamento . getListDataView ( ) . getItems ( )
. filter ( d - > d . getNombre ( ) . equals ( detalle . getDepartamento ( ) ) )
. findFirst ( ) . orElse ( null )
) ;
) ;
int mantId = detalle . getId ( ) ;
int mantId = detalle . getId ( ) ;
List < HardwareDetalle > listaHardware = service . getHardwaredetallePorMantId ( mantId ) ;
List < HardwareDetalle > listaHardware = service . getHardwaredetallePorMantId ( mantId ) ;
@ -589,7 +652,7 @@ public class DetallesMantView extends VerticalLayout implements BeforeEnterObser
firmaSmtImg . setWidthFull ( ) ;
firmaSmtImg . setWidthFull ( ) ;
smtSignLayout . replace ( smtSignPad , firmaSmtImg ) ;
smtSignLayout . replace ( smtSignPad , firmaSmtImg ) ;
}
}
Image firmaGcia = new Image ( "images/FirmaGerenteTI.png" , "Firma de la Gcia. de T.I" ) ;
Image firmaGcia = new Image ( "images/FirmaGerenteTI.png" , "Firma de la Gcia. de T.I" ) ;
firmaGcia . setHeight ( "200px" ) ;
firmaGcia . setHeight ( "200px" ) ;
firmaGcia . setWidthFull ( ) ;
firmaGcia . setWidthFull ( ) ;