sigo-package 1.2.183 → 1.2.185
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +33 -19
- package/dist/index.d.ts +33 -19
- package/dist/index.js +119 -2
- package/dist/index.mjs +111 -0
- package/package.json +30 -30
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as sigo_entities from 'sigo-entities';
|
|
2
|
-
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, DocumentRequirementDto, AltasNVTOrderENTITY, MaterialesSomacylDTO, SomacylEntregablesDTO, FilesDocDTO, CodigoNombreDTO, SystemOptionEntity, MenuDto } from 'sigo-entities';
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, DocumentRequirementDto, AltasNVTOrderENTITY, MaterialesSomacylDTO, SomacylEntregablesDTO, FilesDocDTO, MetradosVeredaDTO, BtAlpPluzVeredaAsignacionENTITY, SalidaAlmacenENTITY, CodigoNombreDTO, SystemOptionEntity, MenuDto } from 'sigo-entities';
|
|
3
3
|
import { ClassConstructor } from 'class-transformer';
|
|
4
4
|
import { Request, Response, NextFunction } from 'express';
|
|
5
5
|
|
|
@@ -940,6 +940,35 @@ declare function verifyPhotosNotFinalizedSomacyl(entregables: SomacylEntregables
|
|
|
940
940
|
*/
|
|
941
941
|
declare function getCaptureDateSomacyl(file: Pick<FilesDocDTO, 'Observacion' | 'Fecha_Archivo'>, BadRequestException?: ClassConstructor<Error>): Date;
|
|
942
942
|
|
|
943
|
+
/** Diferencia máxima (m²) entre los m² reparados y ancho × largo × cantidad de paños antes de avisar */
|
|
944
|
+
declare const TOLERANCIA_M2_VEREDA = 0.1;
|
|
945
|
+
/** Carpeta del servidor de archivos de las evidencias */
|
|
946
|
+
declare const DIRECTORIO_DOCUMENTACION_VEREDA = "ORDENES_BT_ALP_PLUZ_VEREDA";
|
|
947
|
+
|
|
948
|
+
/** Evidencias del formulario civil (BT_Formulario_Civil del SSAM) que registra la cuadrilla de veredas */
|
|
949
|
+
declare const documentRequirementVereda: DocumentRequirementDto[];
|
|
950
|
+
/** Requisitos hoja (los que reciben archivos) */
|
|
951
|
+
declare const requisitosArchivoVereda: DocumentRequirementDto[];
|
|
952
|
+
|
|
953
|
+
/** Pantalla de la PWA que corrige cada error */
|
|
954
|
+
type SeccionFormularioVereda = 'workflow' | 'formulario' | 'evidencias';
|
|
955
|
+
interface ErrorFormularioVereda {
|
|
956
|
+
seccion: SeccionFormularioVereda;
|
|
957
|
+
mensaje: string;
|
|
958
|
+
}
|
|
959
|
+
type AsignacionValidable = Pick<BtAlpPluzVeredaAsignacionENTITY, 'formulario_civil' | 'documentacion'>;
|
|
960
|
+
/** Aviso (no bloquea) si los m² reparados no cuadran con ancho × largo × cantidad de paños */
|
|
961
|
+
declare function avisoM2Vereda(metrados: MetradosVeredaDTO): string | null;
|
|
962
|
+
/**
|
|
963
|
+
* Lo que falta para cerrar el workflow y liquidar: pasos previos a CERRADO, metrados y evidencias obligatorias.
|
|
964
|
+
* CERRADO no se exige aquí (se registra cuando esto no tiene errores); liquidar lo exige aparte.
|
|
965
|
+
* Lo usan la PWA (offline) y el backend.
|
|
966
|
+
*/
|
|
967
|
+
declare function validarFormularioCivil(asignacion: AsignacionValidable): {
|
|
968
|
+
errores: ErrorFormularioVereda[];
|
|
969
|
+
avisos: string[];
|
|
970
|
+
};
|
|
971
|
+
|
|
943
972
|
type SaldoStockPersonal = Pick<StockPersonalENTITY, 'Despacho' | 'Devolucion' | 'Liquidacion' | 'DespachoTR' | 'DevolucionTR'>;
|
|
944
973
|
/** Saldo de un StockPersonal: Despacho - Devolucion - Liquidacion + DespachoTR - DevolucionTR (redondeado a 2 decimales) */
|
|
945
974
|
declare function calcularSaldoStockPersonal(stock: SaldoStockPersonal): number;
|
|
@@ -1014,26 +1043,11 @@ declare const FIRMA_DESPACHO_TIEMPOS: {
|
|
|
1014
1043
|
};
|
|
1015
1044
|
declare const firmaDespachoCanalSolicitud: (identificacion: string) => string;
|
|
1016
1045
|
declare const firmaDespachoCanalRespuesta: (requestId: string) => string;
|
|
1017
|
-
|
|
1018
|
-
Codigo: string;
|
|
1019
|
-
Descripcion: string;
|
|
1020
|
-
UnidadMedida: string;
|
|
1021
|
-
Cantidad: number;
|
|
1022
|
-
}
|
|
1023
|
-
/** Lo que la web envía para que el personal vea qué firma */
|
|
1024
|
-
interface FirmaDespachoResumen {
|
|
1025
|
-
ID_DespachoAlmacen: number;
|
|
1026
|
-
NroDocumento: string;
|
|
1027
|
-
Almacen: string;
|
|
1028
|
-
Delegacion: string;
|
|
1029
|
-
Fecha: string;
|
|
1030
|
-
SolicitadoPor: string;
|
|
1031
|
-
Detalle: FirmaDespachoResumenDetalle[];
|
|
1032
|
-
}
|
|
1046
|
+
/** documento: la salida de almacén que se despacha, para que el personal vea qué firma */
|
|
1033
1047
|
type FirmaDespachoSolicitud = {
|
|
1034
1048
|
Accion: typeof FIRMA_DESPACHO_ACCIONES.SOLICITAR;
|
|
1035
1049
|
requestId: string;
|
|
1036
|
-
|
|
1050
|
+
documento: SalidaAlmacenENTITY;
|
|
1037
1051
|
};
|
|
1038
1052
|
type FirmaDespachoMensajeSolicitud = FirmaDespachoSolicitud | {
|
|
1039
1053
|
Accion: typeof FIRMA_DESPACHO_ACCIONES.CANCELAR;
|
|
@@ -1233,4 +1247,4 @@ declare function getCookieToken(req: Request<any>, webOrigins: string[]): string
|
|
|
1233
1247
|
|
|
1234
1248
|
declare function validateUUIDv4Param(BadRequestException: ClassConstructor<Error>, req: Request<any>, _res: Response, next: NextFunction): Promise<void>;
|
|
1235
1249
|
|
|
1236
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, type CantidadMaterialAL04, type CierresPreliquidarAL02, type CierresPreliquidarAL04, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DEVOLUCION_TR_ESTADOS, DEVOLUCION_TR_MOTIVO_CAMBIO_TURNO, DocumentacionReplanteo, type ErrorLineaDevolucionTR, EstadoEspecialidad9612, FIRMA_DESPACHO_ACCIONES, FIRMA_DESPACHO_TIEMPOS, type FirmaDespachoMensajeRespuesta, type FirmaDespachoMensajeSolicitud, type
|
|
1250
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, type CantidadMaterialAL04, type CierresPreliquidarAL02, type CierresPreliquidarAL04, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DEVOLUCION_TR_ESTADOS, DEVOLUCION_TR_MOTIVO_CAMBIO_TURNO, DIRECTORIO_DOCUMENTACION_VEREDA, DocumentacionReplanteo, type ErrorFormularioVereda, type ErrorLineaDevolucionTR, EstadoEspecialidad9612, FIRMA_DESPACHO_ACCIONES, FIRMA_DESPACHO_TIEMPOS, type FirmaDespachoMensajeRespuesta, type FirmaDespachoMensajeSolicitud, type FirmaDespachoSolicitud, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, type LineaDevolucionTR, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MaterialRequeridoAL04, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, type ModoMaterialesAL04, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, SOMACYL_CODIGO_CONTADOR_RETIRADO, SOMACYL_PHOTO_POSITIONS, type SaldoStockPersonal, type SeccionFormularioVereda, type SomacylPhotoKey, type StockEntregableDevolucionTR, type TARGET, TOLERANCIA_M2_VEREDA, type TipoPreliquidacionAL02, type TipoPreliquidacionAL04, UpdateNodosDocDP, ValidarRelacionMOHijasAL04, ValorizacionHelper, avisoM2Vereda, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularSaldoStockPersonal, calcularTotalMaterialValorizacionPeru9112, cantidadFijaMOAL04, cantidadMaterialAL04, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL02, codBalizaAL04, codBalizaPreliquidarAL04, codBaremoUnicoDPAL04, codClientes, codIssueByPeriodoAL02, codMOAsfaltoHijasAL04, codMOAsfaltoMadreAL04, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOExcluidos, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMONoPreliquidablesAL04, codMOOcultosAL04, codMOPreliquidarTroncalAL02, codMOPreliquidarTroncalAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codMaterialesOcultosAL04, codNoCliente, codSopladoRD, codigoParteDiarioHoyCHILE9512, codigosBaremosSubcontrataAL02, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, codigosSopladoHP, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, documentRequirementAltasNVTMultifamiliar, documentRequirementAltasNVTUnifamiliar, documentRequirementVereda, empresas, esAsignacionPreliquidableAL02, esAsignacionPreliquidableAL04, esCadenaFechaISOValida, esMaterialDuctoAL04, esObjetoFecha, esParteDiarioAprobadoCHILE9512, esParteDiarioEditableCHILE9512, estadoRechazadaPorMetraje, estadoRechazadaPorMetrajeAL04, firmaDespachoCanalRespuesta, firmaDespachoCanalSolicitud, formatCurrencyV1, formatNumberSmart, formatNumberV1, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getCaptureDateSomacyl, getChannelName, getContainerName, getCookieToken, getDBName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getPriceMaterial, getQueueName, getQueueNameSaveOneNotification, getRequestOrigin, hashCode, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, mapeoZonasSimilares, materialesAutomaticosAL04, materialesSeleccionablesAL04, modoMaterialesAL04, motivoConsumoAlmacenAL04, motivoConsumoMaterialAutomaticoDuctos, newCodMOTroncalReglaLiquidacion1, obtenerCodMOHomePass, obtenerCodMOHomePassAL04, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerEspecialidadesCerradas, obtenerEspecialidadesCerradasAL04, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, parseDuplicateKeyError, prorratearMaterialesAL04, requisitosArchivoVereda, roundNumber, searchCurrentContractorSpecialtyPrice, setColModels, setContext, subMaterialesAL04, throwDevolucionTRError, throwSomacylError, timeZoneCHILE9512, tituloFotoParteDiarioCHILE9512, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, uuidRegex, validarAsfaltoAL04, validarFormularioCivil, validarLineasDevolucionTR, validateNoLookup, validateUUIDv4Param, verifyDetailsFinalizeSomacyl, verifyFiles, verifyInventoryFinalize, verifyInventoryFinalizeSomacyl, verifyInventoryLimitsSomacyl, verifyLineasDevolucionTR, verifyPhotosFinalizeSomacyl, verifyPhotosNotFinalizedSomacyl };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as sigo_entities from 'sigo-entities';
|
|
2
|
-
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, DocumentRequirementDto, AltasNVTOrderENTITY, MaterialesSomacylDTO, SomacylEntregablesDTO, FilesDocDTO, CodigoNombreDTO, SystemOptionEntity, MenuDto } from 'sigo-entities';
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, DocumentRequirementDto, AltasNVTOrderENTITY, MaterialesSomacylDTO, SomacylEntregablesDTO, FilesDocDTO, MetradosVeredaDTO, BtAlpPluzVeredaAsignacionENTITY, SalidaAlmacenENTITY, CodigoNombreDTO, SystemOptionEntity, MenuDto } from 'sigo-entities';
|
|
3
3
|
import { ClassConstructor } from 'class-transformer';
|
|
4
4
|
import { Request, Response, NextFunction } from 'express';
|
|
5
5
|
|
|
@@ -940,6 +940,35 @@ declare function verifyPhotosNotFinalizedSomacyl(entregables: SomacylEntregables
|
|
|
940
940
|
*/
|
|
941
941
|
declare function getCaptureDateSomacyl(file: Pick<FilesDocDTO, 'Observacion' | 'Fecha_Archivo'>, BadRequestException?: ClassConstructor<Error>): Date;
|
|
942
942
|
|
|
943
|
+
/** Diferencia máxima (m²) entre los m² reparados y ancho × largo × cantidad de paños antes de avisar */
|
|
944
|
+
declare const TOLERANCIA_M2_VEREDA = 0.1;
|
|
945
|
+
/** Carpeta del servidor de archivos de las evidencias */
|
|
946
|
+
declare const DIRECTORIO_DOCUMENTACION_VEREDA = "ORDENES_BT_ALP_PLUZ_VEREDA";
|
|
947
|
+
|
|
948
|
+
/** Evidencias del formulario civil (BT_Formulario_Civil del SSAM) que registra la cuadrilla de veredas */
|
|
949
|
+
declare const documentRequirementVereda: DocumentRequirementDto[];
|
|
950
|
+
/** Requisitos hoja (los que reciben archivos) */
|
|
951
|
+
declare const requisitosArchivoVereda: DocumentRequirementDto[];
|
|
952
|
+
|
|
953
|
+
/** Pantalla de la PWA que corrige cada error */
|
|
954
|
+
type SeccionFormularioVereda = 'workflow' | 'formulario' | 'evidencias';
|
|
955
|
+
interface ErrorFormularioVereda {
|
|
956
|
+
seccion: SeccionFormularioVereda;
|
|
957
|
+
mensaje: string;
|
|
958
|
+
}
|
|
959
|
+
type AsignacionValidable = Pick<BtAlpPluzVeredaAsignacionENTITY, 'formulario_civil' | 'documentacion'>;
|
|
960
|
+
/** Aviso (no bloquea) si los m² reparados no cuadran con ancho × largo × cantidad de paños */
|
|
961
|
+
declare function avisoM2Vereda(metrados: MetradosVeredaDTO): string | null;
|
|
962
|
+
/**
|
|
963
|
+
* Lo que falta para cerrar el workflow y liquidar: pasos previos a CERRADO, metrados y evidencias obligatorias.
|
|
964
|
+
* CERRADO no se exige aquí (se registra cuando esto no tiene errores); liquidar lo exige aparte.
|
|
965
|
+
* Lo usan la PWA (offline) y el backend.
|
|
966
|
+
*/
|
|
967
|
+
declare function validarFormularioCivil(asignacion: AsignacionValidable): {
|
|
968
|
+
errores: ErrorFormularioVereda[];
|
|
969
|
+
avisos: string[];
|
|
970
|
+
};
|
|
971
|
+
|
|
943
972
|
type SaldoStockPersonal = Pick<StockPersonalENTITY, 'Despacho' | 'Devolucion' | 'Liquidacion' | 'DespachoTR' | 'DevolucionTR'>;
|
|
944
973
|
/** Saldo de un StockPersonal: Despacho - Devolucion - Liquidacion + DespachoTR - DevolucionTR (redondeado a 2 decimales) */
|
|
945
974
|
declare function calcularSaldoStockPersonal(stock: SaldoStockPersonal): number;
|
|
@@ -1014,26 +1043,11 @@ declare const FIRMA_DESPACHO_TIEMPOS: {
|
|
|
1014
1043
|
};
|
|
1015
1044
|
declare const firmaDespachoCanalSolicitud: (identificacion: string) => string;
|
|
1016
1045
|
declare const firmaDespachoCanalRespuesta: (requestId: string) => string;
|
|
1017
|
-
|
|
1018
|
-
Codigo: string;
|
|
1019
|
-
Descripcion: string;
|
|
1020
|
-
UnidadMedida: string;
|
|
1021
|
-
Cantidad: number;
|
|
1022
|
-
}
|
|
1023
|
-
/** Lo que la web envía para que el personal vea qué firma */
|
|
1024
|
-
interface FirmaDespachoResumen {
|
|
1025
|
-
ID_DespachoAlmacen: number;
|
|
1026
|
-
NroDocumento: string;
|
|
1027
|
-
Almacen: string;
|
|
1028
|
-
Delegacion: string;
|
|
1029
|
-
Fecha: string;
|
|
1030
|
-
SolicitadoPor: string;
|
|
1031
|
-
Detalle: FirmaDespachoResumenDetalle[];
|
|
1032
|
-
}
|
|
1046
|
+
/** documento: la salida de almacén que se despacha, para que el personal vea qué firma */
|
|
1033
1047
|
type FirmaDespachoSolicitud = {
|
|
1034
1048
|
Accion: typeof FIRMA_DESPACHO_ACCIONES.SOLICITAR;
|
|
1035
1049
|
requestId: string;
|
|
1036
|
-
|
|
1050
|
+
documento: SalidaAlmacenENTITY;
|
|
1037
1051
|
};
|
|
1038
1052
|
type FirmaDespachoMensajeSolicitud = FirmaDespachoSolicitud | {
|
|
1039
1053
|
Accion: typeof FIRMA_DESPACHO_ACCIONES.CANCELAR;
|
|
@@ -1233,4 +1247,4 @@ declare function getCookieToken(req: Request<any>, webOrigins: string[]): string
|
|
|
1233
1247
|
|
|
1234
1248
|
declare function validateUUIDv4Param(BadRequestException: ClassConstructor<Error>, req: Request<any>, _res: Response, next: NextFunction): Promise<void>;
|
|
1235
1249
|
|
|
1236
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, type CantidadMaterialAL04, type CierresPreliquidarAL02, type CierresPreliquidarAL04, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DEVOLUCION_TR_ESTADOS, DEVOLUCION_TR_MOTIVO_CAMBIO_TURNO, DocumentacionReplanteo, type ErrorLineaDevolucionTR, EstadoEspecialidad9612, FIRMA_DESPACHO_ACCIONES, FIRMA_DESPACHO_TIEMPOS, type FirmaDespachoMensajeRespuesta, type FirmaDespachoMensajeSolicitud, type
|
|
1250
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, type CantidadMaterialAL04, type CierresPreliquidarAL02, type CierresPreliquidarAL04, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DEVOLUCION_TR_ESTADOS, DEVOLUCION_TR_MOTIVO_CAMBIO_TURNO, DIRECTORIO_DOCUMENTACION_VEREDA, DocumentacionReplanteo, type ErrorFormularioVereda, type ErrorLineaDevolucionTR, EstadoEspecialidad9612, FIRMA_DESPACHO_ACCIONES, FIRMA_DESPACHO_TIEMPOS, type FirmaDespachoMensajeRespuesta, type FirmaDespachoMensajeSolicitud, type FirmaDespachoSolicitud, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, type LineaDevolucionTR, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MaterialRequeridoAL04, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, type ModoMaterialesAL04, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, SOMACYL_CODIGO_CONTADOR_RETIRADO, SOMACYL_PHOTO_POSITIONS, type SaldoStockPersonal, type SeccionFormularioVereda, type SomacylPhotoKey, type StockEntregableDevolucionTR, type TARGET, TOLERANCIA_M2_VEREDA, type TipoPreliquidacionAL02, type TipoPreliquidacionAL04, UpdateNodosDocDP, ValidarRelacionMOHijasAL04, ValorizacionHelper, avisoM2Vereda, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularSaldoStockPersonal, calcularTotalMaterialValorizacionPeru9112, cantidadFijaMOAL04, cantidadMaterialAL04, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL02, codBalizaAL04, codBalizaPreliquidarAL04, codBaremoUnicoDPAL04, codClientes, codIssueByPeriodoAL02, codMOAsfaltoHijasAL04, codMOAsfaltoMadreAL04, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOExcluidos, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMONoPreliquidablesAL04, codMOOcultosAL04, codMOPreliquidarTroncalAL02, codMOPreliquidarTroncalAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codMaterialesOcultosAL04, codNoCliente, codSopladoRD, codigoParteDiarioHoyCHILE9512, codigosBaremosSubcontrataAL02, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, codigosSopladoHP, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, documentRequirementAltasNVTMultifamiliar, documentRequirementAltasNVTUnifamiliar, documentRequirementVereda, empresas, esAsignacionPreliquidableAL02, esAsignacionPreliquidableAL04, esCadenaFechaISOValida, esMaterialDuctoAL04, esObjetoFecha, esParteDiarioAprobadoCHILE9512, esParteDiarioEditableCHILE9512, estadoRechazadaPorMetraje, estadoRechazadaPorMetrajeAL04, firmaDespachoCanalRespuesta, firmaDespachoCanalSolicitud, formatCurrencyV1, formatNumberSmart, formatNumberV1, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getCaptureDateSomacyl, getChannelName, getContainerName, getCookieToken, getDBName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getPriceMaterial, getQueueName, getQueueNameSaveOneNotification, getRequestOrigin, hashCode, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, mapeoZonasSimilares, materialesAutomaticosAL04, materialesSeleccionablesAL04, modoMaterialesAL04, motivoConsumoAlmacenAL04, motivoConsumoMaterialAutomaticoDuctos, newCodMOTroncalReglaLiquidacion1, obtenerCodMOHomePass, obtenerCodMOHomePassAL04, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerEspecialidadesCerradas, obtenerEspecialidadesCerradasAL04, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, parseDuplicateKeyError, prorratearMaterialesAL04, requisitosArchivoVereda, roundNumber, searchCurrentContractorSpecialtyPrice, setColModels, setContext, subMaterialesAL04, throwDevolucionTRError, throwSomacylError, timeZoneCHILE9512, tituloFotoParteDiarioCHILE9512, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, uuidRegex, validarAsfaltoAL04, validarFormularioCivil, validarLineasDevolucionTR, validateNoLookup, validateUUIDv4Param, verifyDetailsFinalizeSomacyl, verifyFiles, verifyInventoryFinalize, verifyInventoryFinalizeSomacyl, verifyInventoryLimitsSomacyl, verifyLineasDevolucionTR, verifyPhotosFinalizeSomacyl, verifyPhotosNotFinalizedSomacyl };
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,7 @@ __export(index_exports, {
|
|
|
45
45
|
CurrencyFormat: () => CurrencyFormat,
|
|
46
46
|
DEVOLUCION_TR_ESTADOS: () => DEVOLUCION_TR_ESTADOS,
|
|
47
47
|
DEVOLUCION_TR_MOTIVO_CAMBIO_TURNO: () => DEVOLUCION_TR_MOTIVO_CAMBIO_TURNO,
|
|
48
|
+
DIRECTORIO_DOCUMENTACION_VEREDA: () => DIRECTORIO_DOCUMENTACION_VEREDA,
|
|
48
49
|
DocumentacionReplanteo: () => DocumentacionReplanteo,
|
|
49
50
|
EstadoEspecialidad9612: () => EstadoEspecialidad9612,
|
|
50
51
|
FIRMA_DESPACHO_ACCIONES: () => FIRMA_DESPACHO_ACCIONES,
|
|
@@ -65,9 +66,11 @@ __export(index_exports, {
|
|
|
65
66
|
SEGMENT_TY: () => SEGMENT_TY,
|
|
66
67
|
SOMACYL_CODIGO_CONTADOR_RETIRADO: () => SOMACYL_CODIGO_CONTADOR_RETIRADO,
|
|
67
68
|
SOMACYL_PHOTO_POSITIONS: () => SOMACYL_PHOTO_POSITIONS,
|
|
69
|
+
TOLERANCIA_M2_VEREDA: () => TOLERANCIA_M2_VEREDA,
|
|
68
70
|
UpdateNodosDocDP: () => UpdateNodosDocDP,
|
|
69
71
|
ValidarRelacionMOHijasAL04: () => ValidarRelacionMOHijasAL04,
|
|
70
72
|
ValorizacionHelper: () => ValorizacionHelper,
|
|
73
|
+
avisoM2Vereda: () => avisoM2Vereda,
|
|
71
74
|
builSystemOption: () => builSystemOption,
|
|
72
75
|
buildDataMOFromMaterialRules: () => buildDataMOFromMaterialRules,
|
|
73
76
|
buildDataMaterialsRule: () => buildDataMaterialsRule,
|
|
@@ -138,6 +141,7 @@ __export(index_exports, {
|
|
|
138
141
|
db_root: () => db_root,
|
|
139
142
|
documentRequirementAltasNVTMultifamiliar: () => documentRequirementAltasNVTMultifamiliar,
|
|
140
143
|
documentRequirementAltasNVTUnifamiliar: () => documentRequirementAltasNVTUnifamiliar,
|
|
144
|
+
documentRequirementVereda: () => documentRequirementVereda,
|
|
141
145
|
empresas: () => empresas,
|
|
142
146
|
esAsignacionPreliquidableAL02: () => esAsignacionPreliquidableAL02,
|
|
143
147
|
esAsignacionPreliquidableAL04: () => esAsignacionPreliquidableAL04,
|
|
@@ -202,6 +206,7 @@ __export(index_exports, {
|
|
|
202
206
|
paisMap: () => paisMap,
|
|
203
207
|
parseDuplicateKeyError: () => parseDuplicateKeyError,
|
|
204
208
|
prorratearMaterialesAL04: () => prorratearMaterialesAL04,
|
|
209
|
+
requisitosArchivoVereda: () => requisitosArchivoVereda,
|
|
205
210
|
roundNumber: () => roundNumber,
|
|
206
211
|
searchCurrentContractorSpecialtyPrice: () => searchCurrentContractorSpecialtyPrice,
|
|
207
212
|
setColModels: () => setColModels,
|
|
@@ -219,6 +224,7 @@ __export(index_exports, {
|
|
|
219
224
|
updatePricePBBudgetAlemaniaAL04: () => updatePricePBBudgetAlemaniaAL04,
|
|
220
225
|
uuidRegex: () => uuidRegex,
|
|
221
226
|
validarAsfaltoAL04: () => validarAsfaltoAL04,
|
|
227
|
+
validarFormularioCivil: () => validarFormularioCivil,
|
|
222
228
|
validarLineasDevolucionTR: () => validarLineasDevolucionTR,
|
|
223
229
|
validateNoLookup: () => validateNoLookup,
|
|
224
230
|
validateUUIDv4Param: () => validateUUIDv4Param,
|
|
@@ -17504,6 +17510,111 @@ function getCaptureDateSomacyl(file, BadRequestException) {
|
|
|
17504
17510
|
}
|
|
17505
17511
|
__name(getCaptureDateSomacyl, "getCaptureDateSomacyl");
|
|
17506
17512
|
|
|
17513
|
+
// src/Operativa/BtAlpPluzVereda/constants.ts
|
|
17514
|
+
var TOLERANCIA_M2_VEREDA = 0.1;
|
|
17515
|
+
var DIRECTORIO_DOCUMENTACION_VEREDA = "ORDENES_BT_ALP_PLUZ_VEREDA";
|
|
17516
|
+
|
|
17517
|
+
// src/Operativa/BtAlpPluzVereda/documentRequirement.ts
|
|
17518
|
+
var import_sigo_entities7 = require("sigo-entities");
|
|
17519
|
+
var fotos = [
|
|
17520
|
+
import_sigo_entities7.FileExtension.Jpg,
|
|
17521
|
+
import_sigo_entities7.FileExtension.Jpeg,
|
|
17522
|
+
import_sigo_entities7.FileExtension.Png
|
|
17523
|
+
];
|
|
17524
|
+
var documentos = [
|
|
17525
|
+
...fotos,
|
|
17526
|
+
import_sigo_entities7.FileExtension.Pdf
|
|
17527
|
+
];
|
|
17528
|
+
var carpeta = /* @__PURE__ */ __name((id, label, children) => ({
|
|
17529
|
+
id,
|
|
17530
|
+
label,
|
|
17531
|
+
acceptedFileExtensions: fotos,
|
|
17532
|
+
children,
|
|
17533
|
+
minFiles: 0,
|
|
17534
|
+
maxFiles: 0,
|
|
17535
|
+
requiresMetadata: false,
|
|
17536
|
+
maxFileSize: 0
|
|
17537
|
+
}), "carpeta");
|
|
17538
|
+
var archivo = /* @__PURE__ */ __name((id, label, minFiles, acceptedFileExtensions2, requiresMetadata) => ({
|
|
17539
|
+
id,
|
|
17540
|
+
label,
|
|
17541
|
+
acceptedFileExtensions: acceptedFileExtensions2,
|
|
17542
|
+
children: [],
|
|
17543
|
+
minFiles,
|
|
17544
|
+
maxFiles: 1,
|
|
17545
|
+
requiresMetadata,
|
|
17546
|
+
maxFileSize: 2
|
|
17547
|
+
}), "archivo");
|
|
17548
|
+
var documentRequirementVereda = [
|
|
17549
|
+
carpeta("REPARACION_CIVIL", "Reparaci\xF3n civil", [
|
|
17550
|
+
archivo("REPARACION_CIVIL_1", "Foto 1 reparaci\xF3n civil", 1, fotos, true),
|
|
17551
|
+
archivo("REPARACION_CIVIL_2", "Foto 2 reparaci\xF3n civil", 1, fotos, true)
|
|
17552
|
+
]),
|
|
17553
|
+
carpeta("RECOJO_DESMONTE", "Recojo de desmonte", [
|
|
17554
|
+
archivo("RECOJO_DESMONTE_1", "Foto 1 recojo desmonte", 1, fotos, true),
|
|
17555
|
+
archivo("RECOJO_DESMONTE_2", "Foto 2 recojo desmonte", 0, fotos, true)
|
|
17556
|
+
]),
|
|
17557
|
+
carpeta("DOCUMENTOS", "Documentos", [
|
|
17558
|
+
archivo("CROQUIS", "Croquis", 1, documentos, false),
|
|
17559
|
+
archivo("ACTA_CONFORMIDAD", "Boleta de atenci\xF3n / Acta de conformidad", 1, documentos, false)
|
|
17560
|
+
])
|
|
17561
|
+
];
|
|
17562
|
+
var requisitosArchivoVereda = documentRequirementVereda.flatMap((item) => item.children);
|
|
17563
|
+
|
|
17564
|
+
// src/Operativa/BtAlpPluzVereda/validarFormularioCivil.ts
|
|
17565
|
+
var import_sigo_entities8 = require("sigo-entities");
|
|
17566
|
+
var redondear = /* @__PURE__ */ __name((valor) => Math.round(valor * 100) / 100, "redondear");
|
|
17567
|
+
function avisoM2Vereda(metrados) {
|
|
17568
|
+
const reparados = redondear(metrados.m2_vereda_reparada + metrados.m2_vereda_asfalto + metrados.m2_piso_especial);
|
|
17569
|
+
const calculados = redondear(metrados.pano_ancho_m * metrados.pano_largo_m * metrados.cantidad_panos);
|
|
17570
|
+
if (Math.abs(reparados - calculados) <= TOLERANCIA_M2_VEREDA) return null;
|
|
17571
|
+
return `Los m\xB2 reparados (${reparados}) no coinciden con ancho \xD7 largo \xD7 cantidad de pa\xF1os (${calculados})`;
|
|
17572
|
+
}
|
|
17573
|
+
__name(avisoM2Vereda, "avisoM2Vereda");
|
|
17574
|
+
function validarFormularioCivil(asignacion) {
|
|
17575
|
+
const errores = [];
|
|
17576
|
+
const avisos = [];
|
|
17577
|
+
const { workflow, metrados } = asignacion.formulario_civil;
|
|
17578
|
+
for (const { paso, orden } of Object.values(import_sigo_entities8.PASOS_WORKFLOW_VEREDA)) {
|
|
17579
|
+
if (paso === import_sigo_entities8.PASOS_WORKFLOW_VEREDA.CERRADO.paso) continue;
|
|
17580
|
+
if (!workflow.some((item) => item.paso === paso)) {
|
|
17581
|
+
errores.push({
|
|
17582
|
+
seccion: "workflow",
|
|
17583
|
+
mensaje: `Falta el paso ${orden}: ${paso.replace(/_/g, " ").toLowerCase()}`
|
|
17584
|
+
});
|
|
17585
|
+
}
|
|
17586
|
+
}
|
|
17587
|
+
if (!metrados) {
|
|
17588
|
+
errores.push({
|
|
17589
|
+
seccion: "formulario",
|
|
17590
|
+
mensaje: "Faltan los metrados del formulario civil"
|
|
17591
|
+
});
|
|
17592
|
+
} else {
|
|
17593
|
+
const aviso = avisoM2Vereda(metrados);
|
|
17594
|
+
if (aviso) avisos.push(aviso);
|
|
17595
|
+
}
|
|
17596
|
+
for (const requisito of requisitosArchivoVereda) {
|
|
17597
|
+
const archivos = asignacion.documentacion.filter((file) => file.CodigoNodo === requisito.id);
|
|
17598
|
+
if (archivos.length < requisito.minFiles) {
|
|
17599
|
+
errores.push({
|
|
17600
|
+
seccion: "evidencias",
|
|
17601
|
+
mensaje: `Falta ${requisito.label}`
|
|
17602
|
+
});
|
|
17603
|
+
}
|
|
17604
|
+
if (archivos.length > requisito.maxFiles) {
|
|
17605
|
+
errores.push({
|
|
17606
|
+
seccion: "evidencias",
|
|
17607
|
+
mensaje: `${requisito.label}: m\xE1ximo ${requisito.maxFiles} archivo(s)`
|
|
17608
|
+
});
|
|
17609
|
+
}
|
|
17610
|
+
}
|
|
17611
|
+
return {
|
|
17612
|
+
errores,
|
|
17613
|
+
avisos
|
|
17614
|
+
};
|
|
17615
|
+
}
|
|
17616
|
+
__name(validarFormularioCivil, "validarFormularioCivil");
|
|
17617
|
+
|
|
17507
17618
|
// src/Logistica/StockPersonal/calcularSaldoStockPersonal.ts
|
|
17508
17619
|
function calcularSaldoStockPersonal(stock) {
|
|
17509
17620
|
const saldo = (stock.Despacho || 0) - (stock.Devolucion || 0) - (stock.Liquidacion || 0) + (stock.DespachoTR || 0) - (stock.DevolucionTR || 0);
|
|
@@ -17697,7 +17808,7 @@ var parseDuplicateKeyError = /* @__PURE__ */ __name((message) => {
|
|
|
17697
17808
|
}, "parseDuplicateKeyError");
|
|
17698
17809
|
|
|
17699
17810
|
// src/v2/utils/buildSystemOption.ts
|
|
17700
|
-
var
|
|
17811
|
+
var import_sigo_entities9 = require("sigo-entities");
|
|
17701
17812
|
function separarPalabras(texto) {
|
|
17702
17813
|
return texto.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z])([A-Z][a-z])/g, "$1 $2");
|
|
17703
17814
|
}
|
|
@@ -17728,7 +17839,7 @@ async function builSystemOption(params) {
|
|
|
17728
17839
|
route: isLast ? `${method} ${rootPath}${pathParts}` : "",
|
|
17729
17840
|
_id: crypto.randomUUID()
|
|
17730
17841
|
};
|
|
17731
|
-
const newItem = await (0,
|
|
17842
|
+
const newItem = await (0, import_sigo_entities9.validateCustom)(_newEntity, import_sigo_entities9.SystemOptionEntity, UnprocessableEntityException);
|
|
17732
17843
|
newData.push(newItem);
|
|
17733
17844
|
}
|
|
17734
17845
|
}
|
|
@@ -17894,6 +18005,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
17894
18005
|
CurrencyFormat,
|
|
17895
18006
|
DEVOLUCION_TR_ESTADOS,
|
|
17896
18007
|
DEVOLUCION_TR_MOTIVO_CAMBIO_TURNO,
|
|
18008
|
+
DIRECTORIO_DOCUMENTACION_VEREDA,
|
|
17897
18009
|
DocumentacionReplanteo,
|
|
17898
18010
|
EstadoEspecialidad9612,
|
|
17899
18011
|
FIRMA_DESPACHO_ACCIONES,
|
|
@@ -17914,9 +18026,11 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
17914
18026
|
SEGMENT_TY,
|
|
17915
18027
|
SOMACYL_CODIGO_CONTADOR_RETIRADO,
|
|
17916
18028
|
SOMACYL_PHOTO_POSITIONS,
|
|
18029
|
+
TOLERANCIA_M2_VEREDA,
|
|
17917
18030
|
UpdateNodosDocDP,
|
|
17918
18031
|
ValidarRelacionMOHijasAL04,
|
|
17919
18032
|
ValorizacionHelper,
|
|
18033
|
+
avisoM2Vereda,
|
|
17920
18034
|
builSystemOption,
|
|
17921
18035
|
buildDataMOFromMaterialRules,
|
|
17922
18036
|
buildDataMaterialsRule,
|
|
@@ -17987,6 +18101,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
17987
18101
|
db_root,
|
|
17988
18102
|
documentRequirementAltasNVTMultifamiliar,
|
|
17989
18103
|
documentRequirementAltasNVTUnifamiliar,
|
|
18104
|
+
documentRequirementVereda,
|
|
17990
18105
|
empresas,
|
|
17991
18106
|
esAsignacionPreliquidableAL02,
|
|
17992
18107
|
esAsignacionPreliquidableAL04,
|
|
@@ -18051,6 +18166,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
18051
18166
|
paisMap,
|
|
18052
18167
|
parseDuplicateKeyError,
|
|
18053
18168
|
prorratearMaterialesAL04,
|
|
18169
|
+
requisitosArchivoVereda,
|
|
18054
18170
|
roundNumber,
|
|
18055
18171
|
searchCurrentContractorSpecialtyPrice,
|
|
18056
18172
|
setColModels,
|
|
@@ -18068,6 +18184,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
18068
18184
|
updatePricePBBudgetAlemaniaAL04,
|
|
18069
18185
|
uuidRegex,
|
|
18070
18186
|
validarAsfaltoAL04,
|
|
18187
|
+
validarFormularioCivil,
|
|
18071
18188
|
validarLineasDevolucionTR,
|
|
18072
18189
|
validateNoLookup,
|
|
18073
18190
|
validateUUIDv4Param,
|
package/dist/index.mjs
CHANGED
|
@@ -17272,6 +17272,111 @@ function getCaptureDateSomacyl(file, BadRequestException) {
|
|
|
17272
17272
|
}
|
|
17273
17273
|
__name(getCaptureDateSomacyl, "getCaptureDateSomacyl");
|
|
17274
17274
|
|
|
17275
|
+
// src/Operativa/BtAlpPluzVereda/constants.ts
|
|
17276
|
+
var TOLERANCIA_M2_VEREDA = 0.1;
|
|
17277
|
+
var DIRECTORIO_DOCUMENTACION_VEREDA = "ORDENES_BT_ALP_PLUZ_VEREDA";
|
|
17278
|
+
|
|
17279
|
+
// src/Operativa/BtAlpPluzVereda/documentRequirement.ts
|
|
17280
|
+
import { FileExtension as FileExtension2 } from "sigo-entities";
|
|
17281
|
+
var fotos = [
|
|
17282
|
+
FileExtension2.Jpg,
|
|
17283
|
+
FileExtension2.Jpeg,
|
|
17284
|
+
FileExtension2.Png
|
|
17285
|
+
];
|
|
17286
|
+
var documentos = [
|
|
17287
|
+
...fotos,
|
|
17288
|
+
FileExtension2.Pdf
|
|
17289
|
+
];
|
|
17290
|
+
var carpeta = /* @__PURE__ */ __name((id, label, children) => ({
|
|
17291
|
+
id,
|
|
17292
|
+
label,
|
|
17293
|
+
acceptedFileExtensions: fotos,
|
|
17294
|
+
children,
|
|
17295
|
+
minFiles: 0,
|
|
17296
|
+
maxFiles: 0,
|
|
17297
|
+
requiresMetadata: false,
|
|
17298
|
+
maxFileSize: 0
|
|
17299
|
+
}), "carpeta");
|
|
17300
|
+
var archivo = /* @__PURE__ */ __name((id, label, minFiles, acceptedFileExtensions2, requiresMetadata) => ({
|
|
17301
|
+
id,
|
|
17302
|
+
label,
|
|
17303
|
+
acceptedFileExtensions: acceptedFileExtensions2,
|
|
17304
|
+
children: [],
|
|
17305
|
+
minFiles,
|
|
17306
|
+
maxFiles: 1,
|
|
17307
|
+
requiresMetadata,
|
|
17308
|
+
maxFileSize: 2
|
|
17309
|
+
}), "archivo");
|
|
17310
|
+
var documentRequirementVereda = [
|
|
17311
|
+
carpeta("REPARACION_CIVIL", "Reparaci\xF3n civil", [
|
|
17312
|
+
archivo("REPARACION_CIVIL_1", "Foto 1 reparaci\xF3n civil", 1, fotos, true),
|
|
17313
|
+
archivo("REPARACION_CIVIL_2", "Foto 2 reparaci\xF3n civil", 1, fotos, true)
|
|
17314
|
+
]),
|
|
17315
|
+
carpeta("RECOJO_DESMONTE", "Recojo de desmonte", [
|
|
17316
|
+
archivo("RECOJO_DESMONTE_1", "Foto 1 recojo desmonte", 1, fotos, true),
|
|
17317
|
+
archivo("RECOJO_DESMONTE_2", "Foto 2 recojo desmonte", 0, fotos, true)
|
|
17318
|
+
]),
|
|
17319
|
+
carpeta("DOCUMENTOS", "Documentos", [
|
|
17320
|
+
archivo("CROQUIS", "Croquis", 1, documentos, false),
|
|
17321
|
+
archivo("ACTA_CONFORMIDAD", "Boleta de atenci\xF3n / Acta de conformidad", 1, documentos, false)
|
|
17322
|
+
])
|
|
17323
|
+
];
|
|
17324
|
+
var requisitosArchivoVereda = documentRequirementVereda.flatMap((item) => item.children);
|
|
17325
|
+
|
|
17326
|
+
// src/Operativa/BtAlpPluzVereda/validarFormularioCivil.ts
|
|
17327
|
+
import { PASOS_WORKFLOW_VEREDA } from "sigo-entities";
|
|
17328
|
+
var redondear = /* @__PURE__ */ __name((valor) => Math.round(valor * 100) / 100, "redondear");
|
|
17329
|
+
function avisoM2Vereda(metrados) {
|
|
17330
|
+
const reparados = redondear(metrados.m2_vereda_reparada + metrados.m2_vereda_asfalto + metrados.m2_piso_especial);
|
|
17331
|
+
const calculados = redondear(metrados.pano_ancho_m * metrados.pano_largo_m * metrados.cantidad_panos);
|
|
17332
|
+
if (Math.abs(reparados - calculados) <= TOLERANCIA_M2_VEREDA) return null;
|
|
17333
|
+
return `Los m\xB2 reparados (${reparados}) no coinciden con ancho \xD7 largo \xD7 cantidad de pa\xF1os (${calculados})`;
|
|
17334
|
+
}
|
|
17335
|
+
__name(avisoM2Vereda, "avisoM2Vereda");
|
|
17336
|
+
function validarFormularioCivil(asignacion) {
|
|
17337
|
+
const errores = [];
|
|
17338
|
+
const avisos = [];
|
|
17339
|
+
const { workflow, metrados } = asignacion.formulario_civil;
|
|
17340
|
+
for (const { paso, orden } of Object.values(PASOS_WORKFLOW_VEREDA)) {
|
|
17341
|
+
if (paso === PASOS_WORKFLOW_VEREDA.CERRADO.paso) continue;
|
|
17342
|
+
if (!workflow.some((item) => item.paso === paso)) {
|
|
17343
|
+
errores.push({
|
|
17344
|
+
seccion: "workflow",
|
|
17345
|
+
mensaje: `Falta el paso ${orden}: ${paso.replace(/_/g, " ").toLowerCase()}`
|
|
17346
|
+
});
|
|
17347
|
+
}
|
|
17348
|
+
}
|
|
17349
|
+
if (!metrados) {
|
|
17350
|
+
errores.push({
|
|
17351
|
+
seccion: "formulario",
|
|
17352
|
+
mensaje: "Faltan los metrados del formulario civil"
|
|
17353
|
+
});
|
|
17354
|
+
} else {
|
|
17355
|
+
const aviso = avisoM2Vereda(metrados);
|
|
17356
|
+
if (aviso) avisos.push(aviso);
|
|
17357
|
+
}
|
|
17358
|
+
for (const requisito of requisitosArchivoVereda) {
|
|
17359
|
+
const archivos = asignacion.documentacion.filter((file) => file.CodigoNodo === requisito.id);
|
|
17360
|
+
if (archivos.length < requisito.minFiles) {
|
|
17361
|
+
errores.push({
|
|
17362
|
+
seccion: "evidencias",
|
|
17363
|
+
mensaje: `Falta ${requisito.label}`
|
|
17364
|
+
});
|
|
17365
|
+
}
|
|
17366
|
+
if (archivos.length > requisito.maxFiles) {
|
|
17367
|
+
errores.push({
|
|
17368
|
+
seccion: "evidencias",
|
|
17369
|
+
mensaje: `${requisito.label}: m\xE1ximo ${requisito.maxFiles} archivo(s)`
|
|
17370
|
+
});
|
|
17371
|
+
}
|
|
17372
|
+
}
|
|
17373
|
+
return {
|
|
17374
|
+
errores,
|
|
17375
|
+
avisos
|
|
17376
|
+
};
|
|
17377
|
+
}
|
|
17378
|
+
__name(validarFormularioCivil, "validarFormularioCivil");
|
|
17379
|
+
|
|
17275
17380
|
// src/Logistica/StockPersonal/calcularSaldoStockPersonal.ts
|
|
17276
17381
|
function calcularSaldoStockPersonal(stock) {
|
|
17277
17382
|
const saldo = (stock.Despacho || 0) - (stock.Devolucion || 0) - (stock.Liquidacion || 0) + (stock.DespachoTR || 0) - (stock.DevolucionTR || 0);
|
|
@@ -17661,6 +17766,7 @@ export {
|
|
|
17661
17766
|
CurrencyFormat,
|
|
17662
17767
|
DEVOLUCION_TR_ESTADOS,
|
|
17663
17768
|
DEVOLUCION_TR_MOTIVO_CAMBIO_TURNO,
|
|
17769
|
+
DIRECTORIO_DOCUMENTACION_VEREDA,
|
|
17664
17770
|
DocumentacionReplanteo,
|
|
17665
17771
|
EstadoEspecialidad9612,
|
|
17666
17772
|
FIRMA_DESPACHO_ACCIONES,
|
|
@@ -17681,9 +17787,11 @@ export {
|
|
|
17681
17787
|
SEGMENT_TY,
|
|
17682
17788
|
SOMACYL_CODIGO_CONTADOR_RETIRADO,
|
|
17683
17789
|
SOMACYL_PHOTO_POSITIONS,
|
|
17790
|
+
TOLERANCIA_M2_VEREDA,
|
|
17684
17791
|
UpdateNodosDocDP,
|
|
17685
17792
|
ValidarRelacionMOHijasAL04,
|
|
17686
17793
|
ValorizacionHelper,
|
|
17794
|
+
avisoM2Vereda,
|
|
17687
17795
|
builSystemOption,
|
|
17688
17796
|
buildDataMOFromMaterialRules,
|
|
17689
17797
|
buildDataMaterialsRule,
|
|
@@ -17754,6 +17862,7 @@ export {
|
|
|
17754
17862
|
db_root,
|
|
17755
17863
|
documentRequirementAltasNVTMultifamiliar,
|
|
17756
17864
|
documentRequirementAltasNVTUnifamiliar,
|
|
17865
|
+
documentRequirementVereda,
|
|
17757
17866
|
empresas,
|
|
17758
17867
|
esAsignacionPreliquidableAL02,
|
|
17759
17868
|
esAsignacionPreliquidableAL04,
|
|
@@ -17818,6 +17927,7 @@ export {
|
|
|
17818
17927
|
paisMap,
|
|
17819
17928
|
parseDuplicateKeyError,
|
|
17820
17929
|
prorratearMaterialesAL04,
|
|
17930
|
+
requisitosArchivoVereda,
|
|
17821
17931
|
roundNumber,
|
|
17822
17932
|
searchCurrentContractorSpecialtyPrice,
|
|
17823
17933
|
setColModels,
|
|
@@ -17835,6 +17945,7 @@ export {
|
|
|
17835
17945
|
updatePricePBBudgetAlemaniaAL04,
|
|
17836
17946
|
uuidRegex,
|
|
17837
17947
|
validarAsfaltoAL04,
|
|
17948
|
+
validarFormularioCivil,
|
|
17838
17949
|
validarLineasDevolucionTR,
|
|
17839
17950
|
validateNoLookup,
|
|
17840
17951
|
validateUUIDv4Param,
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sigo-package",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "Funciones compartidas sigo",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "tsup && tsc-alias",
|
|
10
|
-
"prepare": "node --run build"
|
|
11
|
-
},
|
|
12
|
-
"keywords": [],
|
|
13
|
-
"author": "Antonio Mejia",
|
|
14
|
-
"license": "ISC",
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"@swc/core": "^1.11.22",
|
|
17
|
-
"@types/express": "^5.0.1",
|
|
18
|
-
"@types/webpack-env": "^1.18.8",
|
|
19
|
-
"tsc-alias": "^1.8.15",
|
|
20
|
-
"tsup": "^8.5.1",
|
|
21
|
-
"typescript": "^5.7.3"
|
|
22
|
-
},
|
|
23
|
-
"peerDependencies": {
|
|
24
|
-
"class-validator": "^0.15.1",
|
|
25
|
-
"sigo-entities": "^1.2.514"
|
|
26
|
-
},
|
|
27
|
-
"overrides": {
|
|
28
|
-
"esbuild": "^0.28.0"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "sigo-package",
|
|
3
|
+
"version": "1.2.185",
|
|
4
|
+
"description": "Funciones compartidas sigo",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsup && tsc-alias",
|
|
10
|
+
"prepare": "node --run build"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [],
|
|
13
|
+
"author": "Antonio Mejia",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@swc/core": "^1.11.22",
|
|
17
|
+
"@types/express": "^5.0.1",
|
|
18
|
+
"@types/webpack-env": "^1.18.8",
|
|
19
|
+
"tsc-alias": "^1.8.15",
|
|
20
|
+
"tsup": "^8.5.1",
|
|
21
|
+
"typescript": "^5.7.3"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"class-validator": "^0.15.1",
|
|
25
|
+
"sigo-entities": "^1.2.514"
|
|
26
|
+
},
|
|
27
|
+
"overrides": {
|
|
28
|
+
"esbuild": "^0.28.0"
|
|
29
|
+
}
|
|
30
|
+
}
|