sigo-package 1.2.124 → 1.2.126
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 +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +202 -149
- package/dist/index.mjs +191 -139
- 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,
|
|
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, CodigoNombreDTO } from 'sigo-entities';
|
|
3
3
|
|
|
4
4
|
interface IenvSIGO$1 {
|
|
5
5
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
@@ -124,13 +124,15 @@ interface IDPContrato {
|
|
|
124
124
|
|
|
125
125
|
declare const mapaMOMaterialAL04: Map<string, IMOAndMaterialsRules>;
|
|
126
126
|
|
|
127
|
-
declare function updatePricePBBudgetAlemaniaAL04(ManoObra: CodigoNombreUMDTO, Cantidad: number, priceContractorMO: PrecioContratistaMOAL04ENTITY): {
|
|
127
|
+
declare function updatePricePBBudgetAlemaniaAL04(ManoObra: CodigoNombreUMDTO, Cantidad: number, priceContractorMO: PrecioContratistaMOAL04ENTITY, ExceptionClass?: new (message?: string, messageSigo?: boolean) => Error): {
|
|
128
128
|
Precio: number;
|
|
129
129
|
PuntoBaremo: number;
|
|
130
130
|
TotMetros: number;
|
|
131
131
|
TotMetrosAsfalto: number;
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
+
declare function buildReservaMOJobMajorProjectsAlemaniaAL04(dataMOG: ManoObraGlobalENTITY[], priceContractorMOPropia: PrecioContratistaMOAL04ENTITY, codigoMacroObras: string, ExceptionClass?: new (message?: string, messageSigo?: boolean) => Error): ValorizacionManoObraDTO[];
|
|
135
|
+
|
|
134
136
|
declare const codMOTroncalAL02OC: never[];
|
|
135
137
|
declare const codMOTroncalAL02Soplado: never[];
|
|
136
138
|
declare const codMOTroncalAL02Asfaltado: never[];
|
|
@@ -365,7 +367,7 @@ declare function updatePriceContractorMOAL04(valorizaciones: Pick<ValorizacionAl
|
|
|
365
367
|
|
|
366
368
|
declare function updatePriceMOAL04(valorizaciones: Pick<ValorizacionDTO, 'Ultimo_Estado_Interno' | 'DetalleChile' | 'Precio' | 'Total' | 'Cantidad'>[], priceContractorMO: Pick<PrecioContratistaMOAL02ENTITY, 'ManoObraGlobal' | 'Empresa'>): void;
|
|
367
369
|
|
|
368
|
-
declare function obtenerPrecioManoObraAL04(CodigoMO: string, TipoMO: string | null, priceContractorMO: Pick<PrecioContratistaMOAL04ENTITY, 'ManoObraGlobal' | 'Empresa'
|
|
370
|
+
declare function obtenerPrecioManoObraAL04(CodigoMO: string, TipoMO: string | null, priceContractorMO: Pick<PrecioContratistaMOAL04ENTITY, 'ManoObraGlobal' | 'Empresa'>, ExceptionClass?: new (message?: string, messageSigo?: boolean) => Error): number;
|
|
369
371
|
|
|
370
372
|
declare function obtenerTipoYCodigoMO(codigoOriginal: string): {
|
|
371
373
|
TipoMO: string | null;
|
|
@@ -757,6 +759,7 @@ declare const collections: {
|
|
|
757
759
|
readonly CHILE_9512_ToaClaroOrderStock: "CHILE_9512_ToaClaroOrderStock";
|
|
758
760
|
readonly PERU_9112_ToaOrderPreliquidacion: "PERU_9112_ToaOrderPreliquidacion";
|
|
759
761
|
readonly PERU_9112_ClienteWAOO: "PERU_9112_ClienteWAOO";
|
|
762
|
+
readonly ALEMANIA_AL02_SomacylOrderStock: "ALEMANIA_AL02_SomacylOrderStock";
|
|
760
763
|
};
|
|
761
764
|
|
|
762
765
|
declare const db_root = "sigo_db";
|
|
@@ -771,4 +774,4 @@ declare function getDBName({ pais, delegacion }: {
|
|
|
771
774
|
delegacion: CodigoNombreDTO;
|
|
772
775
|
}): string;
|
|
773
776
|
|
|
774
|
-
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, 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, buildReservaMOJobMajorProjectsAlemaniaAL02, 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, colecciones, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, 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, roundNumber, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, validateNoLookup };
|
|
777
|
+
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, 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, 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, colecciones, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, 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, roundNumber, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, 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, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY,
|
|
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, CodigoNombreDTO } from 'sigo-entities';
|
|
3
3
|
|
|
4
4
|
interface IenvSIGO$1 {
|
|
5
5
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
@@ -124,13 +124,15 @@ interface IDPContrato {
|
|
|
124
124
|
|
|
125
125
|
declare const mapaMOMaterialAL04: Map<string, IMOAndMaterialsRules>;
|
|
126
126
|
|
|
127
|
-
declare function updatePricePBBudgetAlemaniaAL04(ManoObra: CodigoNombreUMDTO, Cantidad: number, priceContractorMO: PrecioContratistaMOAL04ENTITY): {
|
|
127
|
+
declare function updatePricePBBudgetAlemaniaAL04(ManoObra: CodigoNombreUMDTO, Cantidad: number, priceContractorMO: PrecioContratistaMOAL04ENTITY, ExceptionClass?: new (message?: string, messageSigo?: boolean) => Error): {
|
|
128
128
|
Precio: number;
|
|
129
129
|
PuntoBaremo: number;
|
|
130
130
|
TotMetros: number;
|
|
131
131
|
TotMetrosAsfalto: number;
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
+
declare function buildReservaMOJobMajorProjectsAlemaniaAL04(dataMOG: ManoObraGlobalENTITY[], priceContractorMOPropia: PrecioContratistaMOAL04ENTITY, codigoMacroObras: string, ExceptionClass?: new (message?: string, messageSigo?: boolean) => Error): ValorizacionManoObraDTO[];
|
|
135
|
+
|
|
134
136
|
declare const codMOTroncalAL02OC: never[];
|
|
135
137
|
declare const codMOTroncalAL02Soplado: never[];
|
|
136
138
|
declare const codMOTroncalAL02Asfaltado: never[];
|
|
@@ -365,7 +367,7 @@ declare function updatePriceContractorMOAL04(valorizaciones: Pick<ValorizacionAl
|
|
|
365
367
|
|
|
366
368
|
declare function updatePriceMOAL04(valorizaciones: Pick<ValorizacionDTO, 'Ultimo_Estado_Interno' | 'DetalleChile' | 'Precio' | 'Total' | 'Cantidad'>[], priceContractorMO: Pick<PrecioContratistaMOAL02ENTITY, 'ManoObraGlobal' | 'Empresa'>): void;
|
|
367
369
|
|
|
368
|
-
declare function obtenerPrecioManoObraAL04(CodigoMO: string, TipoMO: string | null, priceContractorMO: Pick<PrecioContratistaMOAL04ENTITY, 'ManoObraGlobal' | 'Empresa'
|
|
370
|
+
declare function obtenerPrecioManoObraAL04(CodigoMO: string, TipoMO: string | null, priceContractorMO: Pick<PrecioContratistaMOAL04ENTITY, 'ManoObraGlobal' | 'Empresa'>, ExceptionClass?: new (message?: string, messageSigo?: boolean) => Error): number;
|
|
369
371
|
|
|
370
372
|
declare function obtenerTipoYCodigoMO(codigoOriginal: string): {
|
|
371
373
|
TipoMO: string | null;
|
|
@@ -757,6 +759,7 @@ declare const collections: {
|
|
|
757
759
|
readonly CHILE_9512_ToaClaroOrderStock: "CHILE_9512_ToaClaroOrderStock";
|
|
758
760
|
readonly PERU_9112_ToaOrderPreliquidacion: "PERU_9112_ToaOrderPreliquidacion";
|
|
759
761
|
readonly PERU_9112_ClienteWAOO: "PERU_9112_ClienteWAOO";
|
|
762
|
+
readonly ALEMANIA_AL02_SomacylOrderStock: "ALEMANIA_AL02_SomacylOrderStock";
|
|
760
763
|
};
|
|
761
764
|
|
|
762
765
|
declare const db_root = "sigo_db";
|
|
@@ -771,4 +774,4 @@ declare function getDBName({ pais, delegacion }: {
|
|
|
771
774
|
delegacion: CodigoNombreDTO;
|
|
772
775
|
}): string;
|
|
773
776
|
|
|
774
|
-
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, 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, buildReservaMOJobMajorProjectsAlemaniaAL02, 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, colecciones, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, 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, roundNumber, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, validateNoLookup };
|
|
777
|
+
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, 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, 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, colecciones, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, 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, roundNumber, searchCurrentContractorSpecialtyPrice, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, validateNoLookup };
|
package/dist/index.js
CHANGED
|
@@ -66,6 +66,7 @@ __export(index_exports, {
|
|
|
66
66
|
buildDataMaterialsRule: () => buildDataMaterialsRule,
|
|
67
67
|
buildKeyMO: () => buildKeyMO,
|
|
68
68
|
buildReservaMOJobMajorProjectsAlemaniaAL02: () => buildReservaMOJobMajorProjectsAlemaniaAL02,
|
|
69
|
+
buildReservaMOJobMajorProjectsAlemaniaAL04: () => buildReservaMOJobMajorProjectsAlemaniaAL04,
|
|
69
70
|
buildTenantCollectionName: () => buildTenantCollectionName,
|
|
70
71
|
calcularTotalMaterialValorizacionPeru9112: () => calcularTotalMaterialValorizacionPeru9112,
|
|
71
72
|
checkAndBuildMaterialsFromStock: () => checkAndBuildMaterialsFromStock,
|
|
@@ -3785,7 +3786,7 @@ function obtenerTipoYCodigoMO(codigoOriginal) {
|
|
|
3785
3786
|
__name(obtenerTipoYCodigoMO, "obtenerTipoYCodigoMO");
|
|
3786
3787
|
|
|
3787
3788
|
// src/Programados/Alemania/obtenerPrecioManoObraAL04.ts
|
|
3788
|
-
function obtenerPrecioManoObraAL04(CodigoMO, TipoMO, priceContractorMO) {
|
|
3789
|
+
function obtenerPrecioManoObraAL04(CodigoMO, TipoMO, priceContractorMO, ExceptionClass) {
|
|
3789
3790
|
const resultados = priceContractorMO.ManoObraGlobal.filter((e) => e.Codigo === CodigoMO);
|
|
3790
3791
|
if (resultados.length !== 1) {
|
|
3791
3792
|
throw new Error(`Hay ${resultados.length} resultados para precioContratista cod empresa: '${priceContractorMO.Empresa.Codigo}', cod mo: '${CodigoMO}'`);
|
|
@@ -3807,7 +3808,7 @@ function obtenerPrecioManoObraAL04(CodigoMO, TipoMO, priceContractorMO) {
|
|
|
3807
3808
|
__name(obtenerPrecioManoObraAL04, "obtenerPrecioManoObraAL04");
|
|
3808
3809
|
|
|
3809
3810
|
// src/Programados/Alemania/AL04/updatePricePBBudget.ts
|
|
3810
|
-
function updatePricePBBudgetAlemaniaAL04(ManoObra, Cantidad, priceContractorMO) {
|
|
3811
|
+
function updatePricePBBudgetAlemaniaAL04(ManoObra, Cantidad, priceContractorMO, ExceptionClass) {
|
|
3811
3812
|
const { TipoMO, CodigoMO } = obtenerTipoYCodigoMO(ManoObra.Codigo);
|
|
3812
3813
|
const Precio = obtenerPrecioManoObraAL04(CodigoMO, TipoMO, priceContractorMO);
|
|
3813
3814
|
const PuntoBaremo = 1;
|
|
@@ -3832,6 +3833,190 @@ function updatePricePBBudgetAlemaniaAL04(ManoObra, Cantidad, priceContractorMO)
|
|
|
3832
3833
|
}
|
|
3833
3834
|
__name(updatePricePBBudgetAlemaniaAL04, "updatePricePBBudgetAlemaniaAL04");
|
|
3834
3835
|
|
|
3836
|
+
// src/Programados/Alemania/AL04/buildReservaMOJobMajorProjects.ts
|
|
3837
|
+
var import_sigo_entities2 = require("sigo-entities");
|
|
3838
|
+
|
|
3839
|
+
// src/Programados/Alemania/ObtenerMONoReservada/generarModeloAmap.ts
|
|
3840
|
+
var import_sigo_entities = require("sigo-entities");
|
|
3841
|
+
function generarModeloAmap(params) {
|
|
3842
|
+
const { ManoObraGlobal, Precio, PrecioEspecialidad } = params;
|
|
3843
|
+
const DetalleChile = generarModeloDetalleChile(params);
|
|
3844
|
+
const newAmap = new import_sigo_entities.ValorizacionManoObraDTO();
|
|
3845
|
+
newAmap.DetalleChile = DetalleChile;
|
|
3846
|
+
newAmap.Amap = ManoObraGlobal.Amap;
|
|
3847
|
+
newAmap.Codigo = ManoObraGlobal.Codigo;
|
|
3848
|
+
newAmap.Descripcion = ManoObraGlobal.Actividad;
|
|
3849
|
+
newAmap.Precio = Precio;
|
|
3850
|
+
newAmap.Total = newAmap.Precio * newAmap.Cantidad * newAmap.DetalleChile.PuntoBaremo;
|
|
3851
|
+
newAmap.Unidad = ManoObraGlobal.Unidad.Nombre;
|
|
3852
|
+
newAmap.Moneda = PrecioEspecialidad.Moneda;
|
|
3853
|
+
newAmap.Simbolo = PrecioEspecialidad.Simbolo;
|
|
3854
|
+
newAmap.Decimales = PrecioEspecialidad.Decimales;
|
|
3855
|
+
newAmap.WBE.CodigoWBE = "SIGPE";
|
|
3856
|
+
newAmap.CantidadUOAprobada = 1e-6;
|
|
3857
|
+
newAmap.DatosCatalogoMO = {
|
|
3858
|
+
DatosManoObraGlobal: {
|
|
3859
|
+
Actividad: ManoObraGlobal.Actividad,
|
|
3860
|
+
Alcance: ManoObraGlobal.Alcance,
|
|
3861
|
+
Material: ManoObraGlobal.Material,
|
|
3862
|
+
DetalleChile: ManoObraGlobal.DetalleChile
|
|
3863
|
+
},
|
|
3864
|
+
DatosPrecioEspecialidad: {
|
|
3865
|
+
Moneda: PrecioEspecialidad.Moneda,
|
|
3866
|
+
Simbolo: PrecioEspecialidad.Simbolo,
|
|
3867
|
+
Decimales: PrecioEspecialidad.Decimales,
|
|
3868
|
+
Agencias: PrecioEspecialidad.Agencias,
|
|
3869
|
+
Contratistas: params.contratista
|
|
3870
|
+
},
|
|
3871
|
+
DatosUnidadObraMaterial: {
|
|
3872
|
+
Codigo: "0",
|
|
3873
|
+
Descripcion: "SIN UO",
|
|
3874
|
+
Materiales: []
|
|
3875
|
+
}
|
|
3876
|
+
};
|
|
3877
|
+
return newAmap;
|
|
3878
|
+
}
|
|
3879
|
+
__name(generarModeloAmap, "generarModeloAmap");
|
|
3880
|
+
function generarModeloDetalleChile(params) {
|
|
3881
|
+
const { Obra, ManoObraGlobal, MOB } = params;
|
|
3882
|
+
let codigoVal = "00000";
|
|
3883
|
+
if (!!Obra?.DetalleChile?.codigo) {
|
|
3884
|
+
codigoVal = Obra?.DetalleChile?.codigo;
|
|
3885
|
+
}
|
|
3886
|
+
const newDto = new import_sigo_entities.DetalleChileValorizacionMODTO();
|
|
3887
|
+
newDto.Codigo = codigoVal;
|
|
3888
|
+
newDto.CodigoCub = "";
|
|
3889
|
+
newDto.Linea = hashCode(ManoObraGlobal.Codigo), newDto.Especialidad = MOB.Especialidad;
|
|
3890
|
+
newDto.Actividad.Codigo = "CH0001";
|
|
3891
|
+
newDto.Actividad.Nombre = "ACTIVIDAD GENERAL";
|
|
3892
|
+
newDto.Clave.Codigo = "CH0001";
|
|
3893
|
+
newDto.Clave.Nombre = "CLAVE GENERAL";
|
|
3894
|
+
newDto.Tarea = "0000";
|
|
3895
|
+
newDto.ManoObra.Codigo = ManoObraGlobal.Codigo;
|
|
3896
|
+
newDto.ManoObra.Nombre = ManoObraGlobal.Actividad;
|
|
3897
|
+
newDto.ManoObra.UnidadMedida = ManoObraGlobal.Unidad.Nombre;
|
|
3898
|
+
newDto.UnidadObra.Codigo = "0";
|
|
3899
|
+
newDto.UnidadObra.Nombre = "SIN UO";
|
|
3900
|
+
newDto.UnidadObra.UnidadMedida = "UN";
|
|
3901
|
+
newDto.LineaCodigoCub = hashCode(ManoObraGlobal.Codigo) + "" + codigoVal;
|
|
3902
|
+
newDto.PuntoBaremo = MOB.PuntoBaremo;
|
|
3903
|
+
return newDto;
|
|
3904
|
+
}
|
|
3905
|
+
__name(generarModeloDetalleChile, "generarModeloDetalleChile");
|
|
3906
|
+
function hashCode(str = "") {
|
|
3907
|
+
let hash = 0;
|
|
3908
|
+
for (let i = 0; i < str.length; i++) {
|
|
3909
|
+
const char = str.charCodeAt(i);
|
|
3910
|
+
hash = (hash << 5) - hash + char;
|
|
3911
|
+
}
|
|
3912
|
+
return Math.abs(hash).toString();
|
|
3913
|
+
}
|
|
3914
|
+
__name(hashCode, "hashCode");
|
|
3915
|
+
|
|
3916
|
+
// src/Programados/Alemania/ObtenerMONoReservada/filtrarMONoReservada.ts
|
|
3917
|
+
function filtrarMONoReservada(params) {
|
|
3918
|
+
return params.ModelosAmap.reduce((acc, amap) => {
|
|
3919
|
+
const exist = params.ManoObra.Valorizacion.find((e) => e.DetalleChile.ManoObra.Codigo === amap.DetalleChile.ManoObra.Codigo);
|
|
3920
|
+
if (exist) return acc;
|
|
3921
|
+
return [
|
|
3922
|
+
...acc,
|
|
3923
|
+
amap
|
|
3924
|
+
];
|
|
3925
|
+
}, []);
|
|
3926
|
+
}
|
|
3927
|
+
__name(filtrarMONoReservada, "filtrarMONoReservada");
|
|
3928
|
+
|
|
3929
|
+
// src/Programados/Alemania/ObtenerMONoReservada/index.ts
|
|
3930
|
+
function ObtenerMONoReservada(params) {
|
|
3931
|
+
const { dataManoObraGlobal, dataPrecioEspecialidad, Obra, ManoObra } = params;
|
|
3932
|
+
const ModelosAmap = [];
|
|
3933
|
+
for (const ManoObraGlobal of dataManoObraGlobal) {
|
|
3934
|
+
for (const MOB of ManoObraGlobal.DetalleChile.ManoObraBaremo) {
|
|
3935
|
+
const matchPrecioEspecialidad = dataPrecioEspecialidad.filter((p) => p.Especialidad.Codigo === MOB.Especialidad.Codigo && p.ContratoOT.Codigo === ManoObraGlobal.ContratoOT.Codigo);
|
|
3936
|
+
if (matchPrecioEspecialidad.length !== 1) {
|
|
3937
|
+
console.warn(`No se pudo obtener Precio Especialidad para ManoObraGlobal: ${ManoObraGlobal.Codigo}, Codigo Especialidad: ${MOB.Especialidad.Codigo}`);
|
|
3938
|
+
continue;
|
|
3939
|
+
}
|
|
3940
|
+
const agencia = matchPrecioEspecialidad[0].Agencias.filter((e) => e.Codigo === Obra.DetalleChile.agencia);
|
|
3941
|
+
if (agencia.length !== 1) {
|
|
3942
|
+
console.warn(`No se pudo Obtener Agencia`);
|
|
3943
|
+
continue;
|
|
3944
|
+
}
|
|
3945
|
+
let contratista = [];
|
|
3946
|
+
if (!params.Trabajo.Ultima_asignacion.Empresa.Propia) {
|
|
3947
|
+
contratista = matchPrecioEspecialidad[0].Contratistas.filter((e) => e.Empresa.Codigo === params.Trabajo.Ultima_asignacion.Empresa.Codigo);
|
|
3948
|
+
if (contratista.length !== 1) {
|
|
3949
|
+
console.warn(`No se pudo Obtener Contratista`);
|
|
3950
|
+
continue;
|
|
3951
|
+
}
|
|
3952
|
+
}
|
|
3953
|
+
const newModelo = generarModeloAmap({
|
|
3954
|
+
ManoObraGlobal,
|
|
3955
|
+
MOB,
|
|
3956
|
+
Obra,
|
|
3957
|
+
PrecioEspecialidad: matchPrecioEspecialidad[0],
|
|
3958
|
+
Precio: agencia[0].Ultimo_Precio.Precio,
|
|
3959
|
+
contratista
|
|
3960
|
+
});
|
|
3961
|
+
ModelosAmap.push(newModelo);
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3964
|
+
return filtrarMONoReservada({
|
|
3965
|
+
ModelosAmap,
|
|
3966
|
+
ManoObra
|
|
3967
|
+
});
|
|
3968
|
+
}
|
|
3969
|
+
__name(ObtenerMONoReservada, "ObtenerMONoReservada");
|
|
3970
|
+
|
|
3971
|
+
// src/Programados/Alemania/AL04/buildReservaMOJobMajorProjects.ts
|
|
3972
|
+
function buildReservaMOJobMajorProjectsAlemaniaAL04(dataMOG, priceContractorMOPropia, codigoMacroObras, ExceptionClass) {
|
|
3973
|
+
return dataMOG.map((mog) => {
|
|
3974
|
+
if (mog.DetalleChile.ManoObraBaremo.length !== 1) {
|
|
3975
|
+
throw new Error(`No se pudo obtener especialidad para Codigo: ${mog.Codigo}`);
|
|
3976
|
+
}
|
|
3977
|
+
const especialidad = mog.DetalleChile.ManoObraBaremo[0].Especialidad;
|
|
3978
|
+
const actividad = {
|
|
3979
|
+
Codigo: "A",
|
|
3980
|
+
Nombre: "ACTIVIDAD GENERAL"
|
|
3981
|
+
};
|
|
3982
|
+
const clave = {
|
|
3983
|
+
Codigo: "C001",
|
|
3984
|
+
Nombre: "CLAVE GENERAL"
|
|
3985
|
+
};
|
|
3986
|
+
const reserva = new import_sigo_entities2.ValorizacionManoObraDTO();
|
|
3987
|
+
reserva.Amap = mog.Amap;
|
|
3988
|
+
reserva.Codigo = mog.Codigo;
|
|
3989
|
+
reserva.Descripcion = mog.Actividad;
|
|
3990
|
+
reserva.Unidad = mog.Unidad.Nombre;
|
|
3991
|
+
reserva.Moneda = priceContractorMOPropia.Moneda;
|
|
3992
|
+
reserva.Simbolo = priceContractorMOPropia.Simbolo;
|
|
3993
|
+
reserva.DetalleChile.Codigo = hashCode(codigoMacroObras);
|
|
3994
|
+
reserva.DetalleChile.Linea = hashCode(mog.Codigo);
|
|
3995
|
+
reserva.DetalleChile.CodigoCub = reserva.DetalleChile.Codigo;
|
|
3996
|
+
reserva.DetalleChile.Especialidad = especialidad;
|
|
3997
|
+
reserva.DetalleChile.Actividad = actividad;
|
|
3998
|
+
reserva.DetalleChile.Clave = clave;
|
|
3999
|
+
reserva.DetalleChile.Tarea = "0000";
|
|
4000
|
+
reserva.DetalleChile.PuntoBaremo = mog.DetalleChile.ManoObraBaremo[0].PuntoBaremo;
|
|
4001
|
+
reserva.DetalleChile.ManoObra = {
|
|
4002
|
+
Codigo: mog.Codigo,
|
|
4003
|
+
Nombre: mog.Actividad,
|
|
4004
|
+
UnidadMedida: mog.Unidad.Nombre
|
|
4005
|
+
};
|
|
4006
|
+
reserva.DetalleChile.UnidadObra = {
|
|
4007
|
+
Codigo: "0",
|
|
4008
|
+
Nombre: "SIN UO",
|
|
4009
|
+
UnidadMedida: "UN"
|
|
4010
|
+
};
|
|
4011
|
+
reserva.DetalleChile.LineaCodigoCub = `${reserva.DetalleChile.Linea}${reserva.DetalleChile.CodigoCub}`;
|
|
4012
|
+
const { Precio, PuntoBaremo } = updatePricePBBudgetAlemaniaAL04(reserva.DetalleChile.ManoObra, reserva.Cantidad, priceContractorMOPropia, ExceptionClass);
|
|
4013
|
+
reserva.Precio = Precio;
|
|
4014
|
+
reserva.DetalleChile.PuntoBaremo = PuntoBaremo;
|
|
4015
|
+
return reserva;
|
|
4016
|
+
});
|
|
4017
|
+
}
|
|
4018
|
+
__name(buildReservaMOJobMajorProjectsAlemaniaAL04, "buildReservaMOJobMajorProjectsAlemaniaAL04");
|
|
4019
|
+
|
|
3835
4020
|
// src/Programados/Alemania/codMOTroncal_ReglaLiquidacion1.ts
|
|
3836
4021
|
var codMOTroncal_ReglaLiquidacion1 = [
|
|
3837
4022
|
"011304100",
|
|
@@ -13255,141 +13440,7 @@ function updatePricePBBudgetAlemaniaAL02(ManoObra, Cantidad, priceContractorMO,
|
|
|
13255
13440
|
__name(updatePricePBBudgetAlemaniaAL02, "updatePricePBBudgetAlemaniaAL02");
|
|
13256
13441
|
|
|
13257
13442
|
// src/Programados/Alemania/AL02/buildReservaMOJobMajorProjects.ts
|
|
13258
|
-
var
|
|
13259
|
-
|
|
13260
|
-
// src/Programados/Alemania/ObtenerMONoReservada/generarModeloAmap.ts
|
|
13261
|
-
var import_sigo_entities = require("sigo-entities");
|
|
13262
|
-
function generarModeloAmap(params) {
|
|
13263
|
-
const { ManoObraGlobal, Precio, PrecioEspecialidad } = params;
|
|
13264
|
-
const DetalleChile = generarModeloDetalleChile(params);
|
|
13265
|
-
const newAmap = new import_sigo_entities.ValorizacionManoObraDTO();
|
|
13266
|
-
newAmap.DetalleChile = DetalleChile;
|
|
13267
|
-
newAmap.Amap = ManoObraGlobal.Amap;
|
|
13268
|
-
newAmap.Codigo = ManoObraGlobal.Codigo;
|
|
13269
|
-
newAmap.Descripcion = ManoObraGlobal.Actividad;
|
|
13270
|
-
newAmap.Precio = Precio;
|
|
13271
|
-
newAmap.Total = newAmap.Precio * newAmap.Cantidad * newAmap.DetalleChile.PuntoBaremo;
|
|
13272
|
-
newAmap.Unidad = ManoObraGlobal.Unidad.Nombre;
|
|
13273
|
-
newAmap.Moneda = PrecioEspecialidad.Moneda;
|
|
13274
|
-
newAmap.Simbolo = PrecioEspecialidad.Simbolo;
|
|
13275
|
-
newAmap.Decimales = PrecioEspecialidad.Decimales;
|
|
13276
|
-
newAmap.WBE.CodigoWBE = "SIGPE";
|
|
13277
|
-
newAmap.CantidadUOAprobada = 1e-6;
|
|
13278
|
-
newAmap.DatosCatalogoMO = {
|
|
13279
|
-
DatosManoObraGlobal: {
|
|
13280
|
-
Actividad: ManoObraGlobal.Actividad,
|
|
13281
|
-
Alcance: ManoObraGlobal.Alcance,
|
|
13282
|
-
Material: ManoObraGlobal.Material,
|
|
13283
|
-
DetalleChile: ManoObraGlobal.DetalleChile
|
|
13284
|
-
},
|
|
13285
|
-
DatosPrecioEspecialidad: {
|
|
13286
|
-
Moneda: PrecioEspecialidad.Moneda,
|
|
13287
|
-
Simbolo: PrecioEspecialidad.Simbolo,
|
|
13288
|
-
Decimales: PrecioEspecialidad.Decimales,
|
|
13289
|
-
Agencias: PrecioEspecialidad.Agencias,
|
|
13290
|
-
Contratistas: params.contratista
|
|
13291
|
-
},
|
|
13292
|
-
DatosUnidadObraMaterial: {
|
|
13293
|
-
Codigo: "0",
|
|
13294
|
-
Descripcion: "SIN UO",
|
|
13295
|
-
Materiales: []
|
|
13296
|
-
}
|
|
13297
|
-
};
|
|
13298
|
-
return newAmap;
|
|
13299
|
-
}
|
|
13300
|
-
__name(generarModeloAmap, "generarModeloAmap");
|
|
13301
|
-
function generarModeloDetalleChile(params) {
|
|
13302
|
-
const { Obra, ManoObraGlobal, MOB } = params;
|
|
13303
|
-
let codigoVal = "00000";
|
|
13304
|
-
if (!!Obra?.DetalleChile?.codigo) {
|
|
13305
|
-
codigoVal = Obra?.DetalleChile?.codigo;
|
|
13306
|
-
}
|
|
13307
|
-
const newDto = new import_sigo_entities.DetalleChileValorizacionMODTO();
|
|
13308
|
-
newDto.Codigo = codigoVal;
|
|
13309
|
-
newDto.CodigoCub = "";
|
|
13310
|
-
newDto.Linea = hashCode(ManoObraGlobal.Codigo), newDto.Especialidad = MOB.Especialidad;
|
|
13311
|
-
newDto.Actividad.Codigo = "CH0001";
|
|
13312
|
-
newDto.Actividad.Nombre = "ACTIVIDAD GENERAL";
|
|
13313
|
-
newDto.Clave.Codigo = "CH0001";
|
|
13314
|
-
newDto.Clave.Nombre = "CLAVE GENERAL";
|
|
13315
|
-
newDto.Tarea = "0000";
|
|
13316
|
-
newDto.ManoObra.Codigo = ManoObraGlobal.Codigo;
|
|
13317
|
-
newDto.ManoObra.Nombre = ManoObraGlobal.Actividad;
|
|
13318
|
-
newDto.ManoObra.UnidadMedida = ManoObraGlobal.Unidad.Nombre;
|
|
13319
|
-
newDto.UnidadObra.Codigo = "0";
|
|
13320
|
-
newDto.UnidadObra.Nombre = "SIN UO";
|
|
13321
|
-
newDto.UnidadObra.UnidadMedida = "UN";
|
|
13322
|
-
newDto.LineaCodigoCub = hashCode(ManoObraGlobal.Codigo) + "" + codigoVal;
|
|
13323
|
-
newDto.PuntoBaremo = MOB.PuntoBaremo;
|
|
13324
|
-
return newDto;
|
|
13325
|
-
}
|
|
13326
|
-
__name(generarModeloDetalleChile, "generarModeloDetalleChile");
|
|
13327
|
-
function hashCode(str = "") {
|
|
13328
|
-
let hash = 0;
|
|
13329
|
-
for (let i = 0; i < str.length; i++) {
|
|
13330
|
-
const char = str.charCodeAt(i);
|
|
13331
|
-
hash = (hash << 5) - hash + char;
|
|
13332
|
-
}
|
|
13333
|
-
return Math.abs(hash).toString();
|
|
13334
|
-
}
|
|
13335
|
-
__name(hashCode, "hashCode");
|
|
13336
|
-
|
|
13337
|
-
// src/Programados/Alemania/ObtenerMONoReservada/filtrarMONoReservada.ts
|
|
13338
|
-
function filtrarMONoReservada(params) {
|
|
13339
|
-
return params.ModelosAmap.reduce((acc, amap) => {
|
|
13340
|
-
const exist = params.ManoObra.Valorizacion.find((e) => e.DetalleChile.ManoObra.Codigo === amap.DetalleChile.ManoObra.Codigo);
|
|
13341
|
-
if (exist) return acc;
|
|
13342
|
-
return [
|
|
13343
|
-
...acc,
|
|
13344
|
-
amap
|
|
13345
|
-
];
|
|
13346
|
-
}, []);
|
|
13347
|
-
}
|
|
13348
|
-
__name(filtrarMONoReservada, "filtrarMONoReservada");
|
|
13349
|
-
|
|
13350
|
-
// src/Programados/Alemania/ObtenerMONoReservada/index.ts
|
|
13351
|
-
function ObtenerMONoReservada(params) {
|
|
13352
|
-
const { dataManoObraGlobal, dataPrecioEspecialidad, Obra, ManoObra } = params;
|
|
13353
|
-
const ModelosAmap = [];
|
|
13354
|
-
for (const ManoObraGlobal of dataManoObraGlobal) {
|
|
13355
|
-
for (const MOB of ManoObraGlobal.DetalleChile.ManoObraBaremo) {
|
|
13356
|
-
const matchPrecioEspecialidad = dataPrecioEspecialidad.filter((p) => p.Especialidad.Codigo === MOB.Especialidad.Codigo && p.ContratoOT.Codigo === ManoObraGlobal.ContratoOT.Codigo);
|
|
13357
|
-
if (matchPrecioEspecialidad.length !== 1) {
|
|
13358
|
-
console.warn(`No se pudo obtener Precio Especialidad para ManoObraGlobal: ${ManoObraGlobal.Codigo}, Codigo Especialidad: ${MOB.Especialidad.Codigo}`);
|
|
13359
|
-
continue;
|
|
13360
|
-
}
|
|
13361
|
-
const agencia = matchPrecioEspecialidad[0].Agencias.filter((e) => e.Codigo === Obra.DetalleChile.agencia);
|
|
13362
|
-
if (agencia.length !== 1) {
|
|
13363
|
-
console.warn(`No se pudo Obtener Agencia`);
|
|
13364
|
-
continue;
|
|
13365
|
-
}
|
|
13366
|
-
let contratista = [];
|
|
13367
|
-
if (!params.Trabajo.Ultima_asignacion.Empresa.Propia) {
|
|
13368
|
-
contratista = matchPrecioEspecialidad[0].Contratistas.filter((e) => e.Empresa.Codigo === params.Trabajo.Ultima_asignacion.Empresa.Codigo);
|
|
13369
|
-
if (contratista.length !== 1) {
|
|
13370
|
-
console.warn(`No se pudo Obtener Contratista`);
|
|
13371
|
-
continue;
|
|
13372
|
-
}
|
|
13373
|
-
}
|
|
13374
|
-
const newModelo = generarModeloAmap({
|
|
13375
|
-
ManoObraGlobal,
|
|
13376
|
-
MOB,
|
|
13377
|
-
Obra,
|
|
13378
|
-
PrecioEspecialidad: matchPrecioEspecialidad[0],
|
|
13379
|
-
Precio: agencia[0].Ultimo_Precio.Precio,
|
|
13380
|
-
contratista
|
|
13381
|
-
});
|
|
13382
|
-
ModelosAmap.push(newModelo);
|
|
13383
|
-
}
|
|
13384
|
-
}
|
|
13385
|
-
return filtrarMONoReservada({
|
|
13386
|
-
ModelosAmap,
|
|
13387
|
-
ManoObra
|
|
13388
|
-
});
|
|
13389
|
-
}
|
|
13390
|
-
__name(ObtenerMONoReservada, "ObtenerMONoReservada");
|
|
13391
|
-
|
|
13392
|
-
// src/Programados/Alemania/AL02/buildReservaMOJobMajorProjects.ts
|
|
13443
|
+
var import_sigo_entities3 = require("sigo-entities");
|
|
13393
13444
|
function buildReservaMOJobMajorProjectsAlemaniaAL02(dataMOG, priceContractorMOPropia, codigoMacroObras, ExceptionClass) {
|
|
13394
13445
|
return dataMOG.map((mog) => {
|
|
13395
13446
|
if (mog.DetalleChile.ManoObraBaremo.length !== 1) {
|
|
@@ -13404,7 +13455,7 @@ function buildReservaMOJobMajorProjectsAlemaniaAL02(dataMOG, priceContractorMOPr
|
|
|
13404
13455
|
Codigo: "C001",
|
|
13405
13456
|
Nombre: "CLAVE GENERAL"
|
|
13406
13457
|
};
|
|
13407
|
-
const reserva = new
|
|
13458
|
+
const reserva = new import_sigo_entities3.ValorizacionManoObraDTO();
|
|
13408
13459
|
reserva.Amap = mog.Amap;
|
|
13409
13460
|
reserva.Codigo = mog.Codigo;
|
|
13410
13461
|
reserva.Descripcion = mog.Actividad;
|
|
@@ -14307,12 +14358,12 @@ var CalcularResumenHPMOLiquidado = /* @__PURE__ */ __name((trabajo) => {
|
|
|
14307
14358
|
}, "CalcularResumenHPMOLiquidado");
|
|
14308
14359
|
|
|
14309
14360
|
// src/Programados/Alemania/Models/DataFlujosHomePass.ts
|
|
14310
|
-
var
|
|
14361
|
+
var import_sigo_entities4 = require("sigo-entities");
|
|
14311
14362
|
var dataFlujosHomePass = [
|
|
14312
14363
|
{
|
|
14313
14364
|
Action: "Registrar",
|
|
14314
14365
|
Fecha: /* @__PURE__ */ new Date(),
|
|
14315
|
-
Usuario: new
|
|
14366
|
+
Usuario: new import_sigo_entities4.UsuarioDTO(),
|
|
14316
14367
|
Description: "Registrar",
|
|
14317
14368
|
Posicion: "1",
|
|
14318
14369
|
Icono: "fa fa-registered",
|
|
@@ -14325,7 +14376,7 @@ var dataFlujosHomePass = [
|
|
|
14325
14376
|
{
|
|
14326
14377
|
Action: "Aprobar",
|
|
14327
14378
|
Fecha: /* @__PURE__ */ new Date(),
|
|
14328
|
-
Usuario: new
|
|
14379
|
+
Usuario: new import_sigo_entities4.UsuarioDTO(),
|
|
14329
14380
|
Description: "Aprobar",
|
|
14330
14381
|
Posicion: "2",
|
|
14331
14382
|
Icono: "fa fa-check-square-o",
|
|
@@ -14338,7 +14389,7 @@ var dataFlujosHomePass = [
|
|
|
14338
14389
|
{
|
|
14339
14390
|
Action: "Eliminar",
|
|
14340
14391
|
Fecha: /* @__PURE__ */ new Date(),
|
|
14341
|
-
Usuario: new
|
|
14392
|
+
Usuario: new import_sigo_entities4.UsuarioDTO(),
|
|
14342
14393
|
Description: "Eliminar",
|
|
14343
14394
|
Posicion: "4",
|
|
14344
14395
|
Icono: "fa fa-times-circle",
|
|
@@ -16068,12 +16119,12 @@ var DocumentacionReplanteo = [
|
|
|
16068
16119
|
];
|
|
16069
16120
|
|
|
16070
16121
|
// src/Programados/Procesos/Modelos/ModelDataFlujosDocumentacionReplanteo.ts
|
|
16071
|
-
var
|
|
16122
|
+
var import_sigo_entities5 = require("sigo-entities");
|
|
16072
16123
|
var ModelDataFlujosDocumentacionReplanteo = [
|
|
16073
16124
|
{
|
|
16074
16125
|
Action: "Registrar",
|
|
16075
16126
|
Fecha: /* @__PURE__ */ new Date(),
|
|
16076
|
-
Usuario: new
|
|
16127
|
+
Usuario: new import_sigo_entities5.UsuarioDTO(),
|
|
16077
16128
|
Description: "Registrar",
|
|
16078
16129
|
Posicion: "1",
|
|
16079
16130
|
Icono: "fa fa-registered",
|
|
@@ -16086,7 +16137,7 @@ var ModelDataFlujosDocumentacionReplanteo = [
|
|
|
16086
16137
|
{
|
|
16087
16138
|
Action: "Aprobar",
|
|
16088
16139
|
Fecha: /* @__PURE__ */ new Date(),
|
|
16089
|
-
Usuario: new
|
|
16140
|
+
Usuario: new import_sigo_entities5.UsuarioDTO(),
|
|
16090
16141
|
Description: "Aprobar",
|
|
16091
16142
|
Posicion: "2",
|
|
16092
16143
|
Icono: "fa fa-check-circle",
|
|
@@ -16099,7 +16150,7 @@ var ModelDataFlujosDocumentacionReplanteo = [
|
|
|
16099
16150
|
{
|
|
16100
16151
|
Action: "Rechazar",
|
|
16101
16152
|
Fecha: /* @__PURE__ */ new Date(),
|
|
16102
|
-
Usuario: new
|
|
16153
|
+
Usuario: new import_sigo_entities5.UsuarioDTO(),
|
|
16103
16154
|
Description: "Rechazar",
|
|
16104
16155
|
Posicion: "3",
|
|
16105
16156
|
Icono: "fa fa-minus-circle",
|
|
@@ -16112,7 +16163,7 @@ var ModelDataFlujosDocumentacionReplanteo = [
|
|
|
16112
16163
|
{
|
|
16113
16164
|
Action: "Eliminar",
|
|
16114
16165
|
Fecha: /* @__PURE__ */ new Date(),
|
|
16115
|
-
Usuario: new
|
|
16166
|
+
Usuario: new import_sigo_entities5.UsuarioDTO(),
|
|
16116
16167
|
Description: "Eliminar",
|
|
16117
16168
|
Posicion: "4",
|
|
16118
16169
|
Icono: "fa fa-times-circle",
|
|
@@ -16125,7 +16176,7 @@ var ModelDataFlujosDocumentacionReplanteo = [
|
|
|
16125
16176
|
{
|
|
16126
16177
|
Action: "Descargar",
|
|
16127
16178
|
Fecha: /* @__PURE__ */ new Date(),
|
|
16128
|
-
Usuario: new
|
|
16179
|
+
Usuario: new import_sigo_entities5.UsuarioDTO(),
|
|
16129
16180
|
Description: "Descargar",
|
|
16130
16181
|
Posicion: "5",
|
|
16131
16182
|
Icono: "fa fa-arrow-circle-down",
|
|
@@ -16734,7 +16785,8 @@ var collections = {
|
|
|
16734
16785
|
CHILE_9512_ToaClaroRequestNumberTTL: "CHILE_9512_ToaClaroRequestNumberTTL",
|
|
16735
16786
|
CHILE_9512_ToaClaroOrderStock: "CHILE_9512_ToaClaroOrderStock",
|
|
16736
16787
|
PERU_9112_ToaOrderPreliquidacion: "PERU_9112_ToaOrderPreliquidacion",
|
|
16737
|
-
PERU_9112_ClienteWAOO: "PERU_9112_ClienteWAOO"
|
|
16788
|
+
PERU_9112_ClienteWAOO: "PERU_9112_ClienteWAOO",
|
|
16789
|
+
ALEMANIA_AL02_SomacylOrderStock: "ALEMANIA_AL02_SomacylOrderStock"
|
|
16738
16790
|
};
|
|
16739
16791
|
|
|
16740
16792
|
// src/v2/constants/db.ts
|
|
@@ -16796,6 +16848,7 @@ __name(getDBName, "getDBName");
|
|
|
16796
16848
|
buildDataMaterialsRule,
|
|
16797
16849
|
buildKeyMO,
|
|
16798
16850
|
buildReservaMOJobMajorProjectsAlemaniaAL02,
|
|
16851
|
+
buildReservaMOJobMajorProjectsAlemaniaAL04,
|
|
16799
16852
|
buildTenantCollectionName,
|
|
16800
16853
|
calcularTotalMaterialValorizacionPeru9112,
|
|
16801
16854
|
checkAndBuildMaterialsFromStock,
|
package/dist/index.mjs
CHANGED
|
@@ -3622,7 +3622,7 @@ function obtenerTipoYCodigoMO(codigoOriginal) {
|
|
|
3622
3622
|
__name(obtenerTipoYCodigoMO, "obtenerTipoYCodigoMO");
|
|
3623
3623
|
|
|
3624
3624
|
// src/Programados/Alemania/obtenerPrecioManoObraAL04.ts
|
|
3625
|
-
function obtenerPrecioManoObraAL04(CodigoMO, TipoMO, priceContractorMO) {
|
|
3625
|
+
function obtenerPrecioManoObraAL04(CodigoMO, TipoMO, priceContractorMO, ExceptionClass) {
|
|
3626
3626
|
const resultados = priceContractorMO.ManoObraGlobal.filter((e) => e.Codigo === CodigoMO);
|
|
3627
3627
|
if (resultados.length !== 1) {
|
|
3628
3628
|
throw new Error(`Hay ${resultados.length} resultados para precioContratista cod empresa: '${priceContractorMO.Empresa.Codigo}', cod mo: '${CodigoMO}'`);
|
|
@@ -3644,7 +3644,7 @@ function obtenerPrecioManoObraAL04(CodigoMO, TipoMO, priceContractorMO) {
|
|
|
3644
3644
|
__name(obtenerPrecioManoObraAL04, "obtenerPrecioManoObraAL04");
|
|
3645
3645
|
|
|
3646
3646
|
// src/Programados/Alemania/AL04/updatePricePBBudget.ts
|
|
3647
|
-
function updatePricePBBudgetAlemaniaAL04(ManoObra, Cantidad, priceContractorMO) {
|
|
3647
|
+
function updatePricePBBudgetAlemaniaAL04(ManoObra, Cantidad, priceContractorMO, ExceptionClass) {
|
|
3648
3648
|
const { TipoMO, CodigoMO } = obtenerTipoYCodigoMO(ManoObra.Codigo);
|
|
3649
3649
|
const Precio = obtenerPrecioManoObraAL04(CodigoMO, TipoMO, priceContractorMO);
|
|
3650
3650
|
const PuntoBaremo = 1;
|
|
@@ -3669,6 +3669,190 @@ function updatePricePBBudgetAlemaniaAL04(ManoObra, Cantidad, priceContractorMO)
|
|
|
3669
3669
|
}
|
|
3670
3670
|
__name(updatePricePBBudgetAlemaniaAL04, "updatePricePBBudgetAlemaniaAL04");
|
|
3671
3671
|
|
|
3672
|
+
// src/Programados/Alemania/AL04/buildReservaMOJobMajorProjects.ts
|
|
3673
|
+
import { ValorizacionManoObraDTO as ValorizacionManoObraDTO2 } from "sigo-entities";
|
|
3674
|
+
|
|
3675
|
+
// src/Programados/Alemania/ObtenerMONoReservada/generarModeloAmap.ts
|
|
3676
|
+
import { DetalleChileValorizacionMODTO, ValorizacionManoObraDTO } from "sigo-entities";
|
|
3677
|
+
function generarModeloAmap(params) {
|
|
3678
|
+
const { ManoObraGlobal, Precio, PrecioEspecialidad } = params;
|
|
3679
|
+
const DetalleChile = generarModeloDetalleChile(params);
|
|
3680
|
+
const newAmap = new ValorizacionManoObraDTO();
|
|
3681
|
+
newAmap.DetalleChile = DetalleChile;
|
|
3682
|
+
newAmap.Amap = ManoObraGlobal.Amap;
|
|
3683
|
+
newAmap.Codigo = ManoObraGlobal.Codigo;
|
|
3684
|
+
newAmap.Descripcion = ManoObraGlobal.Actividad;
|
|
3685
|
+
newAmap.Precio = Precio;
|
|
3686
|
+
newAmap.Total = newAmap.Precio * newAmap.Cantidad * newAmap.DetalleChile.PuntoBaremo;
|
|
3687
|
+
newAmap.Unidad = ManoObraGlobal.Unidad.Nombre;
|
|
3688
|
+
newAmap.Moneda = PrecioEspecialidad.Moneda;
|
|
3689
|
+
newAmap.Simbolo = PrecioEspecialidad.Simbolo;
|
|
3690
|
+
newAmap.Decimales = PrecioEspecialidad.Decimales;
|
|
3691
|
+
newAmap.WBE.CodigoWBE = "SIGPE";
|
|
3692
|
+
newAmap.CantidadUOAprobada = 1e-6;
|
|
3693
|
+
newAmap.DatosCatalogoMO = {
|
|
3694
|
+
DatosManoObraGlobal: {
|
|
3695
|
+
Actividad: ManoObraGlobal.Actividad,
|
|
3696
|
+
Alcance: ManoObraGlobal.Alcance,
|
|
3697
|
+
Material: ManoObraGlobal.Material,
|
|
3698
|
+
DetalleChile: ManoObraGlobal.DetalleChile
|
|
3699
|
+
},
|
|
3700
|
+
DatosPrecioEspecialidad: {
|
|
3701
|
+
Moneda: PrecioEspecialidad.Moneda,
|
|
3702
|
+
Simbolo: PrecioEspecialidad.Simbolo,
|
|
3703
|
+
Decimales: PrecioEspecialidad.Decimales,
|
|
3704
|
+
Agencias: PrecioEspecialidad.Agencias,
|
|
3705
|
+
Contratistas: params.contratista
|
|
3706
|
+
},
|
|
3707
|
+
DatosUnidadObraMaterial: {
|
|
3708
|
+
Codigo: "0",
|
|
3709
|
+
Descripcion: "SIN UO",
|
|
3710
|
+
Materiales: []
|
|
3711
|
+
}
|
|
3712
|
+
};
|
|
3713
|
+
return newAmap;
|
|
3714
|
+
}
|
|
3715
|
+
__name(generarModeloAmap, "generarModeloAmap");
|
|
3716
|
+
function generarModeloDetalleChile(params) {
|
|
3717
|
+
const { Obra, ManoObraGlobal, MOB } = params;
|
|
3718
|
+
let codigoVal = "00000";
|
|
3719
|
+
if (!!Obra?.DetalleChile?.codigo) {
|
|
3720
|
+
codigoVal = Obra?.DetalleChile?.codigo;
|
|
3721
|
+
}
|
|
3722
|
+
const newDto = new DetalleChileValorizacionMODTO();
|
|
3723
|
+
newDto.Codigo = codigoVal;
|
|
3724
|
+
newDto.CodigoCub = "";
|
|
3725
|
+
newDto.Linea = hashCode(ManoObraGlobal.Codigo), newDto.Especialidad = MOB.Especialidad;
|
|
3726
|
+
newDto.Actividad.Codigo = "CH0001";
|
|
3727
|
+
newDto.Actividad.Nombre = "ACTIVIDAD GENERAL";
|
|
3728
|
+
newDto.Clave.Codigo = "CH0001";
|
|
3729
|
+
newDto.Clave.Nombre = "CLAVE GENERAL";
|
|
3730
|
+
newDto.Tarea = "0000";
|
|
3731
|
+
newDto.ManoObra.Codigo = ManoObraGlobal.Codigo;
|
|
3732
|
+
newDto.ManoObra.Nombre = ManoObraGlobal.Actividad;
|
|
3733
|
+
newDto.ManoObra.UnidadMedida = ManoObraGlobal.Unidad.Nombre;
|
|
3734
|
+
newDto.UnidadObra.Codigo = "0";
|
|
3735
|
+
newDto.UnidadObra.Nombre = "SIN UO";
|
|
3736
|
+
newDto.UnidadObra.UnidadMedida = "UN";
|
|
3737
|
+
newDto.LineaCodigoCub = hashCode(ManoObraGlobal.Codigo) + "" + codigoVal;
|
|
3738
|
+
newDto.PuntoBaremo = MOB.PuntoBaremo;
|
|
3739
|
+
return newDto;
|
|
3740
|
+
}
|
|
3741
|
+
__name(generarModeloDetalleChile, "generarModeloDetalleChile");
|
|
3742
|
+
function hashCode(str = "") {
|
|
3743
|
+
let hash = 0;
|
|
3744
|
+
for (let i = 0; i < str.length; i++) {
|
|
3745
|
+
const char = str.charCodeAt(i);
|
|
3746
|
+
hash = (hash << 5) - hash + char;
|
|
3747
|
+
}
|
|
3748
|
+
return Math.abs(hash).toString();
|
|
3749
|
+
}
|
|
3750
|
+
__name(hashCode, "hashCode");
|
|
3751
|
+
|
|
3752
|
+
// src/Programados/Alemania/ObtenerMONoReservada/filtrarMONoReservada.ts
|
|
3753
|
+
function filtrarMONoReservada(params) {
|
|
3754
|
+
return params.ModelosAmap.reduce((acc, amap) => {
|
|
3755
|
+
const exist = params.ManoObra.Valorizacion.find((e) => e.DetalleChile.ManoObra.Codigo === amap.DetalleChile.ManoObra.Codigo);
|
|
3756
|
+
if (exist) return acc;
|
|
3757
|
+
return [
|
|
3758
|
+
...acc,
|
|
3759
|
+
amap
|
|
3760
|
+
];
|
|
3761
|
+
}, []);
|
|
3762
|
+
}
|
|
3763
|
+
__name(filtrarMONoReservada, "filtrarMONoReservada");
|
|
3764
|
+
|
|
3765
|
+
// src/Programados/Alemania/ObtenerMONoReservada/index.ts
|
|
3766
|
+
function ObtenerMONoReservada(params) {
|
|
3767
|
+
const { dataManoObraGlobal, dataPrecioEspecialidad, Obra, ManoObra } = params;
|
|
3768
|
+
const ModelosAmap = [];
|
|
3769
|
+
for (const ManoObraGlobal of dataManoObraGlobal) {
|
|
3770
|
+
for (const MOB of ManoObraGlobal.DetalleChile.ManoObraBaremo) {
|
|
3771
|
+
const matchPrecioEspecialidad = dataPrecioEspecialidad.filter((p) => p.Especialidad.Codigo === MOB.Especialidad.Codigo && p.ContratoOT.Codigo === ManoObraGlobal.ContratoOT.Codigo);
|
|
3772
|
+
if (matchPrecioEspecialidad.length !== 1) {
|
|
3773
|
+
console.warn(`No se pudo obtener Precio Especialidad para ManoObraGlobal: ${ManoObraGlobal.Codigo}, Codigo Especialidad: ${MOB.Especialidad.Codigo}`);
|
|
3774
|
+
continue;
|
|
3775
|
+
}
|
|
3776
|
+
const agencia = matchPrecioEspecialidad[0].Agencias.filter((e) => e.Codigo === Obra.DetalleChile.agencia);
|
|
3777
|
+
if (agencia.length !== 1) {
|
|
3778
|
+
console.warn(`No se pudo Obtener Agencia`);
|
|
3779
|
+
continue;
|
|
3780
|
+
}
|
|
3781
|
+
let contratista = [];
|
|
3782
|
+
if (!params.Trabajo.Ultima_asignacion.Empresa.Propia) {
|
|
3783
|
+
contratista = matchPrecioEspecialidad[0].Contratistas.filter((e) => e.Empresa.Codigo === params.Trabajo.Ultima_asignacion.Empresa.Codigo);
|
|
3784
|
+
if (contratista.length !== 1) {
|
|
3785
|
+
console.warn(`No se pudo Obtener Contratista`);
|
|
3786
|
+
continue;
|
|
3787
|
+
}
|
|
3788
|
+
}
|
|
3789
|
+
const newModelo = generarModeloAmap({
|
|
3790
|
+
ManoObraGlobal,
|
|
3791
|
+
MOB,
|
|
3792
|
+
Obra,
|
|
3793
|
+
PrecioEspecialidad: matchPrecioEspecialidad[0],
|
|
3794
|
+
Precio: agencia[0].Ultimo_Precio.Precio,
|
|
3795
|
+
contratista
|
|
3796
|
+
});
|
|
3797
|
+
ModelosAmap.push(newModelo);
|
|
3798
|
+
}
|
|
3799
|
+
}
|
|
3800
|
+
return filtrarMONoReservada({
|
|
3801
|
+
ModelosAmap,
|
|
3802
|
+
ManoObra
|
|
3803
|
+
});
|
|
3804
|
+
}
|
|
3805
|
+
__name(ObtenerMONoReservada, "ObtenerMONoReservada");
|
|
3806
|
+
|
|
3807
|
+
// src/Programados/Alemania/AL04/buildReservaMOJobMajorProjects.ts
|
|
3808
|
+
function buildReservaMOJobMajorProjectsAlemaniaAL04(dataMOG, priceContractorMOPropia, codigoMacroObras, ExceptionClass) {
|
|
3809
|
+
return dataMOG.map((mog) => {
|
|
3810
|
+
if (mog.DetalleChile.ManoObraBaremo.length !== 1) {
|
|
3811
|
+
throw new Error(`No se pudo obtener especialidad para Codigo: ${mog.Codigo}`);
|
|
3812
|
+
}
|
|
3813
|
+
const especialidad = mog.DetalleChile.ManoObraBaremo[0].Especialidad;
|
|
3814
|
+
const actividad = {
|
|
3815
|
+
Codigo: "A",
|
|
3816
|
+
Nombre: "ACTIVIDAD GENERAL"
|
|
3817
|
+
};
|
|
3818
|
+
const clave = {
|
|
3819
|
+
Codigo: "C001",
|
|
3820
|
+
Nombre: "CLAVE GENERAL"
|
|
3821
|
+
};
|
|
3822
|
+
const reserva = new ValorizacionManoObraDTO2();
|
|
3823
|
+
reserva.Amap = mog.Amap;
|
|
3824
|
+
reserva.Codigo = mog.Codigo;
|
|
3825
|
+
reserva.Descripcion = mog.Actividad;
|
|
3826
|
+
reserva.Unidad = mog.Unidad.Nombre;
|
|
3827
|
+
reserva.Moneda = priceContractorMOPropia.Moneda;
|
|
3828
|
+
reserva.Simbolo = priceContractorMOPropia.Simbolo;
|
|
3829
|
+
reserva.DetalleChile.Codigo = hashCode(codigoMacroObras);
|
|
3830
|
+
reserva.DetalleChile.Linea = hashCode(mog.Codigo);
|
|
3831
|
+
reserva.DetalleChile.CodigoCub = reserva.DetalleChile.Codigo;
|
|
3832
|
+
reserva.DetalleChile.Especialidad = especialidad;
|
|
3833
|
+
reserva.DetalleChile.Actividad = actividad;
|
|
3834
|
+
reserva.DetalleChile.Clave = clave;
|
|
3835
|
+
reserva.DetalleChile.Tarea = "0000";
|
|
3836
|
+
reserva.DetalleChile.PuntoBaremo = mog.DetalleChile.ManoObraBaremo[0].PuntoBaremo;
|
|
3837
|
+
reserva.DetalleChile.ManoObra = {
|
|
3838
|
+
Codigo: mog.Codigo,
|
|
3839
|
+
Nombre: mog.Actividad,
|
|
3840
|
+
UnidadMedida: mog.Unidad.Nombre
|
|
3841
|
+
};
|
|
3842
|
+
reserva.DetalleChile.UnidadObra = {
|
|
3843
|
+
Codigo: "0",
|
|
3844
|
+
Nombre: "SIN UO",
|
|
3845
|
+
UnidadMedida: "UN"
|
|
3846
|
+
};
|
|
3847
|
+
reserva.DetalleChile.LineaCodigoCub = `${reserva.DetalleChile.Linea}${reserva.DetalleChile.CodigoCub}`;
|
|
3848
|
+
const { Precio, PuntoBaremo } = updatePricePBBudgetAlemaniaAL04(reserva.DetalleChile.ManoObra, reserva.Cantidad, priceContractorMOPropia, ExceptionClass);
|
|
3849
|
+
reserva.Precio = Precio;
|
|
3850
|
+
reserva.DetalleChile.PuntoBaremo = PuntoBaremo;
|
|
3851
|
+
return reserva;
|
|
3852
|
+
});
|
|
3853
|
+
}
|
|
3854
|
+
__name(buildReservaMOJobMajorProjectsAlemaniaAL04, "buildReservaMOJobMajorProjectsAlemaniaAL04");
|
|
3855
|
+
|
|
3672
3856
|
// src/Programados/Alemania/codMOTroncal_ReglaLiquidacion1.ts
|
|
3673
3857
|
var codMOTroncal_ReglaLiquidacion1 = [
|
|
3674
3858
|
"011304100",
|
|
@@ -13092,141 +13276,7 @@ function updatePricePBBudgetAlemaniaAL02(ManoObra, Cantidad, priceContractorMO,
|
|
|
13092
13276
|
__name(updatePricePBBudgetAlemaniaAL02, "updatePricePBBudgetAlemaniaAL02");
|
|
13093
13277
|
|
|
13094
13278
|
// src/Programados/Alemania/AL02/buildReservaMOJobMajorProjects.ts
|
|
13095
|
-
import { ValorizacionManoObraDTO as
|
|
13096
|
-
|
|
13097
|
-
// src/Programados/Alemania/ObtenerMONoReservada/generarModeloAmap.ts
|
|
13098
|
-
import { DetalleChileValorizacionMODTO, ValorizacionManoObraDTO } from "sigo-entities";
|
|
13099
|
-
function generarModeloAmap(params) {
|
|
13100
|
-
const { ManoObraGlobal, Precio, PrecioEspecialidad } = params;
|
|
13101
|
-
const DetalleChile = generarModeloDetalleChile(params);
|
|
13102
|
-
const newAmap = new ValorizacionManoObraDTO();
|
|
13103
|
-
newAmap.DetalleChile = DetalleChile;
|
|
13104
|
-
newAmap.Amap = ManoObraGlobal.Amap;
|
|
13105
|
-
newAmap.Codigo = ManoObraGlobal.Codigo;
|
|
13106
|
-
newAmap.Descripcion = ManoObraGlobal.Actividad;
|
|
13107
|
-
newAmap.Precio = Precio;
|
|
13108
|
-
newAmap.Total = newAmap.Precio * newAmap.Cantidad * newAmap.DetalleChile.PuntoBaremo;
|
|
13109
|
-
newAmap.Unidad = ManoObraGlobal.Unidad.Nombre;
|
|
13110
|
-
newAmap.Moneda = PrecioEspecialidad.Moneda;
|
|
13111
|
-
newAmap.Simbolo = PrecioEspecialidad.Simbolo;
|
|
13112
|
-
newAmap.Decimales = PrecioEspecialidad.Decimales;
|
|
13113
|
-
newAmap.WBE.CodigoWBE = "SIGPE";
|
|
13114
|
-
newAmap.CantidadUOAprobada = 1e-6;
|
|
13115
|
-
newAmap.DatosCatalogoMO = {
|
|
13116
|
-
DatosManoObraGlobal: {
|
|
13117
|
-
Actividad: ManoObraGlobal.Actividad,
|
|
13118
|
-
Alcance: ManoObraGlobal.Alcance,
|
|
13119
|
-
Material: ManoObraGlobal.Material,
|
|
13120
|
-
DetalleChile: ManoObraGlobal.DetalleChile
|
|
13121
|
-
},
|
|
13122
|
-
DatosPrecioEspecialidad: {
|
|
13123
|
-
Moneda: PrecioEspecialidad.Moneda,
|
|
13124
|
-
Simbolo: PrecioEspecialidad.Simbolo,
|
|
13125
|
-
Decimales: PrecioEspecialidad.Decimales,
|
|
13126
|
-
Agencias: PrecioEspecialidad.Agencias,
|
|
13127
|
-
Contratistas: params.contratista
|
|
13128
|
-
},
|
|
13129
|
-
DatosUnidadObraMaterial: {
|
|
13130
|
-
Codigo: "0",
|
|
13131
|
-
Descripcion: "SIN UO",
|
|
13132
|
-
Materiales: []
|
|
13133
|
-
}
|
|
13134
|
-
};
|
|
13135
|
-
return newAmap;
|
|
13136
|
-
}
|
|
13137
|
-
__name(generarModeloAmap, "generarModeloAmap");
|
|
13138
|
-
function generarModeloDetalleChile(params) {
|
|
13139
|
-
const { Obra, ManoObraGlobal, MOB } = params;
|
|
13140
|
-
let codigoVal = "00000";
|
|
13141
|
-
if (!!Obra?.DetalleChile?.codigo) {
|
|
13142
|
-
codigoVal = Obra?.DetalleChile?.codigo;
|
|
13143
|
-
}
|
|
13144
|
-
const newDto = new DetalleChileValorizacionMODTO();
|
|
13145
|
-
newDto.Codigo = codigoVal;
|
|
13146
|
-
newDto.CodigoCub = "";
|
|
13147
|
-
newDto.Linea = hashCode(ManoObraGlobal.Codigo), newDto.Especialidad = MOB.Especialidad;
|
|
13148
|
-
newDto.Actividad.Codigo = "CH0001";
|
|
13149
|
-
newDto.Actividad.Nombre = "ACTIVIDAD GENERAL";
|
|
13150
|
-
newDto.Clave.Codigo = "CH0001";
|
|
13151
|
-
newDto.Clave.Nombre = "CLAVE GENERAL";
|
|
13152
|
-
newDto.Tarea = "0000";
|
|
13153
|
-
newDto.ManoObra.Codigo = ManoObraGlobal.Codigo;
|
|
13154
|
-
newDto.ManoObra.Nombre = ManoObraGlobal.Actividad;
|
|
13155
|
-
newDto.ManoObra.UnidadMedida = ManoObraGlobal.Unidad.Nombre;
|
|
13156
|
-
newDto.UnidadObra.Codigo = "0";
|
|
13157
|
-
newDto.UnidadObra.Nombre = "SIN UO";
|
|
13158
|
-
newDto.UnidadObra.UnidadMedida = "UN";
|
|
13159
|
-
newDto.LineaCodigoCub = hashCode(ManoObraGlobal.Codigo) + "" + codigoVal;
|
|
13160
|
-
newDto.PuntoBaremo = MOB.PuntoBaremo;
|
|
13161
|
-
return newDto;
|
|
13162
|
-
}
|
|
13163
|
-
__name(generarModeloDetalleChile, "generarModeloDetalleChile");
|
|
13164
|
-
function hashCode(str = "") {
|
|
13165
|
-
let hash = 0;
|
|
13166
|
-
for (let i = 0; i < str.length; i++) {
|
|
13167
|
-
const char = str.charCodeAt(i);
|
|
13168
|
-
hash = (hash << 5) - hash + char;
|
|
13169
|
-
}
|
|
13170
|
-
return Math.abs(hash).toString();
|
|
13171
|
-
}
|
|
13172
|
-
__name(hashCode, "hashCode");
|
|
13173
|
-
|
|
13174
|
-
// src/Programados/Alemania/ObtenerMONoReservada/filtrarMONoReservada.ts
|
|
13175
|
-
function filtrarMONoReservada(params) {
|
|
13176
|
-
return params.ModelosAmap.reduce((acc, amap) => {
|
|
13177
|
-
const exist = params.ManoObra.Valorizacion.find((e) => e.DetalleChile.ManoObra.Codigo === amap.DetalleChile.ManoObra.Codigo);
|
|
13178
|
-
if (exist) return acc;
|
|
13179
|
-
return [
|
|
13180
|
-
...acc,
|
|
13181
|
-
amap
|
|
13182
|
-
];
|
|
13183
|
-
}, []);
|
|
13184
|
-
}
|
|
13185
|
-
__name(filtrarMONoReservada, "filtrarMONoReservada");
|
|
13186
|
-
|
|
13187
|
-
// src/Programados/Alemania/ObtenerMONoReservada/index.ts
|
|
13188
|
-
function ObtenerMONoReservada(params) {
|
|
13189
|
-
const { dataManoObraGlobal, dataPrecioEspecialidad, Obra, ManoObra } = params;
|
|
13190
|
-
const ModelosAmap = [];
|
|
13191
|
-
for (const ManoObraGlobal of dataManoObraGlobal) {
|
|
13192
|
-
for (const MOB of ManoObraGlobal.DetalleChile.ManoObraBaremo) {
|
|
13193
|
-
const matchPrecioEspecialidad = dataPrecioEspecialidad.filter((p) => p.Especialidad.Codigo === MOB.Especialidad.Codigo && p.ContratoOT.Codigo === ManoObraGlobal.ContratoOT.Codigo);
|
|
13194
|
-
if (matchPrecioEspecialidad.length !== 1) {
|
|
13195
|
-
console.warn(`No se pudo obtener Precio Especialidad para ManoObraGlobal: ${ManoObraGlobal.Codigo}, Codigo Especialidad: ${MOB.Especialidad.Codigo}`);
|
|
13196
|
-
continue;
|
|
13197
|
-
}
|
|
13198
|
-
const agencia = matchPrecioEspecialidad[0].Agencias.filter((e) => e.Codigo === Obra.DetalleChile.agencia);
|
|
13199
|
-
if (agencia.length !== 1) {
|
|
13200
|
-
console.warn(`No se pudo Obtener Agencia`);
|
|
13201
|
-
continue;
|
|
13202
|
-
}
|
|
13203
|
-
let contratista = [];
|
|
13204
|
-
if (!params.Trabajo.Ultima_asignacion.Empresa.Propia) {
|
|
13205
|
-
contratista = matchPrecioEspecialidad[0].Contratistas.filter((e) => e.Empresa.Codigo === params.Trabajo.Ultima_asignacion.Empresa.Codigo);
|
|
13206
|
-
if (contratista.length !== 1) {
|
|
13207
|
-
console.warn(`No se pudo Obtener Contratista`);
|
|
13208
|
-
continue;
|
|
13209
|
-
}
|
|
13210
|
-
}
|
|
13211
|
-
const newModelo = generarModeloAmap({
|
|
13212
|
-
ManoObraGlobal,
|
|
13213
|
-
MOB,
|
|
13214
|
-
Obra,
|
|
13215
|
-
PrecioEspecialidad: matchPrecioEspecialidad[0],
|
|
13216
|
-
Precio: agencia[0].Ultimo_Precio.Precio,
|
|
13217
|
-
contratista
|
|
13218
|
-
});
|
|
13219
|
-
ModelosAmap.push(newModelo);
|
|
13220
|
-
}
|
|
13221
|
-
}
|
|
13222
|
-
return filtrarMONoReservada({
|
|
13223
|
-
ModelosAmap,
|
|
13224
|
-
ManoObra
|
|
13225
|
-
});
|
|
13226
|
-
}
|
|
13227
|
-
__name(ObtenerMONoReservada, "ObtenerMONoReservada");
|
|
13228
|
-
|
|
13229
|
-
// src/Programados/Alemania/AL02/buildReservaMOJobMajorProjects.ts
|
|
13279
|
+
import { ValorizacionManoObraDTO as ValorizacionManoObraDTO3 } from "sigo-entities";
|
|
13230
13280
|
function buildReservaMOJobMajorProjectsAlemaniaAL02(dataMOG, priceContractorMOPropia, codigoMacroObras, ExceptionClass) {
|
|
13231
13281
|
return dataMOG.map((mog) => {
|
|
13232
13282
|
if (mog.DetalleChile.ManoObraBaremo.length !== 1) {
|
|
@@ -13241,7 +13291,7 @@ function buildReservaMOJobMajorProjectsAlemaniaAL02(dataMOG, priceContractorMOPr
|
|
|
13241
13291
|
Codigo: "C001",
|
|
13242
13292
|
Nombre: "CLAVE GENERAL"
|
|
13243
13293
|
};
|
|
13244
|
-
const reserva = new
|
|
13294
|
+
const reserva = new ValorizacionManoObraDTO3();
|
|
13245
13295
|
reserva.Amap = mog.Amap;
|
|
13246
13296
|
reserva.Codigo = mog.Codigo;
|
|
13247
13297
|
reserva.Descripcion = mog.Actividad;
|
|
@@ -16571,7 +16621,8 @@ var collections = {
|
|
|
16571
16621
|
CHILE_9512_ToaClaroRequestNumberTTL: "CHILE_9512_ToaClaroRequestNumberTTL",
|
|
16572
16622
|
CHILE_9512_ToaClaroOrderStock: "CHILE_9512_ToaClaroOrderStock",
|
|
16573
16623
|
PERU_9112_ToaOrderPreliquidacion: "PERU_9112_ToaOrderPreliquidacion",
|
|
16574
|
-
PERU_9112_ClienteWAOO: "PERU_9112_ClienteWAOO"
|
|
16624
|
+
PERU_9112_ClienteWAOO: "PERU_9112_ClienteWAOO",
|
|
16625
|
+
ALEMANIA_AL02_SomacylOrderStock: "ALEMANIA_AL02_SomacylOrderStock"
|
|
16575
16626
|
};
|
|
16576
16627
|
|
|
16577
16628
|
// src/v2/constants/db.ts
|
|
@@ -16632,6 +16683,7 @@ export {
|
|
|
16632
16683
|
buildDataMaterialsRule,
|
|
16633
16684
|
buildKeyMO,
|
|
16634
16685
|
buildReservaMOJobMajorProjectsAlemaniaAL02,
|
|
16686
|
+
buildReservaMOJobMajorProjectsAlemaniaAL04,
|
|
16635
16687
|
buildTenantCollectionName,
|
|
16636
16688
|
calcularTotalMaterialValorizacionPeru9112,
|
|
16637
16689
|
checkAndBuildMaterialsFromStock,
|