sigo-package 1.2.167 → 1.2.169
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 +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +107 -40
- package/dist/index.mjs +104 -38
- package/package.json +1 -1
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, 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, CodigoNombreDTO, SystemOptionEntity, MenuDto, FilesDocDTO } from 'sigo-entities';
|
|
3
3
|
import { ClassConstructor } from 'class-transformer';
|
|
4
4
|
import { Request, Response, NextFunction } from 'express';
|
|
5
5
|
|
|
@@ -688,6 +688,8 @@ declare const mapeoZonasSimilares: Record<string, string[]>;
|
|
|
688
688
|
|
|
689
689
|
declare const documentRequirement: DocumentRequirementDto[];
|
|
690
690
|
|
|
691
|
+
declare function verifyInventoryFinalize(docs: AltasNVTOrderENTITY[], UnprocessableEntityException?: ClassConstructor<Error>): void;
|
|
692
|
+
|
|
691
693
|
declare enum Position {
|
|
692
694
|
left = "left",
|
|
693
695
|
right = "right"
|
|
@@ -823,8 +825,6 @@ declare const db_default = "default_db";
|
|
|
823
825
|
|
|
824
826
|
declare const uuidRegex: RegExp;
|
|
825
827
|
|
|
826
|
-
declare const itemsCanalizacion: string[];
|
|
827
|
-
|
|
828
828
|
declare function getDBName({ pais, delegacion }: {
|
|
829
829
|
pais: CodigoNombreDTO;
|
|
830
830
|
delegacion: CodigoNombreDTO;
|
|
@@ -856,6 +856,8 @@ declare function builSystemOption(params: IParams): Promise<{
|
|
|
856
856
|
type TranslateFn = (key: string) => string;
|
|
857
857
|
declare const buildMenu: (data: SystemOptionEntity[], t: TranslateFn) => MenuDto[];
|
|
858
858
|
|
|
859
|
+
declare function verifyFiles(documentation: FilesDocDTO[], documentRequirement: DocumentRequirementDto[], BadRequestException?: ClassConstructor<Error>): void;
|
|
860
|
+
|
|
859
861
|
declare function validateUUIDv4Param(BadRequestException: ClassConstructor<Error>, req: Request<any>, _res: Response, next: NextFunction): Promise<void>;
|
|
860
862
|
|
|
861
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, type TARGET, UpdateNodosDocDP, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, codIssueByPeriodoAL02, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, documentRequirement, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatNumberV1, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDBName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getPriceMaterial, getQueueName, getQueueNameSaveOneNotification, hashCode, isValidDate, isValidPartialEntity,
|
|
863
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, type TARGET, UpdateNodosDocDP, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, codIssueByPeriodoAL02, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, documentRequirement, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatNumberV1, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDBName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getPriceMaterial, getQueueName, getQueueNameSaveOneNotification, hashCode, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, mapeoZonasSimilares, newCodMOTroncalReglaLiquidacion1, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, parseDuplicateKeyError, roundNumber, searchCurrentContractorSpecialtyPrice, setColModels, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, uuidRegex, validateNoLookup, validateUUIDv4Param, verifyFiles, verifyInventoryFinalize };
|
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, 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, CodigoNombreDTO, SystemOptionEntity, MenuDto, FilesDocDTO } from 'sigo-entities';
|
|
3
3
|
import { ClassConstructor } from 'class-transformer';
|
|
4
4
|
import { Request, Response, NextFunction } from 'express';
|
|
5
5
|
|
|
@@ -688,6 +688,8 @@ declare const mapeoZonasSimilares: Record<string, string[]>;
|
|
|
688
688
|
|
|
689
689
|
declare const documentRequirement: DocumentRequirementDto[];
|
|
690
690
|
|
|
691
|
+
declare function verifyInventoryFinalize(docs: AltasNVTOrderENTITY[], UnprocessableEntityException?: ClassConstructor<Error>): void;
|
|
692
|
+
|
|
691
693
|
declare enum Position {
|
|
692
694
|
left = "left",
|
|
693
695
|
right = "right"
|
|
@@ -823,8 +825,6 @@ declare const db_default = "default_db";
|
|
|
823
825
|
|
|
824
826
|
declare const uuidRegex: RegExp;
|
|
825
827
|
|
|
826
|
-
declare const itemsCanalizacion: string[];
|
|
827
|
-
|
|
828
828
|
declare function getDBName({ pais, delegacion }: {
|
|
829
829
|
pais: CodigoNombreDTO;
|
|
830
830
|
delegacion: CodigoNombreDTO;
|
|
@@ -856,6 +856,8 @@ declare function builSystemOption(params: IParams): Promise<{
|
|
|
856
856
|
type TranslateFn = (key: string) => string;
|
|
857
857
|
declare const buildMenu: (data: SystemOptionEntity[], t: TranslateFn) => MenuDto[];
|
|
858
858
|
|
|
859
|
+
declare function verifyFiles(documentation: FilesDocDTO[], documentRequirement: DocumentRequirementDto[], BadRequestException?: ClassConstructor<Error>): void;
|
|
860
|
+
|
|
859
861
|
declare function validateUUIDv4Param(BadRequestException: ClassConstructor<Error>, req: Request<any>, _res: Response, next: NextFunction): Promise<void>;
|
|
860
862
|
|
|
861
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, type TARGET, UpdateNodosDocDP, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, codIssueByPeriodoAL02, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, documentRequirement, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatNumberV1, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDBName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getPriceMaterial, getQueueName, getQueueNameSaveOneNotification, hashCode, isValidDate, isValidPartialEntity,
|
|
863
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, type TARGET, UpdateNodosDocDP, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, codIssueByPeriodoAL02, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, documentRequirement, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatNumberV1, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDBName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getPriceMaterial, getQueueName, getQueueNameSaveOneNotification, hashCode, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, mapeoZonasSimilares, newCodMOTroncalReglaLiquidacion1, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, parseDuplicateKeyError, roundNumber, searchCurrentContractorSpecialtyPrice, setColModels, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, uuidRegex, validateNoLookup, validateUUIDv4Param, verifyFiles, verifyInventoryFinalize };
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
6
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
@@ -18,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
17
|
return to;
|
|
19
18
|
};
|
|
20
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
20
|
|
|
23
21
|
// src/index.ts
|
|
24
22
|
var index_exports = {};
|
|
@@ -142,7 +140,6 @@ __export(index_exports, {
|
|
|
142
140
|
hashCode: () => hashCode,
|
|
143
141
|
isValidDate: () => isValidDate,
|
|
144
142
|
isValidPartialEntity: () => isValidPartialEntity,
|
|
145
|
-
itemsCanalizacion: () => itemsCanalizacion,
|
|
146
143
|
logTiempoProceso: () => logTiempoProceso,
|
|
147
144
|
mapaDPContratoPrecioFullAL02: () => mapaDPContratoPrecioFullAL02,
|
|
148
145
|
mapaEstadoObraFaseAL02: () => mapaEstadoObraFaseAL02,
|
|
@@ -172,7 +169,9 @@ __export(index_exports, {
|
|
|
172
169
|
updatePricePBBudgetAlemaniaAL04: () => updatePricePBBudgetAlemaniaAL04,
|
|
173
170
|
uuidRegex: () => uuidRegex,
|
|
174
171
|
validateNoLookup: () => validateNoLookup,
|
|
175
|
-
validateUUIDv4Param: () => validateUUIDv4Param
|
|
172
|
+
validateUUIDv4Param: () => validateUUIDv4Param,
|
|
173
|
+
verifyFiles: () => verifyFiles,
|
|
174
|
+
verifyInventoryFinalize: () => verifyInventoryFinalize
|
|
176
175
|
});
|
|
177
176
|
module.exports = __toCommonJS(index_exports);
|
|
178
177
|
|
|
@@ -14448,9 +14447,6 @@ var CalcularResumenHPMOLiquidado = /* @__PURE__ */ __name((trabajo) => {
|
|
|
14448
14447
|
|
|
14449
14448
|
// src/Programados/Alemania/Models/DataFlujosHomePass.ts
|
|
14450
14449
|
var import_sigo_entities4 = require("sigo-entities");
|
|
14451
|
-
console.log("UsuarioDTO =>", import_sigo_entities4.UsuarioDTO);
|
|
14452
|
-
console.log("typeof UsuarioDTO =>", typeof import_sigo_entities4.UsuarioDTO);
|
|
14453
|
-
console.log("prototype =>", import_sigo_entities4.UsuarioDTO?.prototype);
|
|
14454
14450
|
var dataFlujosHomePass = [
|
|
14455
14451
|
{
|
|
14456
14452
|
Action: "Registrar",
|
|
@@ -16299,17 +16295,17 @@ var GetCodigoFechaActual = /* @__PURE__ */ __name((fecha) => {
|
|
|
16299
16295
|
}, "GetCodigoFechaActual");
|
|
16300
16296
|
|
|
16301
16297
|
// src/shared/Utils/CurrencyFormat.ts
|
|
16302
|
-
var
|
|
16303
|
-
|
|
16304
|
-
|
|
16305
|
-
__publicField(this, "symbolCoin", "");
|
|
16306
|
-
__publicField(this, "symbolCoinPosition", "left");
|
|
16307
|
-
__publicField(this, "isPorcent", false);
|
|
16308
|
-
__publicField(this, "decimal", 2);
|
|
16309
|
-
__publicField(this, "codeCountry", "");
|
|
16310
|
-
__publicField(this, "currency", "");
|
|
16298
|
+
var Params = class Params2 {
|
|
16299
|
+
static {
|
|
16300
|
+
__name(this, "Params");
|
|
16311
16301
|
}
|
|
16312
|
-
|
|
16302
|
+
symbolCoin = "";
|
|
16303
|
+
symbolCoinPosition = "left";
|
|
16304
|
+
isPorcent = false;
|
|
16305
|
+
decimal = 2;
|
|
16306
|
+
codeCountry = "";
|
|
16307
|
+
currency = "";
|
|
16308
|
+
};
|
|
16313
16309
|
function CurrencyFormat(value = 0, options = new Params()) {
|
|
16314
16310
|
try {
|
|
16315
16311
|
let _value = structuredClone(value);
|
|
@@ -16701,13 +16697,16 @@ function buildKeyMO(mo) {
|
|
|
16701
16697
|
__name(buildKeyMO, "buildKeyMO");
|
|
16702
16698
|
|
|
16703
16699
|
// src/Programados/calcularMOAsignada.ts
|
|
16704
|
-
var
|
|
16700
|
+
var AsignacionHelper = class {
|
|
16701
|
+
static {
|
|
16702
|
+
__name(this, "AsignacionHelper");
|
|
16703
|
+
}
|
|
16704
|
+
valorizacionMap;
|
|
16705
16705
|
/**
|
|
16706
16706
|
* Inicializa el helper y construye el índice de asignaciones.
|
|
16707
16707
|
* @param trabajos Lista de trabajos con asignaciones
|
|
16708
16708
|
*/
|
|
16709
16709
|
constructor(trabajos) {
|
|
16710
|
-
__publicField(this, "valorizacionMap");
|
|
16711
16710
|
this.valorizacionMap = this.buildValorizacionMap(trabajos);
|
|
16712
16711
|
}
|
|
16713
16712
|
/**
|
|
@@ -16742,23 +16741,24 @@ var _AsignacionHelper = class _AsignacionHelper {
|
|
|
16742
16741
|
};
|
|
16743
16742
|
}
|
|
16744
16743
|
};
|
|
16745
|
-
__name(_AsignacionHelper, "AsignacionHelper");
|
|
16746
|
-
var AsignacionHelper = _AsignacionHelper;
|
|
16747
16744
|
|
|
16748
16745
|
// src/Programados/calcularMOValorizada.ts
|
|
16749
|
-
var
|
|
16746
|
+
var ValorizacionHelper = class {
|
|
16747
|
+
static {
|
|
16748
|
+
__name(this, "ValorizacionHelper");
|
|
16749
|
+
}
|
|
16750
|
+
valorizacionMap;
|
|
16751
|
+
estadosPermitidos = /* @__PURE__ */ new Set([
|
|
16752
|
+
"PRODUCCION",
|
|
16753
|
+
"CERTIFICADA",
|
|
16754
|
+
"PRELIQUIDADA",
|
|
16755
|
+
"LIQUIDADA"
|
|
16756
|
+
]);
|
|
16750
16757
|
/**
|
|
16751
16758
|
* Inicializa el helper y construye el índice de valorizaciones.
|
|
16752
16759
|
* @param trabajos Lista de trabajos con valorizaciones
|
|
16753
16760
|
*/
|
|
16754
16761
|
constructor(trabajos) {
|
|
16755
|
-
__publicField(this, "valorizacionMap");
|
|
16756
|
-
__publicField(this, "estadosPermitidos", /* @__PURE__ */ new Set([
|
|
16757
|
-
"PRODUCCION",
|
|
16758
|
-
"CERTIFICADA",
|
|
16759
|
-
"PRELIQUIDADA",
|
|
16760
|
-
"LIQUIDADA"
|
|
16761
|
-
]));
|
|
16762
16762
|
this.valorizacionMap = this.buildValorizacionMap(trabajos);
|
|
16763
16763
|
}
|
|
16764
16764
|
/**
|
|
@@ -16795,8 +16795,6 @@ var _ValorizacionHelper = class _ValorizacionHelper {
|
|
|
16795
16795
|
};
|
|
16796
16796
|
}
|
|
16797
16797
|
};
|
|
16798
|
-
__name(_ValorizacionHelper, "ValorizacionHelper");
|
|
16799
|
-
var ValorizacionHelper = _ValorizacionHelper;
|
|
16800
16798
|
|
|
16801
16799
|
// src/Programados/getPriceMaterial.ts
|
|
16802
16800
|
function getPriceMaterial(CodigoItem, dataPriceMaterial) {
|
|
@@ -16979,6 +16977,33 @@ var documentRequirement = [
|
|
|
16979
16977
|
}
|
|
16980
16978
|
];
|
|
16981
16979
|
|
|
16980
|
+
// src/Operativa/AltasNVT/verifyInventoryFinalize.ts
|
|
16981
|
+
function verifyInventoryFinalize(docs, UnprocessableEntityException) {
|
|
16982
|
+
const codigo = "40928145";
|
|
16983
|
+
const orders = docs.filter((e) => e.inventory.some((inv) => inv.codigo === codigo));
|
|
16984
|
+
if (orders.length === 0) {
|
|
16985
|
+
const msg = `No se puede finalizar la orden, la orden no tiene el material ${codigo}`;
|
|
16986
|
+
if (UnprocessableEntityException) {
|
|
16987
|
+
throw new UnprocessableEntityException(msg, true);
|
|
16988
|
+
} else {
|
|
16989
|
+
throw new Error(msg, {
|
|
16990
|
+
cause: "USER_MESSAGE"
|
|
16991
|
+
});
|
|
16992
|
+
}
|
|
16993
|
+
}
|
|
16994
|
+
if (orders.length > 1) {
|
|
16995
|
+
const msg = `No se puede finalizar la orden, existen ordenes con el material ${codigo}`;
|
|
16996
|
+
if (UnprocessableEntityException) {
|
|
16997
|
+
throw new UnprocessableEntityException(msg, true);
|
|
16998
|
+
} else {
|
|
16999
|
+
throw new Error(msg, {
|
|
17000
|
+
cause: "USER_MESSAGE"
|
|
17001
|
+
});
|
|
17002
|
+
}
|
|
17003
|
+
}
|
|
17004
|
+
}
|
|
17005
|
+
__name(verifyInventoryFinalize, "verifyInventoryFinalize");
|
|
17006
|
+
|
|
16982
17007
|
// src/constants/collections.ts
|
|
16983
17008
|
var collections = Object.freeze({
|
|
16984
17009
|
PERU_9112_ToaOrder: "PERU_9112_ToaOrder",
|
|
@@ -17027,13 +17052,6 @@ var db_default = "default_db";
|
|
|
17027
17052
|
// src/v2/constants/regex.ts
|
|
17028
17053
|
var uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
|
|
17029
17054
|
|
|
17030
|
-
// src/v2/constants/itemsCanalizacion.ts
|
|
17031
|
-
var itemsCanalizacion = [
|
|
17032
|
-
"40261082",
|
|
17033
|
-
"47112939",
|
|
17034
|
-
"40266013"
|
|
17035
|
-
];
|
|
17036
|
-
|
|
17037
17055
|
// src/v2/utils/getDBName.ts
|
|
17038
17056
|
function getDBName({ pais, delegacion }) {
|
|
17039
17057
|
return `${process.env.NODE_ENV}.${pais.Codigo}_${delegacion.Codigo}_db`.toLowerCase();
|
|
@@ -17152,6 +17170,54 @@ var buildMenu = /* @__PURE__ */ __name((data, t) => {
|
|
|
17152
17170
|
return rootItems;
|
|
17153
17171
|
}, "buildMenu");
|
|
17154
17172
|
|
|
17173
|
+
// src/v2/utils/verifyFiles.ts
|
|
17174
|
+
function verifyFiles(documentation, documentRequirement2, BadRequestException) {
|
|
17175
|
+
const verifyRequirements = /* @__PURE__ */ __name((requirements) => {
|
|
17176
|
+
requirements.forEach((requirement) => {
|
|
17177
|
+
if (requirement.children.length > 0) {
|
|
17178
|
+
verifyRequirements(requirement.children);
|
|
17179
|
+
return;
|
|
17180
|
+
}
|
|
17181
|
+
const files = documentation.filter((file) => file.CodigoNodo === requirement.id);
|
|
17182
|
+
if (files.length < requirement.minFiles) {
|
|
17183
|
+
const msg = `El requisito "${requirement.label}" requiere al menos ${requirement.minFiles} archivo(s)`;
|
|
17184
|
+
if (BadRequestException) {
|
|
17185
|
+
throw new BadRequestException(msg, true);
|
|
17186
|
+
} else {
|
|
17187
|
+
throw new Error(msg, {
|
|
17188
|
+
cause: "USER_MESSAGE"
|
|
17189
|
+
});
|
|
17190
|
+
}
|
|
17191
|
+
}
|
|
17192
|
+
if (files.length > requirement.maxFiles) {
|
|
17193
|
+
const msg = `El requisito "${requirement.label}" permite como m\xE1ximo ${requirement.maxFiles} archivo(s)`;
|
|
17194
|
+
if (BadRequestException) {
|
|
17195
|
+
throw new BadRequestException(msg, true);
|
|
17196
|
+
} else {
|
|
17197
|
+
throw new Error(msg, {
|
|
17198
|
+
cause: "USER_MESSAGE"
|
|
17199
|
+
});
|
|
17200
|
+
}
|
|
17201
|
+
}
|
|
17202
|
+
files.forEach((file) => {
|
|
17203
|
+
const extension = `.${file.Extension.toLowerCase()}`;
|
|
17204
|
+
if (!requirement.acceptedFileExtensions.includes(extension)) {
|
|
17205
|
+
const msg = `El archivo "${file.NameOriginal}" no tiene una extensi\xF3n v\xE1lida para "${requirement.label}"`;
|
|
17206
|
+
if (BadRequestException) {
|
|
17207
|
+
throw new BadRequestException(msg, true);
|
|
17208
|
+
} else {
|
|
17209
|
+
throw new Error(msg, {
|
|
17210
|
+
cause: "USER_MESSAGE"
|
|
17211
|
+
});
|
|
17212
|
+
}
|
|
17213
|
+
}
|
|
17214
|
+
});
|
|
17215
|
+
});
|
|
17216
|
+
}, "verifyRequirements");
|
|
17217
|
+
verifyRequirements(documentRequirement2);
|
|
17218
|
+
}
|
|
17219
|
+
__name(verifyFiles, "verifyFiles");
|
|
17220
|
+
|
|
17155
17221
|
// src/v2/middlewares/validateUUIDv4Param.ts
|
|
17156
17222
|
async function validateUUIDv4Param(BadRequestException, req, _res, next) {
|
|
17157
17223
|
try {
|
|
@@ -17288,7 +17354,6 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
17288
17354
|
hashCode,
|
|
17289
17355
|
isValidDate,
|
|
17290
17356
|
isValidPartialEntity,
|
|
17291
|
-
itemsCanalizacion,
|
|
17292
17357
|
logTiempoProceso,
|
|
17293
17358
|
mapaDPContratoPrecioFullAL02,
|
|
17294
17359
|
mapaEstadoObraFaseAL02,
|
|
@@ -17318,5 +17383,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
|
|
|
17318
17383
|
updatePricePBBudgetAlemaniaAL04,
|
|
17319
17384
|
uuidRegex,
|
|
17320
17385
|
validateNoLookup,
|
|
17321
|
-
validateUUIDv4Param
|
|
17386
|
+
validateUUIDv4Param,
|
|
17387
|
+
verifyFiles,
|
|
17388
|
+
verifyInventoryFinalize
|
|
17322
17389
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
3
|
|
|
6
4
|
// src/Programados/ActualizarDataManoObra.ts
|
|
7
5
|
var ActualizarDataManoObra = /* @__PURE__ */ __name(({ manoObra, ContratoOT, envSIGO, obra }) => {
|
|
@@ -14275,9 +14273,6 @@ var CalcularResumenHPMOLiquidado = /* @__PURE__ */ __name((trabajo) => {
|
|
|
14275
14273
|
|
|
14276
14274
|
// src/Programados/Alemania/Models/DataFlujosHomePass.ts
|
|
14277
14275
|
import { UsuarioDTO } from "sigo-entities";
|
|
14278
|
-
console.log("UsuarioDTO =>", UsuarioDTO);
|
|
14279
|
-
console.log("typeof UsuarioDTO =>", typeof UsuarioDTO);
|
|
14280
|
-
console.log("prototype =>", UsuarioDTO?.prototype);
|
|
14281
14276
|
var dataFlujosHomePass = [
|
|
14282
14277
|
{
|
|
14283
14278
|
Action: "Registrar",
|
|
@@ -16126,17 +16121,17 @@ var GetCodigoFechaActual = /* @__PURE__ */ __name((fecha) => {
|
|
|
16126
16121
|
}, "GetCodigoFechaActual");
|
|
16127
16122
|
|
|
16128
16123
|
// src/shared/Utils/CurrencyFormat.ts
|
|
16129
|
-
var
|
|
16130
|
-
|
|
16131
|
-
|
|
16132
|
-
__publicField(this, "symbolCoin", "");
|
|
16133
|
-
__publicField(this, "symbolCoinPosition", "left");
|
|
16134
|
-
__publicField(this, "isPorcent", false);
|
|
16135
|
-
__publicField(this, "decimal", 2);
|
|
16136
|
-
__publicField(this, "codeCountry", "");
|
|
16137
|
-
__publicField(this, "currency", "");
|
|
16124
|
+
var Params = class Params2 {
|
|
16125
|
+
static {
|
|
16126
|
+
__name(this, "Params");
|
|
16138
16127
|
}
|
|
16139
|
-
|
|
16128
|
+
symbolCoin = "";
|
|
16129
|
+
symbolCoinPosition = "left";
|
|
16130
|
+
isPorcent = false;
|
|
16131
|
+
decimal = 2;
|
|
16132
|
+
codeCountry = "";
|
|
16133
|
+
currency = "";
|
|
16134
|
+
};
|
|
16140
16135
|
function CurrencyFormat(value = 0, options = new Params()) {
|
|
16141
16136
|
try {
|
|
16142
16137
|
let _value = structuredClone(value);
|
|
@@ -16528,13 +16523,16 @@ function buildKeyMO(mo) {
|
|
|
16528
16523
|
__name(buildKeyMO, "buildKeyMO");
|
|
16529
16524
|
|
|
16530
16525
|
// src/Programados/calcularMOAsignada.ts
|
|
16531
|
-
var
|
|
16526
|
+
var AsignacionHelper = class {
|
|
16527
|
+
static {
|
|
16528
|
+
__name(this, "AsignacionHelper");
|
|
16529
|
+
}
|
|
16530
|
+
valorizacionMap;
|
|
16532
16531
|
/**
|
|
16533
16532
|
* Inicializa el helper y construye el índice de asignaciones.
|
|
16534
16533
|
* @param trabajos Lista de trabajos con asignaciones
|
|
16535
16534
|
*/
|
|
16536
16535
|
constructor(trabajos) {
|
|
16537
|
-
__publicField(this, "valorizacionMap");
|
|
16538
16536
|
this.valorizacionMap = this.buildValorizacionMap(trabajos);
|
|
16539
16537
|
}
|
|
16540
16538
|
/**
|
|
@@ -16569,23 +16567,24 @@ var _AsignacionHelper = class _AsignacionHelper {
|
|
|
16569
16567
|
};
|
|
16570
16568
|
}
|
|
16571
16569
|
};
|
|
16572
|
-
__name(_AsignacionHelper, "AsignacionHelper");
|
|
16573
|
-
var AsignacionHelper = _AsignacionHelper;
|
|
16574
16570
|
|
|
16575
16571
|
// src/Programados/calcularMOValorizada.ts
|
|
16576
|
-
var
|
|
16572
|
+
var ValorizacionHelper = class {
|
|
16573
|
+
static {
|
|
16574
|
+
__name(this, "ValorizacionHelper");
|
|
16575
|
+
}
|
|
16576
|
+
valorizacionMap;
|
|
16577
|
+
estadosPermitidos = /* @__PURE__ */ new Set([
|
|
16578
|
+
"PRODUCCION",
|
|
16579
|
+
"CERTIFICADA",
|
|
16580
|
+
"PRELIQUIDADA",
|
|
16581
|
+
"LIQUIDADA"
|
|
16582
|
+
]);
|
|
16577
16583
|
/**
|
|
16578
16584
|
* Inicializa el helper y construye el índice de valorizaciones.
|
|
16579
16585
|
* @param trabajos Lista de trabajos con valorizaciones
|
|
16580
16586
|
*/
|
|
16581
16587
|
constructor(trabajos) {
|
|
16582
|
-
__publicField(this, "valorizacionMap");
|
|
16583
|
-
__publicField(this, "estadosPermitidos", /* @__PURE__ */ new Set([
|
|
16584
|
-
"PRODUCCION",
|
|
16585
|
-
"CERTIFICADA",
|
|
16586
|
-
"PRELIQUIDADA",
|
|
16587
|
-
"LIQUIDADA"
|
|
16588
|
-
]));
|
|
16589
16588
|
this.valorizacionMap = this.buildValorizacionMap(trabajos);
|
|
16590
16589
|
}
|
|
16591
16590
|
/**
|
|
@@ -16622,8 +16621,6 @@ var _ValorizacionHelper = class _ValorizacionHelper {
|
|
|
16622
16621
|
};
|
|
16623
16622
|
}
|
|
16624
16623
|
};
|
|
16625
|
-
__name(_ValorizacionHelper, "ValorizacionHelper");
|
|
16626
|
-
var ValorizacionHelper = _ValorizacionHelper;
|
|
16627
16624
|
|
|
16628
16625
|
// src/Programados/getPriceMaterial.ts
|
|
16629
16626
|
function getPriceMaterial(CodigoItem, dataPriceMaterial) {
|
|
@@ -16806,6 +16803,33 @@ var documentRequirement = [
|
|
|
16806
16803
|
}
|
|
16807
16804
|
];
|
|
16808
16805
|
|
|
16806
|
+
// src/Operativa/AltasNVT/verifyInventoryFinalize.ts
|
|
16807
|
+
function verifyInventoryFinalize(docs, UnprocessableEntityException) {
|
|
16808
|
+
const codigo = "40928145";
|
|
16809
|
+
const orders = docs.filter((e) => e.inventory.some((inv) => inv.codigo === codigo));
|
|
16810
|
+
if (orders.length === 0) {
|
|
16811
|
+
const msg = `No se puede finalizar la orden, la orden no tiene el material ${codigo}`;
|
|
16812
|
+
if (UnprocessableEntityException) {
|
|
16813
|
+
throw new UnprocessableEntityException(msg, true);
|
|
16814
|
+
} else {
|
|
16815
|
+
throw new Error(msg, {
|
|
16816
|
+
cause: "USER_MESSAGE"
|
|
16817
|
+
});
|
|
16818
|
+
}
|
|
16819
|
+
}
|
|
16820
|
+
if (orders.length > 1) {
|
|
16821
|
+
const msg = `No se puede finalizar la orden, existen ordenes con el material ${codigo}`;
|
|
16822
|
+
if (UnprocessableEntityException) {
|
|
16823
|
+
throw new UnprocessableEntityException(msg, true);
|
|
16824
|
+
} else {
|
|
16825
|
+
throw new Error(msg, {
|
|
16826
|
+
cause: "USER_MESSAGE"
|
|
16827
|
+
});
|
|
16828
|
+
}
|
|
16829
|
+
}
|
|
16830
|
+
}
|
|
16831
|
+
__name(verifyInventoryFinalize, "verifyInventoryFinalize");
|
|
16832
|
+
|
|
16809
16833
|
// src/constants/collections.ts
|
|
16810
16834
|
var collections = Object.freeze({
|
|
16811
16835
|
PERU_9112_ToaOrder: "PERU_9112_ToaOrder",
|
|
@@ -16854,13 +16878,6 @@ var db_default = "default_db";
|
|
|
16854
16878
|
// src/v2/constants/regex.ts
|
|
16855
16879
|
var uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
|
|
16856
16880
|
|
|
16857
|
-
// src/v2/constants/itemsCanalizacion.ts
|
|
16858
|
-
var itemsCanalizacion = [
|
|
16859
|
-
"40261082",
|
|
16860
|
-
"47112939",
|
|
16861
|
-
"40266013"
|
|
16862
|
-
];
|
|
16863
|
-
|
|
16864
16881
|
// src/v2/utils/getDBName.ts
|
|
16865
16882
|
function getDBName({ pais, delegacion }) {
|
|
16866
16883
|
return `${process.env.NODE_ENV}.${pais.Codigo}_${delegacion.Codigo}_db`.toLowerCase();
|
|
@@ -16979,6 +16996,54 @@ var buildMenu = /* @__PURE__ */ __name((data, t) => {
|
|
|
16979
16996
|
return rootItems;
|
|
16980
16997
|
}, "buildMenu");
|
|
16981
16998
|
|
|
16999
|
+
// src/v2/utils/verifyFiles.ts
|
|
17000
|
+
function verifyFiles(documentation, documentRequirement2, BadRequestException) {
|
|
17001
|
+
const verifyRequirements = /* @__PURE__ */ __name((requirements) => {
|
|
17002
|
+
requirements.forEach((requirement) => {
|
|
17003
|
+
if (requirement.children.length > 0) {
|
|
17004
|
+
verifyRequirements(requirement.children);
|
|
17005
|
+
return;
|
|
17006
|
+
}
|
|
17007
|
+
const files = documentation.filter((file) => file.CodigoNodo === requirement.id);
|
|
17008
|
+
if (files.length < requirement.minFiles) {
|
|
17009
|
+
const msg = `El requisito "${requirement.label}" requiere al menos ${requirement.minFiles} archivo(s)`;
|
|
17010
|
+
if (BadRequestException) {
|
|
17011
|
+
throw new BadRequestException(msg, true);
|
|
17012
|
+
} else {
|
|
17013
|
+
throw new Error(msg, {
|
|
17014
|
+
cause: "USER_MESSAGE"
|
|
17015
|
+
});
|
|
17016
|
+
}
|
|
17017
|
+
}
|
|
17018
|
+
if (files.length > requirement.maxFiles) {
|
|
17019
|
+
const msg = `El requisito "${requirement.label}" permite como m\xE1ximo ${requirement.maxFiles} archivo(s)`;
|
|
17020
|
+
if (BadRequestException) {
|
|
17021
|
+
throw new BadRequestException(msg, true);
|
|
17022
|
+
} else {
|
|
17023
|
+
throw new Error(msg, {
|
|
17024
|
+
cause: "USER_MESSAGE"
|
|
17025
|
+
});
|
|
17026
|
+
}
|
|
17027
|
+
}
|
|
17028
|
+
files.forEach((file) => {
|
|
17029
|
+
const extension = `.${file.Extension.toLowerCase()}`;
|
|
17030
|
+
if (!requirement.acceptedFileExtensions.includes(extension)) {
|
|
17031
|
+
const msg = `El archivo "${file.NameOriginal}" no tiene una extensi\xF3n v\xE1lida para "${requirement.label}"`;
|
|
17032
|
+
if (BadRequestException) {
|
|
17033
|
+
throw new BadRequestException(msg, true);
|
|
17034
|
+
} else {
|
|
17035
|
+
throw new Error(msg, {
|
|
17036
|
+
cause: "USER_MESSAGE"
|
|
17037
|
+
});
|
|
17038
|
+
}
|
|
17039
|
+
}
|
|
17040
|
+
});
|
|
17041
|
+
});
|
|
17042
|
+
}, "verifyRequirements");
|
|
17043
|
+
verifyRequirements(documentRequirement2);
|
|
17044
|
+
}
|
|
17045
|
+
__name(verifyFiles, "verifyFiles");
|
|
17046
|
+
|
|
16982
17047
|
// src/v2/middlewares/validateUUIDv4Param.ts
|
|
16983
17048
|
async function validateUUIDv4Param(BadRequestException, req, _res, next) {
|
|
16984
17049
|
try {
|
|
@@ -17114,7 +17179,6 @@ export {
|
|
|
17114
17179
|
hashCode,
|
|
17115
17180
|
isValidDate,
|
|
17116
17181
|
isValidPartialEntity,
|
|
17117
|
-
itemsCanalizacion,
|
|
17118
17182
|
logTiempoProceso,
|
|
17119
17183
|
mapaDPContratoPrecioFullAL02,
|
|
17120
17184
|
mapaEstadoObraFaseAL02,
|
|
@@ -17144,5 +17208,7 @@ export {
|
|
|
17144
17208
|
updatePricePBBudgetAlemaniaAL04,
|
|
17145
17209
|
uuidRegex,
|
|
17146
17210
|
validateNoLookup,
|
|
17147
|
-
validateUUIDv4Param
|
|
17211
|
+
validateUUIDv4Param,
|
|
17212
|
+
verifyFiles,
|
|
17213
|
+
verifyInventoryFinalize
|
|
17148
17214
|
};
|