sigo-package 1.2.74 → 1.2.75
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 +46 -2
- package/dist/index.d.ts +46 -2
- package/dist/index.js +57 -0
- package/dist/index.mjs +55 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as sigo_entities from 'sigo-entities';
|
|
2
|
-
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, ManoObraGlobalENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionManoObraDTO, ValorizacionAlemaniaDTO, PrecioContratistaMOAL02ENTITY, ValorizacionDTO, PrecioContratistaMOAL04ENTITY, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY } from 'sigo-entities';
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, ManoObraGlobalENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionManoObraDTO, ValorizacionAlemaniaDTO, PrecioContratistaMOAL02ENTITY, ValorizacionDTO, PrecioContratistaMOAL04ENTITY, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO } from 'sigo-entities';
|
|
3
3
|
|
|
4
4
|
interface IenvSIGO$1 {
|
|
5
5
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
@@ -533,6 +533,50 @@ declare const getNextID_Amap: (Valorizacion: Pick<ValorizacionManoObraDTO, "ID_A
|
|
|
533
533
|
|
|
534
534
|
declare const getNextID_AsignacionValorizacion: (Valorizaciones: Pick<ValorizacionesDTO, "ID_AsignacionValorizacion">[]) => number;
|
|
535
535
|
|
|
536
|
+
type typeMO$1 = Pick<DetalleChileValorizacionMODTO, 'ManoObra' | 'Especialidad' | 'Actividad' | 'UnidadObra' | 'Clave' | 'LineaCodigoCub' | 'Linea'>;
|
|
537
|
+
declare function buildKeyMO(mo: typeMO$1): string;
|
|
538
|
+
|
|
539
|
+
type typeMO = Pick<DetalleChileValorizacionMODTO, "ManoObra" | "Especialidad" | "Actividad" | "UnidadObra" | "Clave" | "LineaCodigoCub" | "Linea">;
|
|
540
|
+
type typeTrabajos = Pick<TrabajoENTITY, "Ultima_asignacion">;
|
|
541
|
+
type MOKeyTotals = {
|
|
542
|
+
cantidadMO: number;
|
|
543
|
+
cantidadUO: number;
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* Helper para optimizar cálculos de Mano de Obra (MO) asignada.
|
|
547
|
+
*
|
|
548
|
+
* Construye un índice (`Map`) de todas las valorizaciones de los trabajos
|
|
549
|
+
* para realizar consultas rápidas (O(1)) sin volver a recorrer todo el arreglo.
|
|
550
|
+
*
|
|
551
|
+
* ### Ejemplo de uso:
|
|
552
|
+
* ```ts
|
|
553
|
+
* // Construyes el helper una sola vez
|
|
554
|
+
* const helper = new ValorizacionHelper(trabajos);
|
|
555
|
+
*
|
|
556
|
+
* // Luego consultas varias veces sin recalcular
|
|
557
|
+
* const { cantidadMO, cantidadUO } = helper.calcularMOAsignada(mo);
|
|
558
|
+
* console.log(cantidadMO, cantidadUO);
|
|
559
|
+
* ```
|
|
560
|
+
*/
|
|
561
|
+
declare class ValorizacionHelper {
|
|
562
|
+
private valorizacionMap;
|
|
563
|
+
/**
|
|
564
|
+
* Inicializa el helper y construye el índice de valorizaciones.
|
|
565
|
+
* @param trabajos Lista de trabajos con valorizaciones
|
|
566
|
+
*/
|
|
567
|
+
constructor(trabajos: typeTrabajos[]);
|
|
568
|
+
/**
|
|
569
|
+
* Construye el índice de valorizaciones (clave → totales MO/UO)
|
|
570
|
+
*/
|
|
571
|
+
private buildValorizacionMap;
|
|
572
|
+
/**
|
|
573
|
+
* Calcula la cantidad de MO y UO asignadas a una MO específica.
|
|
574
|
+
* @param mo Objeto de Mano de Obra
|
|
575
|
+
* @returns Totales de MO y UO
|
|
576
|
+
*/
|
|
577
|
+
calcularMOAsignada(mo: typeMO): MOKeyTotals;
|
|
578
|
+
}
|
|
579
|
+
|
|
536
580
|
declare enum Position {
|
|
537
581
|
left = "left",
|
|
538
582
|
right = "right"
|
|
@@ -613,4 +657,4 @@ declare function formatCurrencyV1(num: number, maximumFractionDigits?: number, s
|
|
|
613
657
|
|
|
614
658
|
declare function formatPercentageV1(num: number, maximumFractionDigits?: number): string;
|
|
615
659
|
|
|
616
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, 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, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildTenantCollectionName, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, 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, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, consumirStockPersonal, convertDates, dataFlujosHomePass, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, newCodMOTroncalReglaLiquidacion1, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, validateNoLookup };
|
|
660
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, 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, ValorizacionHelper, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildTenantCollectionName, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, 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, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, consumirStockPersonal, convertDates, dataFlujosHomePass, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, newCodMOTroncalReglaLiquidacion1, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, validateNoLookup };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as sigo_entities from 'sigo-entities';
|
|
2
|
-
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, ManoObraGlobalENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionManoObraDTO, ValorizacionAlemaniaDTO, PrecioContratistaMOAL02ENTITY, ValorizacionDTO, PrecioContratistaMOAL04ENTITY, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY } from 'sigo-entities';
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, ManoObraGlobalENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionManoObraDTO, ValorizacionAlemaniaDTO, PrecioContratistaMOAL02ENTITY, ValorizacionDTO, PrecioContratistaMOAL04ENTITY, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO } from 'sigo-entities';
|
|
3
3
|
|
|
4
4
|
interface IenvSIGO$1 {
|
|
5
5
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
@@ -533,6 +533,50 @@ declare const getNextID_Amap: (Valorizacion: Pick<ValorizacionManoObraDTO, "ID_A
|
|
|
533
533
|
|
|
534
534
|
declare const getNextID_AsignacionValorizacion: (Valorizaciones: Pick<ValorizacionesDTO, "ID_AsignacionValorizacion">[]) => number;
|
|
535
535
|
|
|
536
|
+
type typeMO$1 = Pick<DetalleChileValorizacionMODTO, 'ManoObra' | 'Especialidad' | 'Actividad' | 'UnidadObra' | 'Clave' | 'LineaCodigoCub' | 'Linea'>;
|
|
537
|
+
declare function buildKeyMO(mo: typeMO$1): string;
|
|
538
|
+
|
|
539
|
+
type typeMO = Pick<DetalleChileValorizacionMODTO, "ManoObra" | "Especialidad" | "Actividad" | "UnidadObra" | "Clave" | "LineaCodigoCub" | "Linea">;
|
|
540
|
+
type typeTrabajos = Pick<TrabajoENTITY, "Ultima_asignacion">;
|
|
541
|
+
type MOKeyTotals = {
|
|
542
|
+
cantidadMO: number;
|
|
543
|
+
cantidadUO: number;
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* Helper para optimizar cálculos de Mano de Obra (MO) asignada.
|
|
547
|
+
*
|
|
548
|
+
* Construye un índice (`Map`) de todas las valorizaciones de los trabajos
|
|
549
|
+
* para realizar consultas rápidas (O(1)) sin volver a recorrer todo el arreglo.
|
|
550
|
+
*
|
|
551
|
+
* ### Ejemplo de uso:
|
|
552
|
+
* ```ts
|
|
553
|
+
* // Construyes el helper una sola vez
|
|
554
|
+
* const helper = new ValorizacionHelper(trabajos);
|
|
555
|
+
*
|
|
556
|
+
* // Luego consultas varias veces sin recalcular
|
|
557
|
+
* const { cantidadMO, cantidadUO } = helper.calcularMOAsignada(mo);
|
|
558
|
+
* console.log(cantidadMO, cantidadUO);
|
|
559
|
+
* ```
|
|
560
|
+
*/
|
|
561
|
+
declare class ValorizacionHelper {
|
|
562
|
+
private valorizacionMap;
|
|
563
|
+
/**
|
|
564
|
+
* Inicializa el helper y construye el índice de valorizaciones.
|
|
565
|
+
* @param trabajos Lista de trabajos con valorizaciones
|
|
566
|
+
*/
|
|
567
|
+
constructor(trabajos: typeTrabajos[]);
|
|
568
|
+
/**
|
|
569
|
+
* Construye el índice de valorizaciones (clave → totales MO/UO)
|
|
570
|
+
*/
|
|
571
|
+
private buildValorizacionMap;
|
|
572
|
+
/**
|
|
573
|
+
* Calcula la cantidad de MO y UO asignadas a una MO específica.
|
|
574
|
+
* @param mo Objeto de Mano de Obra
|
|
575
|
+
* @returns Totales de MO y UO
|
|
576
|
+
*/
|
|
577
|
+
calcularMOAsignada(mo: typeMO): MOKeyTotals;
|
|
578
|
+
}
|
|
579
|
+
|
|
536
580
|
declare enum Position {
|
|
537
581
|
left = "left",
|
|
538
582
|
right = "right"
|
|
@@ -613,4 +657,4 @@ declare function formatCurrencyV1(num: number, maximumFractionDigits?: number, s
|
|
|
613
657
|
|
|
614
658
|
declare function formatPercentageV1(num: number, maximumFractionDigits?: number): string;
|
|
615
659
|
|
|
616
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, 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, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildTenantCollectionName, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, 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, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, consumirStockPersonal, convertDates, dataFlujosHomePass, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, newCodMOTroncalReglaLiquidacion1, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, validateNoLookup };
|
|
660
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, 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, ValorizacionHelper, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildTenantCollectionName, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, 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, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, consumirStockPersonal, convertDates, dataFlujosHomePass, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, newCodMOTroncalReglaLiquidacion1, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, validateNoLookup };
|
package/dist/index.js
CHANGED
|
@@ -60,8 +60,10 @@ __export(index_exports, {
|
|
|
60
60
|
ObtenerZonaAsignada: () => ObtenerZonaAsignada,
|
|
61
61
|
SEGMENT_TY: () => SEGMENT_TY,
|
|
62
62
|
UpdateNodosDocDP: () => UpdateNodosDocDP,
|
|
63
|
+
ValorizacionHelper: () => ValorizacionHelper,
|
|
63
64
|
buildDataMOFromMaterialRules: () => buildDataMOFromMaterialRules,
|
|
64
65
|
buildDataMaterialsRule: () => buildDataMaterialsRule,
|
|
66
|
+
buildKeyMO: () => buildKeyMO,
|
|
65
67
|
buildTenantCollectionName: () => buildTenantCollectionName,
|
|
66
68
|
checkAndBuildMaterialsFromStock: () => checkAndBuildMaterialsFromStock,
|
|
67
69
|
checkMaterialAvailability: () => checkMaterialAvailability,
|
|
@@ -15495,6 +15497,59 @@ var getNextID_Amap = /* @__PURE__ */ __name((Valorizacion) => {
|
|
|
15495
15497
|
var getNextID_AsignacionValorizacion = /* @__PURE__ */ __name((Valorizaciones) => {
|
|
15496
15498
|
return Math.max(0, ...Valorizaciones.map((v) => v.ID_AsignacionValorizacion)) + 1;
|
|
15497
15499
|
}, "getNextID_AsignacionValorizacion");
|
|
15500
|
+
|
|
15501
|
+
// src/Programados/buildKeyMO.ts
|
|
15502
|
+
function buildKeyMO(mo) {
|
|
15503
|
+
const { Especialidad, Actividad, ManoObra, UnidadObra, Clave, LineaCodigoCub, Linea } = mo;
|
|
15504
|
+
const key = `${Especialidad.Codigo}${Actividad.Codigo}${ManoObra.Codigo}${UnidadObra.Codigo}${Clave.Codigo}${LineaCodigoCub}${Linea}`;
|
|
15505
|
+
return key;
|
|
15506
|
+
}
|
|
15507
|
+
__name(buildKeyMO, "buildKeyMO");
|
|
15508
|
+
|
|
15509
|
+
// src/Programados/calcularMOAsignada.ts
|
|
15510
|
+
var _ValorizacionHelper = class _ValorizacionHelper {
|
|
15511
|
+
/**
|
|
15512
|
+
* Inicializa el helper y construye el índice de valorizaciones.
|
|
15513
|
+
* @param trabajos Lista de trabajos con valorizaciones
|
|
15514
|
+
*/
|
|
15515
|
+
constructor(trabajos) {
|
|
15516
|
+
__publicField(this, "valorizacionMap");
|
|
15517
|
+
this.valorizacionMap = this.buildValorizacionMap(trabajos);
|
|
15518
|
+
}
|
|
15519
|
+
/**
|
|
15520
|
+
* Construye el índice de valorizaciones (clave → totales MO/UO)
|
|
15521
|
+
*/
|
|
15522
|
+
buildValorizacionMap(trabajos) {
|
|
15523
|
+
const map = /* @__PURE__ */ new Map();
|
|
15524
|
+
for (const trabajo of trabajos) {
|
|
15525
|
+
for (const val of trabajo.Ultima_asignacion.Valorizaciones) {
|
|
15526
|
+
if (val.Estado.ID_Estado !== 1) continue;
|
|
15527
|
+
const key = buildKeyMO(val);
|
|
15528
|
+
const entry = map.get(key) ?? {
|
|
15529
|
+
cantidadMO: 0,
|
|
15530
|
+
cantidadUO: 0
|
|
15531
|
+
};
|
|
15532
|
+
entry.cantidadMO += val.CantidadMO;
|
|
15533
|
+
entry.cantidadUO += val.CantidadUO;
|
|
15534
|
+
map.set(key, entry);
|
|
15535
|
+
}
|
|
15536
|
+
}
|
|
15537
|
+
return map;
|
|
15538
|
+
}
|
|
15539
|
+
/**
|
|
15540
|
+
* Calcula la cantidad de MO y UO asignadas a una MO específica.
|
|
15541
|
+
* @param mo Objeto de Mano de Obra
|
|
15542
|
+
* @returns Totales de MO y UO
|
|
15543
|
+
*/
|
|
15544
|
+
calcularMOAsignada(mo) {
|
|
15545
|
+
return this.valorizacionMap.get(buildKeyMO(mo)) ?? {
|
|
15546
|
+
cantidadMO: 0,
|
|
15547
|
+
cantidadUO: 0
|
|
15548
|
+
};
|
|
15549
|
+
}
|
|
15550
|
+
};
|
|
15551
|
+
__name(_ValorizacionHelper, "ValorizacionHelper");
|
|
15552
|
+
var ValorizacionHelper = _ValorizacionHelper;
|
|
15498
15553
|
// Annotate the CommonJS export names for ESM import in node:
|
|
15499
15554
|
0 && (module.exports = {
|
|
15500
15555
|
ActualizarDataManoObra,
|
|
@@ -15534,8 +15589,10 @@ var getNextID_AsignacionValorizacion = /* @__PURE__ */ __name((Valorizaciones) =
|
|
|
15534
15589
|
ObtenerZonaAsignada,
|
|
15535
15590
|
SEGMENT_TY,
|
|
15536
15591
|
UpdateNodosDocDP,
|
|
15592
|
+
ValorizacionHelper,
|
|
15537
15593
|
buildDataMOFromMaterialRules,
|
|
15538
15594
|
buildDataMaterialsRule,
|
|
15595
|
+
buildKeyMO,
|
|
15539
15596
|
buildTenantCollectionName,
|
|
15540
15597
|
checkAndBuildMaterialsFromStock,
|
|
15541
15598
|
checkMaterialAvailability,
|
package/dist/index.mjs
CHANGED
|
@@ -15351,6 +15351,59 @@ var getNextID_Amap = /* @__PURE__ */ __name((Valorizacion) => {
|
|
|
15351
15351
|
var getNextID_AsignacionValorizacion = /* @__PURE__ */ __name((Valorizaciones) => {
|
|
15352
15352
|
return Math.max(0, ...Valorizaciones.map((v) => v.ID_AsignacionValorizacion)) + 1;
|
|
15353
15353
|
}, "getNextID_AsignacionValorizacion");
|
|
15354
|
+
|
|
15355
|
+
// src/Programados/buildKeyMO.ts
|
|
15356
|
+
function buildKeyMO(mo) {
|
|
15357
|
+
const { Especialidad, Actividad, ManoObra, UnidadObra, Clave, LineaCodigoCub, Linea } = mo;
|
|
15358
|
+
const key = `${Especialidad.Codigo}${Actividad.Codigo}${ManoObra.Codigo}${UnidadObra.Codigo}${Clave.Codigo}${LineaCodigoCub}${Linea}`;
|
|
15359
|
+
return key;
|
|
15360
|
+
}
|
|
15361
|
+
__name(buildKeyMO, "buildKeyMO");
|
|
15362
|
+
|
|
15363
|
+
// src/Programados/calcularMOAsignada.ts
|
|
15364
|
+
var _ValorizacionHelper = class _ValorizacionHelper {
|
|
15365
|
+
/**
|
|
15366
|
+
* Inicializa el helper y construye el índice de valorizaciones.
|
|
15367
|
+
* @param trabajos Lista de trabajos con valorizaciones
|
|
15368
|
+
*/
|
|
15369
|
+
constructor(trabajos) {
|
|
15370
|
+
__publicField(this, "valorizacionMap");
|
|
15371
|
+
this.valorizacionMap = this.buildValorizacionMap(trabajos);
|
|
15372
|
+
}
|
|
15373
|
+
/**
|
|
15374
|
+
* Construye el índice de valorizaciones (clave → totales MO/UO)
|
|
15375
|
+
*/
|
|
15376
|
+
buildValorizacionMap(trabajos) {
|
|
15377
|
+
const map = /* @__PURE__ */ new Map();
|
|
15378
|
+
for (const trabajo of trabajos) {
|
|
15379
|
+
for (const val of trabajo.Ultima_asignacion.Valorizaciones) {
|
|
15380
|
+
if (val.Estado.ID_Estado !== 1) continue;
|
|
15381
|
+
const key = buildKeyMO(val);
|
|
15382
|
+
const entry = map.get(key) ?? {
|
|
15383
|
+
cantidadMO: 0,
|
|
15384
|
+
cantidadUO: 0
|
|
15385
|
+
};
|
|
15386
|
+
entry.cantidadMO += val.CantidadMO;
|
|
15387
|
+
entry.cantidadUO += val.CantidadUO;
|
|
15388
|
+
map.set(key, entry);
|
|
15389
|
+
}
|
|
15390
|
+
}
|
|
15391
|
+
return map;
|
|
15392
|
+
}
|
|
15393
|
+
/**
|
|
15394
|
+
* Calcula la cantidad de MO y UO asignadas a una MO específica.
|
|
15395
|
+
* @param mo Objeto de Mano de Obra
|
|
15396
|
+
* @returns Totales de MO y UO
|
|
15397
|
+
*/
|
|
15398
|
+
calcularMOAsignada(mo) {
|
|
15399
|
+
return this.valorizacionMap.get(buildKeyMO(mo)) ?? {
|
|
15400
|
+
cantidadMO: 0,
|
|
15401
|
+
cantidadUO: 0
|
|
15402
|
+
};
|
|
15403
|
+
}
|
|
15404
|
+
};
|
|
15405
|
+
__name(_ValorizacionHelper, "ValorizacionHelper");
|
|
15406
|
+
var ValorizacionHelper = _ValorizacionHelper;
|
|
15354
15407
|
export {
|
|
15355
15408
|
ActualizarDataManoObra,
|
|
15356
15409
|
ActualizarDataReserva,
|
|
@@ -15389,8 +15442,10 @@ export {
|
|
|
15389
15442
|
ObtenerZonaAsignada,
|
|
15390
15443
|
SEGMENT_TY,
|
|
15391
15444
|
UpdateNodosDocDP,
|
|
15445
|
+
ValorizacionHelper,
|
|
15392
15446
|
buildDataMOFromMaterialRules,
|
|
15393
15447
|
buildDataMaterialsRule,
|
|
15448
|
+
buildKeyMO,
|
|
15394
15449
|
buildTenantCollectionName,
|
|
15395
15450
|
checkAndBuildMaterialsFromStock,
|
|
15396
15451
|
checkMaterialAvailability,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sigo-package",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.75",
|
|
4
4
|
"description": "Funciones compartidas sigo",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
"typescript": "^5.7.3"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"sigo-entities": "^1.1.
|
|
24
|
+
"sigo-entities": "^1.1.66"
|
|
25
25
|
}
|
|
26
26
|
}
|