sigo-package 1.2.112 → 1.2.113
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 +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +195 -142
- package/dist/index.mjs +184 -132
- 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, PrecioContratistaMOAL02ENTITY, ManoObraGlobalENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY,
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, PrecioContratistaMOAL02ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, 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[];
|
|
@@ -182,6 +182,8 @@ declare function updatePricePBBudgetAlemaniaAL02(ManoObra: CodigoNombreUMDTO, Ca
|
|
|
182
182
|
TotMetrosAsfalto: number;
|
|
183
183
|
};
|
|
184
184
|
|
|
185
|
+
declare function buildReservaMOJobMajorProjectsAlemaniaAL02(dataMOG: ManoObraGlobalENTITY[], priceContractorMOPropia: PrecioContratistaMOAL02ENTITY, codigoMacroObras: string, ExceptionClass?: new (message?: string, messageSigo?: boolean) => Error): ValorizacionManoObraDTO[];
|
|
186
|
+
|
|
185
187
|
interface typeHPMOUtilizado {
|
|
186
188
|
ID_HPListMO: number;
|
|
187
189
|
CantidadUtilizado: number;
|
|
@@ -759,4 +761,4 @@ declare function getDBName({ pais, delegacion }: {
|
|
|
759
761
|
delegacion: CodigoNombreDTO;
|
|
760
762
|
}): string;
|
|
761
763
|
|
|
762
|
-
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, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, 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, 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 };
|
|
764
|
+
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, 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, PrecioContratistaMOAL02ENTITY, ManoObraGlobalENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY,
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, PrecioContratistaMOAL02ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, 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[];
|
|
@@ -182,6 +182,8 @@ declare function updatePricePBBudgetAlemaniaAL02(ManoObra: CodigoNombreUMDTO, Ca
|
|
|
182
182
|
TotMetrosAsfalto: number;
|
|
183
183
|
};
|
|
184
184
|
|
|
185
|
+
declare function buildReservaMOJobMajorProjectsAlemaniaAL02(dataMOG: ManoObraGlobalENTITY[], priceContractorMOPropia: PrecioContratistaMOAL02ENTITY, codigoMacroObras: string, ExceptionClass?: new (message?: string, messageSigo?: boolean) => Error): ValorizacionManoObraDTO[];
|
|
186
|
+
|
|
185
187
|
interface typeHPMOUtilizado {
|
|
186
188
|
ID_HPListMO: number;
|
|
187
189
|
CantidadUtilizado: number;
|
|
@@ -759,4 +761,4 @@ declare function getDBName({ pais, delegacion }: {
|
|
|
759
761
|
delegacion: CodigoNombreDTO;
|
|
760
762
|
}): string;
|
|
761
763
|
|
|
762
|
-
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, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, 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, 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 };
|
|
764
|
+
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, 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
|
@@ -65,6 +65,7 @@ __export(index_exports, {
|
|
|
65
65
|
buildDataMOFromMaterialRules: () => buildDataMOFromMaterialRules,
|
|
66
66
|
buildDataMaterialsRule: () => buildDataMaterialsRule,
|
|
67
67
|
buildKeyMO: () => buildKeyMO,
|
|
68
|
+
buildReservaMOJobMajorProjectsAlemaniaAL02: () => buildReservaMOJobMajorProjectsAlemaniaAL02,
|
|
68
69
|
buildTenantCollectionName: () => buildTenantCollectionName,
|
|
69
70
|
calcularTotalMaterialValorizacionPeru9112: () => calcularTotalMaterialValorizacionPeru9112,
|
|
70
71
|
checkAndBuildMaterialsFromStock: () => checkAndBuildMaterialsFromStock,
|
|
@@ -13242,6 +13243,189 @@ function updatePricePBBudgetAlemaniaAL02(ManoObra, Cantidad, priceContractorMO,
|
|
|
13242
13243
|
}
|
|
13243
13244
|
__name(updatePricePBBudgetAlemaniaAL02, "updatePricePBBudgetAlemaniaAL02");
|
|
13244
13245
|
|
|
13246
|
+
// src/Programados/Alemania/AL02/buildReservaMOJobMajorProjects.ts
|
|
13247
|
+
var import_sigo_entities2 = require("sigo-entities");
|
|
13248
|
+
|
|
13249
|
+
// src/Programados/Alemania/ObtenerMONoReservada/generarModeloAmap.ts
|
|
13250
|
+
var import_sigo_entities = require("sigo-entities");
|
|
13251
|
+
function generarModeloAmap(params) {
|
|
13252
|
+
const { ManoObraGlobal, Precio, PrecioEspecialidad } = params;
|
|
13253
|
+
const DetalleChile = generarModeloDetalleChile(params);
|
|
13254
|
+
const newAmap = new import_sigo_entities.ValorizacionManoObraDTO();
|
|
13255
|
+
newAmap.DetalleChile = DetalleChile;
|
|
13256
|
+
newAmap.Amap = ManoObraGlobal.Amap;
|
|
13257
|
+
newAmap.Codigo = ManoObraGlobal.Codigo;
|
|
13258
|
+
newAmap.Descripcion = ManoObraGlobal.Actividad;
|
|
13259
|
+
newAmap.Precio = Precio;
|
|
13260
|
+
newAmap.Total = newAmap.Precio * newAmap.Cantidad * newAmap.DetalleChile.PuntoBaremo;
|
|
13261
|
+
newAmap.Unidad = ManoObraGlobal.Unidad.Nombre;
|
|
13262
|
+
newAmap.Moneda = PrecioEspecialidad.Moneda;
|
|
13263
|
+
newAmap.Simbolo = PrecioEspecialidad.Simbolo;
|
|
13264
|
+
newAmap.Decimales = PrecioEspecialidad.Decimales;
|
|
13265
|
+
newAmap.WBE.CodigoWBE = "SIGPE";
|
|
13266
|
+
newAmap.CantidadUOAprobada = 1e-6;
|
|
13267
|
+
newAmap.DatosCatalogoMO = {
|
|
13268
|
+
DatosManoObraGlobal: {
|
|
13269
|
+
Actividad: ManoObraGlobal.Actividad,
|
|
13270
|
+
Alcance: ManoObraGlobal.Alcance,
|
|
13271
|
+
Material: ManoObraGlobal.Material,
|
|
13272
|
+
DetalleChile: ManoObraGlobal.DetalleChile
|
|
13273
|
+
},
|
|
13274
|
+
DatosPrecioEspecialidad: {
|
|
13275
|
+
Moneda: PrecioEspecialidad.Moneda,
|
|
13276
|
+
Simbolo: PrecioEspecialidad.Simbolo,
|
|
13277
|
+
Decimales: PrecioEspecialidad.Decimales,
|
|
13278
|
+
Agencias: PrecioEspecialidad.Agencias,
|
|
13279
|
+
Contratistas: params.contratista
|
|
13280
|
+
},
|
|
13281
|
+
DatosUnidadObraMaterial: {
|
|
13282
|
+
Codigo: "0",
|
|
13283
|
+
Descripcion: "SIN UO",
|
|
13284
|
+
Materiales: []
|
|
13285
|
+
}
|
|
13286
|
+
};
|
|
13287
|
+
return newAmap;
|
|
13288
|
+
}
|
|
13289
|
+
__name(generarModeloAmap, "generarModeloAmap");
|
|
13290
|
+
function generarModeloDetalleChile(params) {
|
|
13291
|
+
const { Obra, ManoObraGlobal, MOB } = params;
|
|
13292
|
+
let codigoVal = "00000";
|
|
13293
|
+
if (!!Obra?.DetalleChile?.codigo) {
|
|
13294
|
+
codigoVal = Obra?.DetalleChile?.codigo;
|
|
13295
|
+
}
|
|
13296
|
+
const newDto = new import_sigo_entities.DetalleChileValorizacionMODTO();
|
|
13297
|
+
newDto.Codigo = codigoVal;
|
|
13298
|
+
newDto.CodigoCub = "";
|
|
13299
|
+
newDto.Linea = hashCode(ManoObraGlobal.Codigo), newDto.Especialidad = MOB.Especialidad;
|
|
13300
|
+
newDto.Actividad.Codigo = "CH0001";
|
|
13301
|
+
newDto.Actividad.Nombre = "ACTIVIDAD GENERAL";
|
|
13302
|
+
newDto.Clave.Codigo = "CH0001";
|
|
13303
|
+
newDto.Clave.Nombre = "CLAVE GENERAL";
|
|
13304
|
+
newDto.Tarea = "0000";
|
|
13305
|
+
newDto.ManoObra.Codigo = ManoObraGlobal.Codigo;
|
|
13306
|
+
newDto.ManoObra.Nombre = ManoObraGlobal.Actividad;
|
|
13307
|
+
newDto.ManoObra.UnidadMedida = ManoObraGlobal.Unidad.Nombre;
|
|
13308
|
+
newDto.UnidadObra.Codigo = "0";
|
|
13309
|
+
newDto.UnidadObra.Nombre = "SIN UO";
|
|
13310
|
+
newDto.UnidadObra.UnidadMedida = "UN";
|
|
13311
|
+
newDto.LineaCodigoCub = hashCode(ManoObraGlobal.Codigo) + "" + codigoVal;
|
|
13312
|
+
newDto.PuntoBaremo = MOB.PuntoBaremo;
|
|
13313
|
+
return newDto;
|
|
13314
|
+
}
|
|
13315
|
+
__name(generarModeloDetalleChile, "generarModeloDetalleChile");
|
|
13316
|
+
function hashCode(str = "") {
|
|
13317
|
+
let hash = 0;
|
|
13318
|
+
for (let i = 0; i < str.length; i++) {
|
|
13319
|
+
const char = str.charCodeAt(i);
|
|
13320
|
+
hash = (hash << 5) - hash + char;
|
|
13321
|
+
}
|
|
13322
|
+
return Math.abs(hash).toString();
|
|
13323
|
+
}
|
|
13324
|
+
__name(hashCode, "hashCode");
|
|
13325
|
+
|
|
13326
|
+
// src/Programados/Alemania/ObtenerMONoReservada/filtrarMONoReservada.ts
|
|
13327
|
+
function filtrarMONoReservada(params) {
|
|
13328
|
+
return params.ModelosAmap.reduce((acc, amap) => {
|
|
13329
|
+
const exist = params.ManoObra.Valorizacion.find((e) => e.DetalleChile.ManoObra.Codigo === amap.DetalleChile.ManoObra.Codigo);
|
|
13330
|
+
if (exist) return acc;
|
|
13331
|
+
return [
|
|
13332
|
+
...acc,
|
|
13333
|
+
amap
|
|
13334
|
+
];
|
|
13335
|
+
}, []);
|
|
13336
|
+
}
|
|
13337
|
+
__name(filtrarMONoReservada, "filtrarMONoReservada");
|
|
13338
|
+
|
|
13339
|
+
// src/Programados/Alemania/ObtenerMONoReservada/index.ts
|
|
13340
|
+
function ObtenerMONoReservada(params) {
|
|
13341
|
+
const { dataManoObraGlobal, dataPrecioEspecialidad, Obra, ManoObra } = params;
|
|
13342
|
+
const ModelosAmap = [];
|
|
13343
|
+
for (const ManoObraGlobal of dataManoObraGlobal) {
|
|
13344
|
+
for (const MOB of ManoObraGlobal.DetalleChile.ManoObraBaremo) {
|
|
13345
|
+
const matchPrecioEspecialidad = dataPrecioEspecialidad.filter((p) => p.Especialidad.Codigo === MOB.Especialidad.Codigo && p.ContratoOT.Codigo === ManoObraGlobal.ContratoOT.Codigo);
|
|
13346
|
+
if (matchPrecioEspecialidad.length !== 1) {
|
|
13347
|
+
console.warn(`No se pudo obtener Precio Especialidad para ManoObraGlobal: ${ManoObraGlobal.Codigo}, Codigo Especialidad: ${MOB.Especialidad.Codigo}`);
|
|
13348
|
+
continue;
|
|
13349
|
+
}
|
|
13350
|
+
const agencia = matchPrecioEspecialidad[0].Agencias.filter((e) => e.Codigo === Obra.DetalleChile.agencia);
|
|
13351
|
+
if (agencia.length !== 1) {
|
|
13352
|
+
console.warn(`No se pudo Obtener Agencia`);
|
|
13353
|
+
continue;
|
|
13354
|
+
}
|
|
13355
|
+
let contratista = [];
|
|
13356
|
+
if (!params.Trabajo.Ultima_asignacion.Empresa.Propia) {
|
|
13357
|
+
contratista = matchPrecioEspecialidad[0].Contratistas.filter((e) => e.Empresa.Codigo === params.Trabajo.Ultima_asignacion.Empresa.Codigo);
|
|
13358
|
+
if (contratista.length !== 1) {
|
|
13359
|
+
console.warn(`No se pudo Obtener Contratista`);
|
|
13360
|
+
continue;
|
|
13361
|
+
}
|
|
13362
|
+
}
|
|
13363
|
+
const newModelo = generarModeloAmap({
|
|
13364
|
+
ManoObraGlobal,
|
|
13365
|
+
MOB,
|
|
13366
|
+
Obra,
|
|
13367
|
+
PrecioEspecialidad: matchPrecioEspecialidad[0],
|
|
13368
|
+
Precio: agencia[0].Ultimo_Precio.Precio,
|
|
13369
|
+
contratista
|
|
13370
|
+
});
|
|
13371
|
+
ModelosAmap.push(newModelo);
|
|
13372
|
+
}
|
|
13373
|
+
}
|
|
13374
|
+
return filtrarMONoReservada({
|
|
13375
|
+
ModelosAmap,
|
|
13376
|
+
ManoObra
|
|
13377
|
+
});
|
|
13378
|
+
}
|
|
13379
|
+
__name(ObtenerMONoReservada, "ObtenerMONoReservada");
|
|
13380
|
+
|
|
13381
|
+
// src/Programados/Alemania/AL02/buildReservaMOJobMajorProjects.ts
|
|
13382
|
+
function buildReservaMOJobMajorProjectsAlemaniaAL02(dataMOG, priceContractorMOPropia, codigoMacroObras, ExceptionClass) {
|
|
13383
|
+
return dataMOG.map((mog) => {
|
|
13384
|
+
if (mog.DetalleChile.ManoObraBaremo.length !== 1) {
|
|
13385
|
+
throw new Error(`No se pudo obtener especialidad para Codigo: ${mog.Codigo}`);
|
|
13386
|
+
}
|
|
13387
|
+
const especialidad = mog.DetalleChile.ManoObraBaremo[0].Especialidad;
|
|
13388
|
+
const actividad = {
|
|
13389
|
+
Codigo: "A",
|
|
13390
|
+
Nombre: "ACTIVIDAD GENERAL"
|
|
13391
|
+
};
|
|
13392
|
+
const clave = {
|
|
13393
|
+
Codigo: "C001",
|
|
13394
|
+
Nombre: "CLAVE GENERAL"
|
|
13395
|
+
};
|
|
13396
|
+
const reserva = new import_sigo_entities2.ValorizacionManoObraDTO();
|
|
13397
|
+
reserva.Amap = mog.Amap;
|
|
13398
|
+
reserva.Codigo = mog.Codigo;
|
|
13399
|
+
reserva.Descripcion = mog.Actividad;
|
|
13400
|
+
reserva.Unidad = mog.Unidad.Nombre;
|
|
13401
|
+
reserva.Moneda = priceContractorMOPropia.Moneda;
|
|
13402
|
+
reserva.DetalleChile.Codigo = hashCode(codigoMacroObras);
|
|
13403
|
+
reserva.DetalleChile.Linea = hashCode(mog.Codigo);
|
|
13404
|
+
reserva.DetalleChile.CodigoCub = reserva.DetalleChile.Codigo;
|
|
13405
|
+
reserva.DetalleChile.Especialidad = especialidad;
|
|
13406
|
+
reserva.DetalleChile.Actividad = actividad;
|
|
13407
|
+
reserva.DetalleChile.Clave = clave;
|
|
13408
|
+
reserva.DetalleChile.Tarea = "0000";
|
|
13409
|
+
reserva.DetalleChile.PuntoBaremo = mog.DetalleChile.ManoObraBaremo[0].PuntoBaremo;
|
|
13410
|
+
reserva.DetalleChile.ManoObra = {
|
|
13411
|
+
Codigo: mog.Codigo,
|
|
13412
|
+
Nombre: mog.Actividad,
|
|
13413
|
+
UnidadMedida: mog.Unidad.Nombre
|
|
13414
|
+
};
|
|
13415
|
+
reserva.DetalleChile.UnidadObra = {
|
|
13416
|
+
Codigo: "0",
|
|
13417
|
+
Nombre: "SIN UO",
|
|
13418
|
+
UnidadMedida: "UN"
|
|
13419
|
+
};
|
|
13420
|
+
reserva.DetalleChile.LineaCodigoCub = `${reserva.DetalleChile.Linea}${reserva.DetalleChile.CodigoCub}`;
|
|
13421
|
+
const { Precio, PuntoBaremo } = updatePricePBBudgetAlemaniaAL02(reserva.DetalleChile.ManoObra, reserva.Cantidad, priceContractorMOPropia, dataMOG, ExceptionClass);
|
|
13422
|
+
reserva.Precio = Precio;
|
|
13423
|
+
reserva.DetalleChile.PuntoBaremo = PuntoBaremo;
|
|
13424
|
+
return reserva;
|
|
13425
|
+
});
|
|
13426
|
+
}
|
|
13427
|
+
__name(buildReservaMOJobMajorProjectsAlemaniaAL02, "buildReservaMOJobMajorProjectsAlemaniaAL02");
|
|
13428
|
+
|
|
13245
13429
|
// src/Programados/Alemania/CalcularResumenHPMOLiquidado/index.ts
|
|
13246
13430
|
var CalcularResumenHPMOLiquidado = /* @__PURE__ */ __name((trabajo) => {
|
|
13247
13431
|
return trabajo.Ultima_PreLiquidacion.Valorizacion.reduce((acc, valorizacion) => {
|
|
@@ -13271,12 +13455,12 @@ var CalcularResumenHPMOLiquidado = /* @__PURE__ */ __name((trabajo) => {
|
|
|
13271
13455
|
}, "CalcularResumenHPMOLiquidado");
|
|
13272
13456
|
|
|
13273
13457
|
// src/Programados/Alemania/Models/DataFlujosHomePass.ts
|
|
13274
|
-
var
|
|
13458
|
+
var import_sigo_entities3 = require("sigo-entities");
|
|
13275
13459
|
var dataFlujosHomePass = [
|
|
13276
13460
|
{
|
|
13277
13461
|
Action: "Registrar",
|
|
13278
13462
|
Fecha: /* @__PURE__ */ new Date(),
|
|
13279
|
-
Usuario: new
|
|
13463
|
+
Usuario: new import_sigo_entities3.UsuarioDTO(),
|
|
13280
13464
|
Description: "Registrar",
|
|
13281
13465
|
Posicion: "1",
|
|
13282
13466
|
Icono: "fa fa-registered",
|
|
@@ -13289,7 +13473,7 @@ var dataFlujosHomePass = [
|
|
|
13289
13473
|
{
|
|
13290
13474
|
Action: "Aprobar",
|
|
13291
13475
|
Fecha: /* @__PURE__ */ new Date(),
|
|
13292
|
-
Usuario: new
|
|
13476
|
+
Usuario: new import_sigo_entities3.UsuarioDTO(),
|
|
13293
13477
|
Description: "Aprobar",
|
|
13294
13478
|
Posicion: "2",
|
|
13295
13479
|
Icono: "fa fa-check-square-o",
|
|
@@ -13302,7 +13486,7 @@ var dataFlujosHomePass = [
|
|
|
13302
13486
|
{
|
|
13303
13487
|
Action: "Eliminar",
|
|
13304
13488
|
Fecha: /* @__PURE__ */ new Date(),
|
|
13305
|
-
Usuario: new
|
|
13489
|
+
Usuario: new import_sigo_entities3.UsuarioDTO(),
|
|
13306
13490
|
Description: "Eliminar",
|
|
13307
13491
|
Posicion: "4",
|
|
13308
13492
|
Icono: "fa fa-times-circle",
|
|
@@ -14194,138 +14378,6 @@ function obtenerDocumentacionClientes({ codEspecialidades }) {
|
|
|
14194
14378
|
}
|
|
14195
14379
|
__name(obtenerDocumentacionClientes, "obtenerDocumentacionClientes");
|
|
14196
14380
|
|
|
14197
|
-
// src/Programados/Alemania/ObtenerMONoReservada/generarModeloAmap.ts
|
|
14198
|
-
var import_sigo_entities2 = require("sigo-entities");
|
|
14199
|
-
function generarModeloAmap(params) {
|
|
14200
|
-
const { ManoObraGlobal, Precio, PrecioEspecialidad } = params;
|
|
14201
|
-
const DetalleChile = generarModeloDetalleChile(params);
|
|
14202
|
-
const newAmap = new import_sigo_entities2.ValorizacionManoObraDTO();
|
|
14203
|
-
newAmap.DetalleChile = DetalleChile;
|
|
14204
|
-
newAmap.Amap = ManoObraGlobal.Amap;
|
|
14205
|
-
newAmap.Codigo = ManoObraGlobal.Codigo;
|
|
14206
|
-
newAmap.Descripcion = ManoObraGlobal.Actividad;
|
|
14207
|
-
newAmap.Precio = Precio;
|
|
14208
|
-
newAmap.Total = newAmap.Precio * newAmap.Cantidad * newAmap.DetalleChile.PuntoBaremo;
|
|
14209
|
-
newAmap.Unidad = ManoObraGlobal.Unidad.Nombre;
|
|
14210
|
-
newAmap.Moneda = PrecioEspecialidad.Moneda;
|
|
14211
|
-
newAmap.Simbolo = PrecioEspecialidad.Simbolo;
|
|
14212
|
-
newAmap.Decimales = PrecioEspecialidad.Decimales;
|
|
14213
|
-
newAmap.WBE.CodigoWBE = "SIGPE";
|
|
14214
|
-
newAmap.CantidadUOAprobada = 1e-6;
|
|
14215
|
-
newAmap.DatosCatalogoMO = {
|
|
14216
|
-
DatosManoObraGlobal: {
|
|
14217
|
-
Actividad: ManoObraGlobal.Actividad,
|
|
14218
|
-
Alcance: ManoObraGlobal.Alcance,
|
|
14219
|
-
Material: ManoObraGlobal.Material,
|
|
14220
|
-
DetalleChile: ManoObraGlobal.DetalleChile
|
|
14221
|
-
},
|
|
14222
|
-
DatosPrecioEspecialidad: {
|
|
14223
|
-
Moneda: PrecioEspecialidad.Moneda,
|
|
14224
|
-
Simbolo: PrecioEspecialidad.Simbolo,
|
|
14225
|
-
Decimales: PrecioEspecialidad.Decimales,
|
|
14226
|
-
Agencias: PrecioEspecialidad.Agencias,
|
|
14227
|
-
Contratistas: params.contratista
|
|
14228
|
-
},
|
|
14229
|
-
DatosUnidadObraMaterial: {
|
|
14230
|
-
Codigo: "0",
|
|
14231
|
-
Descripcion: "SIN UO",
|
|
14232
|
-
Materiales: []
|
|
14233
|
-
}
|
|
14234
|
-
};
|
|
14235
|
-
return newAmap;
|
|
14236
|
-
}
|
|
14237
|
-
__name(generarModeloAmap, "generarModeloAmap");
|
|
14238
|
-
function generarModeloDetalleChile(params) {
|
|
14239
|
-
const { Obra, ManoObraGlobal, MOB } = params;
|
|
14240
|
-
let codigoVal = "00000";
|
|
14241
|
-
if (!!Obra?.DetalleChile?.codigo) {
|
|
14242
|
-
codigoVal = Obra?.DetalleChile?.codigo;
|
|
14243
|
-
}
|
|
14244
|
-
const newDto = new import_sigo_entities2.DetalleChileValorizacionMODTO();
|
|
14245
|
-
newDto.Codigo = codigoVal;
|
|
14246
|
-
newDto.CodigoCub = "";
|
|
14247
|
-
newDto.Linea = hashCode(ManoObraGlobal.Codigo), newDto.Especialidad = MOB.Especialidad;
|
|
14248
|
-
newDto.Actividad.Codigo = "CH0001";
|
|
14249
|
-
newDto.Actividad.Nombre = "ACTIVIDAD GENERAL";
|
|
14250
|
-
newDto.Clave.Codigo = "CH0001";
|
|
14251
|
-
newDto.Clave.Nombre = "CLAVE GENERAL";
|
|
14252
|
-
newDto.Tarea = "0000";
|
|
14253
|
-
newDto.ManoObra.Codigo = ManoObraGlobal.Codigo;
|
|
14254
|
-
newDto.ManoObra.Nombre = ManoObraGlobal.Actividad;
|
|
14255
|
-
newDto.ManoObra.UnidadMedida = ManoObraGlobal.Unidad.Nombre;
|
|
14256
|
-
newDto.UnidadObra.Codigo = "0";
|
|
14257
|
-
newDto.UnidadObra.Nombre = "SIN UO";
|
|
14258
|
-
newDto.UnidadObra.UnidadMedida = "UN";
|
|
14259
|
-
newDto.LineaCodigoCub = hashCode(ManoObraGlobal.Codigo) + "" + codigoVal;
|
|
14260
|
-
newDto.PuntoBaremo = MOB.PuntoBaremo;
|
|
14261
|
-
return newDto;
|
|
14262
|
-
}
|
|
14263
|
-
__name(generarModeloDetalleChile, "generarModeloDetalleChile");
|
|
14264
|
-
function hashCode(str = "") {
|
|
14265
|
-
let hash = 0;
|
|
14266
|
-
for (let i = 0; i < str.length; i++) {
|
|
14267
|
-
const char = str.charCodeAt(i);
|
|
14268
|
-
hash = (hash << 5) - hash + char;
|
|
14269
|
-
}
|
|
14270
|
-
return Math.abs(hash).toString();
|
|
14271
|
-
}
|
|
14272
|
-
__name(hashCode, "hashCode");
|
|
14273
|
-
|
|
14274
|
-
// src/Programados/Alemania/ObtenerMONoReservada/filtrarMONoReservada.ts
|
|
14275
|
-
function filtrarMONoReservada(params) {
|
|
14276
|
-
return params.ModelosAmap.reduce((acc, amap) => {
|
|
14277
|
-
const exist = params.ManoObra.Valorizacion.find((e) => e.DetalleChile.ManoObra.Codigo === amap.DetalleChile.ManoObra.Codigo);
|
|
14278
|
-
if (exist) return acc;
|
|
14279
|
-
return [
|
|
14280
|
-
...acc,
|
|
14281
|
-
amap
|
|
14282
|
-
];
|
|
14283
|
-
}, []);
|
|
14284
|
-
}
|
|
14285
|
-
__name(filtrarMONoReservada, "filtrarMONoReservada");
|
|
14286
|
-
|
|
14287
|
-
// src/Programados/Alemania/ObtenerMONoReservada/index.ts
|
|
14288
|
-
function ObtenerMONoReservada(params) {
|
|
14289
|
-
const { dataManoObraGlobal, dataPrecioEspecialidad, Obra, ManoObra } = params;
|
|
14290
|
-
const ModelosAmap = [];
|
|
14291
|
-
for (const ManoObraGlobal of dataManoObraGlobal) {
|
|
14292
|
-
for (const MOB of ManoObraGlobal.DetalleChile.ManoObraBaremo) {
|
|
14293
|
-
const matchPrecioEspecialidad = dataPrecioEspecialidad.filter((p) => p.Especialidad.Codigo === MOB.Especialidad.Codigo && p.ContratoOT.Codigo === ManoObraGlobal.ContratoOT.Codigo);
|
|
14294
|
-
if (matchPrecioEspecialidad.length !== 1) {
|
|
14295
|
-
console.warn(`No se pudo obtener Precio Especialidad para ManoObraGlobal: ${ManoObraGlobal.Codigo}, Codigo Especialidad: ${MOB.Especialidad.Codigo}`);
|
|
14296
|
-
continue;
|
|
14297
|
-
}
|
|
14298
|
-
const agencia = matchPrecioEspecialidad[0].Agencias.filter((e) => e.Codigo === Obra.DetalleChile.agencia);
|
|
14299
|
-
if (agencia.length !== 1) {
|
|
14300
|
-
console.warn(`No se pudo Obtener Agencia`);
|
|
14301
|
-
continue;
|
|
14302
|
-
}
|
|
14303
|
-
let contratista = [];
|
|
14304
|
-
if (!params.Trabajo.Ultima_asignacion.Empresa.Propia) {
|
|
14305
|
-
contratista = matchPrecioEspecialidad[0].Contratistas.filter((e) => e.Empresa.Codigo === params.Trabajo.Ultima_asignacion.Empresa.Codigo);
|
|
14306
|
-
if (contratista.length !== 1) {
|
|
14307
|
-
console.warn(`No se pudo Obtener Contratista`);
|
|
14308
|
-
continue;
|
|
14309
|
-
}
|
|
14310
|
-
}
|
|
14311
|
-
const newModelo = generarModeloAmap({
|
|
14312
|
-
ManoObraGlobal,
|
|
14313
|
-
MOB,
|
|
14314
|
-
Obra,
|
|
14315
|
-
PrecioEspecialidad: matchPrecioEspecialidad[0],
|
|
14316
|
-
Precio: agencia[0].Ultimo_Precio.Precio,
|
|
14317
|
-
contratista
|
|
14318
|
-
});
|
|
14319
|
-
ModelosAmap.push(newModelo);
|
|
14320
|
-
}
|
|
14321
|
-
}
|
|
14322
|
-
return filtrarMONoReservada({
|
|
14323
|
-
ModelosAmap,
|
|
14324
|
-
ManoObra
|
|
14325
|
-
});
|
|
14326
|
-
}
|
|
14327
|
-
__name(ObtenerMONoReservada, "ObtenerMONoReservada");
|
|
14328
|
-
|
|
14329
14381
|
// src/Programados/Alemania/UpdateNodosDocDP/updateNodoAsfaltoRecursivo.ts
|
|
14330
14382
|
var updateNodoAsfaltoRecursivo = /* @__PURE__ */ __name((nodos, metros) => {
|
|
14331
14383
|
for (const nodo of nodos) {
|
|
@@ -15164,12 +15216,12 @@ var DocumentacionReplanteo = [
|
|
|
15164
15216
|
];
|
|
15165
15217
|
|
|
15166
15218
|
// src/Programados/Procesos/Modelos/ModelDataFlujosDocumentacionReplanteo.ts
|
|
15167
|
-
var
|
|
15219
|
+
var import_sigo_entities4 = require("sigo-entities");
|
|
15168
15220
|
var ModelDataFlujosDocumentacionReplanteo = [
|
|
15169
15221
|
{
|
|
15170
15222
|
Action: "Registrar",
|
|
15171
15223
|
Fecha: /* @__PURE__ */ new Date(),
|
|
15172
|
-
Usuario: new
|
|
15224
|
+
Usuario: new import_sigo_entities4.UsuarioDTO(),
|
|
15173
15225
|
Description: "Registrar",
|
|
15174
15226
|
Posicion: "1",
|
|
15175
15227
|
Icono: "fa fa-registered",
|
|
@@ -15182,7 +15234,7 @@ var ModelDataFlujosDocumentacionReplanteo = [
|
|
|
15182
15234
|
{
|
|
15183
15235
|
Action: "Aprobar",
|
|
15184
15236
|
Fecha: /* @__PURE__ */ new Date(),
|
|
15185
|
-
Usuario: new
|
|
15237
|
+
Usuario: new import_sigo_entities4.UsuarioDTO(),
|
|
15186
15238
|
Description: "Aprobar",
|
|
15187
15239
|
Posicion: "2",
|
|
15188
15240
|
Icono: "fa fa-check-circle",
|
|
@@ -15195,7 +15247,7 @@ var ModelDataFlujosDocumentacionReplanteo = [
|
|
|
15195
15247
|
{
|
|
15196
15248
|
Action: "Rechazar",
|
|
15197
15249
|
Fecha: /* @__PURE__ */ new Date(),
|
|
15198
|
-
Usuario: new
|
|
15250
|
+
Usuario: new import_sigo_entities4.UsuarioDTO(),
|
|
15199
15251
|
Description: "Rechazar",
|
|
15200
15252
|
Posicion: "3",
|
|
15201
15253
|
Icono: "fa fa-minus-circle",
|
|
@@ -15208,7 +15260,7 @@ var ModelDataFlujosDocumentacionReplanteo = [
|
|
|
15208
15260
|
{
|
|
15209
15261
|
Action: "Eliminar",
|
|
15210
15262
|
Fecha: /* @__PURE__ */ new Date(),
|
|
15211
|
-
Usuario: new
|
|
15263
|
+
Usuario: new import_sigo_entities4.UsuarioDTO(),
|
|
15212
15264
|
Description: "Eliminar",
|
|
15213
15265
|
Posicion: "4",
|
|
15214
15266
|
Icono: "fa fa-times-circle",
|
|
@@ -15221,7 +15273,7 @@ var ModelDataFlujosDocumentacionReplanteo = [
|
|
|
15221
15273
|
{
|
|
15222
15274
|
Action: "Descargar",
|
|
15223
15275
|
Fecha: /* @__PURE__ */ new Date(),
|
|
15224
|
-
Usuario: new
|
|
15276
|
+
Usuario: new import_sigo_entities4.UsuarioDTO(),
|
|
15225
15277
|
Description: "Descargar",
|
|
15226
15278
|
Posicion: "5",
|
|
15227
15279
|
Icono: "fa fa-arrow-circle-down",
|
|
@@ -15890,6 +15942,7 @@ __name(getDBName, "getDBName");
|
|
|
15890
15942
|
buildDataMOFromMaterialRules,
|
|
15891
15943
|
buildDataMaterialsRule,
|
|
15892
15944
|
buildKeyMO,
|
|
15945
|
+
buildReservaMOJobMajorProjectsAlemaniaAL02,
|
|
15893
15946
|
buildTenantCollectionName,
|
|
15894
15947
|
calcularTotalMaterialValorizacionPeru9112,
|
|
15895
15948
|
checkAndBuildMaterialsFromStock,
|
package/dist/index.mjs
CHANGED
|
@@ -13081,6 +13081,189 @@ function updatePricePBBudgetAlemaniaAL02(ManoObra, Cantidad, priceContractorMO,
|
|
|
13081
13081
|
}
|
|
13082
13082
|
__name(updatePricePBBudgetAlemaniaAL02, "updatePricePBBudgetAlemaniaAL02");
|
|
13083
13083
|
|
|
13084
|
+
// src/Programados/Alemania/AL02/buildReservaMOJobMajorProjects.ts
|
|
13085
|
+
import { ValorizacionManoObraDTO as ValorizacionManoObraDTO2 } from "sigo-entities";
|
|
13086
|
+
|
|
13087
|
+
// src/Programados/Alemania/ObtenerMONoReservada/generarModeloAmap.ts
|
|
13088
|
+
import { DetalleChileValorizacionMODTO, ValorizacionManoObraDTO } from "sigo-entities";
|
|
13089
|
+
function generarModeloAmap(params) {
|
|
13090
|
+
const { ManoObraGlobal, Precio, PrecioEspecialidad } = params;
|
|
13091
|
+
const DetalleChile = generarModeloDetalleChile(params);
|
|
13092
|
+
const newAmap = new ValorizacionManoObraDTO();
|
|
13093
|
+
newAmap.DetalleChile = DetalleChile;
|
|
13094
|
+
newAmap.Amap = ManoObraGlobal.Amap;
|
|
13095
|
+
newAmap.Codigo = ManoObraGlobal.Codigo;
|
|
13096
|
+
newAmap.Descripcion = ManoObraGlobal.Actividad;
|
|
13097
|
+
newAmap.Precio = Precio;
|
|
13098
|
+
newAmap.Total = newAmap.Precio * newAmap.Cantidad * newAmap.DetalleChile.PuntoBaremo;
|
|
13099
|
+
newAmap.Unidad = ManoObraGlobal.Unidad.Nombre;
|
|
13100
|
+
newAmap.Moneda = PrecioEspecialidad.Moneda;
|
|
13101
|
+
newAmap.Simbolo = PrecioEspecialidad.Simbolo;
|
|
13102
|
+
newAmap.Decimales = PrecioEspecialidad.Decimales;
|
|
13103
|
+
newAmap.WBE.CodigoWBE = "SIGPE";
|
|
13104
|
+
newAmap.CantidadUOAprobada = 1e-6;
|
|
13105
|
+
newAmap.DatosCatalogoMO = {
|
|
13106
|
+
DatosManoObraGlobal: {
|
|
13107
|
+
Actividad: ManoObraGlobal.Actividad,
|
|
13108
|
+
Alcance: ManoObraGlobal.Alcance,
|
|
13109
|
+
Material: ManoObraGlobal.Material,
|
|
13110
|
+
DetalleChile: ManoObraGlobal.DetalleChile
|
|
13111
|
+
},
|
|
13112
|
+
DatosPrecioEspecialidad: {
|
|
13113
|
+
Moneda: PrecioEspecialidad.Moneda,
|
|
13114
|
+
Simbolo: PrecioEspecialidad.Simbolo,
|
|
13115
|
+
Decimales: PrecioEspecialidad.Decimales,
|
|
13116
|
+
Agencias: PrecioEspecialidad.Agencias,
|
|
13117
|
+
Contratistas: params.contratista
|
|
13118
|
+
},
|
|
13119
|
+
DatosUnidadObraMaterial: {
|
|
13120
|
+
Codigo: "0",
|
|
13121
|
+
Descripcion: "SIN UO",
|
|
13122
|
+
Materiales: []
|
|
13123
|
+
}
|
|
13124
|
+
};
|
|
13125
|
+
return newAmap;
|
|
13126
|
+
}
|
|
13127
|
+
__name(generarModeloAmap, "generarModeloAmap");
|
|
13128
|
+
function generarModeloDetalleChile(params) {
|
|
13129
|
+
const { Obra, ManoObraGlobal, MOB } = params;
|
|
13130
|
+
let codigoVal = "00000";
|
|
13131
|
+
if (!!Obra?.DetalleChile?.codigo) {
|
|
13132
|
+
codigoVal = Obra?.DetalleChile?.codigo;
|
|
13133
|
+
}
|
|
13134
|
+
const newDto = new DetalleChileValorizacionMODTO();
|
|
13135
|
+
newDto.Codigo = codigoVal;
|
|
13136
|
+
newDto.CodigoCub = "";
|
|
13137
|
+
newDto.Linea = hashCode(ManoObraGlobal.Codigo), newDto.Especialidad = MOB.Especialidad;
|
|
13138
|
+
newDto.Actividad.Codigo = "CH0001";
|
|
13139
|
+
newDto.Actividad.Nombre = "ACTIVIDAD GENERAL";
|
|
13140
|
+
newDto.Clave.Codigo = "CH0001";
|
|
13141
|
+
newDto.Clave.Nombre = "CLAVE GENERAL";
|
|
13142
|
+
newDto.Tarea = "0000";
|
|
13143
|
+
newDto.ManoObra.Codigo = ManoObraGlobal.Codigo;
|
|
13144
|
+
newDto.ManoObra.Nombre = ManoObraGlobal.Actividad;
|
|
13145
|
+
newDto.ManoObra.UnidadMedida = ManoObraGlobal.Unidad.Nombre;
|
|
13146
|
+
newDto.UnidadObra.Codigo = "0";
|
|
13147
|
+
newDto.UnidadObra.Nombre = "SIN UO";
|
|
13148
|
+
newDto.UnidadObra.UnidadMedida = "UN";
|
|
13149
|
+
newDto.LineaCodigoCub = hashCode(ManoObraGlobal.Codigo) + "" + codigoVal;
|
|
13150
|
+
newDto.PuntoBaremo = MOB.PuntoBaremo;
|
|
13151
|
+
return newDto;
|
|
13152
|
+
}
|
|
13153
|
+
__name(generarModeloDetalleChile, "generarModeloDetalleChile");
|
|
13154
|
+
function hashCode(str = "") {
|
|
13155
|
+
let hash = 0;
|
|
13156
|
+
for (let i = 0; i < str.length; i++) {
|
|
13157
|
+
const char = str.charCodeAt(i);
|
|
13158
|
+
hash = (hash << 5) - hash + char;
|
|
13159
|
+
}
|
|
13160
|
+
return Math.abs(hash).toString();
|
|
13161
|
+
}
|
|
13162
|
+
__name(hashCode, "hashCode");
|
|
13163
|
+
|
|
13164
|
+
// src/Programados/Alemania/ObtenerMONoReservada/filtrarMONoReservada.ts
|
|
13165
|
+
function filtrarMONoReservada(params) {
|
|
13166
|
+
return params.ModelosAmap.reduce((acc, amap) => {
|
|
13167
|
+
const exist = params.ManoObra.Valorizacion.find((e) => e.DetalleChile.ManoObra.Codigo === amap.DetalleChile.ManoObra.Codigo);
|
|
13168
|
+
if (exist) return acc;
|
|
13169
|
+
return [
|
|
13170
|
+
...acc,
|
|
13171
|
+
amap
|
|
13172
|
+
];
|
|
13173
|
+
}, []);
|
|
13174
|
+
}
|
|
13175
|
+
__name(filtrarMONoReservada, "filtrarMONoReservada");
|
|
13176
|
+
|
|
13177
|
+
// src/Programados/Alemania/ObtenerMONoReservada/index.ts
|
|
13178
|
+
function ObtenerMONoReservada(params) {
|
|
13179
|
+
const { dataManoObraGlobal, dataPrecioEspecialidad, Obra, ManoObra } = params;
|
|
13180
|
+
const ModelosAmap = [];
|
|
13181
|
+
for (const ManoObraGlobal of dataManoObraGlobal) {
|
|
13182
|
+
for (const MOB of ManoObraGlobal.DetalleChile.ManoObraBaremo) {
|
|
13183
|
+
const matchPrecioEspecialidad = dataPrecioEspecialidad.filter((p) => p.Especialidad.Codigo === MOB.Especialidad.Codigo && p.ContratoOT.Codigo === ManoObraGlobal.ContratoOT.Codigo);
|
|
13184
|
+
if (matchPrecioEspecialidad.length !== 1) {
|
|
13185
|
+
console.warn(`No se pudo obtener Precio Especialidad para ManoObraGlobal: ${ManoObraGlobal.Codigo}, Codigo Especialidad: ${MOB.Especialidad.Codigo}`);
|
|
13186
|
+
continue;
|
|
13187
|
+
}
|
|
13188
|
+
const agencia = matchPrecioEspecialidad[0].Agencias.filter((e) => e.Codigo === Obra.DetalleChile.agencia);
|
|
13189
|
+
if (agencia.length !== 1) {
|
|
13190
|
+
console.warn(`No se pudo Obtener Agencia`);
|
|
13191
|
+
continue;
|
|
13192
|
+
}
|
|
13193
|
+
let contratista = [];
|
|
13194
|
+
if (!params.Trabajo.Ultima_asignacion.Empresa.Propia) {
|
|
13195
|
+
contratista = matchPrecioEspecialidad[0].Contratistas.filter((e) => e.Empresa.Codigo === params.Trabajo.Ultima_asignacion.Empresa.Codigo);
|
|
13196
|
+
if (contratista.length !== 1) {
|
|
13197
|
+
console.warn(`No se pudo Obtener Contratista`);
|
|
13198
|
+
continue;
|
|
13199
|
+
}
|
|
13200
|
+
}
|
|
13201
|
+
const newModelo = generarModeloAmap({
|
|
13202
|
+
ManoObraGlobal,
|
|
13203
|
+
MOB,
|
|
13204
|
+
Obra,
|
|
13205
|
+
PrecioEspecialidad: matchPrecioEspecialidad[0],
|
|
13206
|
+
Precio: agencia[0].Ultimo_Precio.Precio,
|
|
13207
|
+
contratista
|
|
13208
|
+
});
|
|
13209
|
+
ModelosAmap.push(newModelo);
|
|
13210
|
+
}
|
|
13211
|
+
}
|
|
13212
|
+
return filtrarMONoReservada({
|
|
13213
|
+
ModelosAmap,
|
|
13214
|
+
ManoObra
|
|
13215
|
+
});
|
|
13216
|
+
}
|
|
13217
|
+
__name(ObtenerMONoReservada, "ObtenerMONoReservada");
|
|
13218
|
+
|
|
13219
|
+
// src/Programados/Alemania/AL02/buildReservaMOJobMajorProjects.ts
|
|
13220
|
+
function buildReservaMOJobMajorProjectsAlemaniaAL02(dataMOG, priceContractorMOPropia, codigoMacroObras, ExceptionClass) {
|
|
13221
|
+
return dataMOG.map((mog) => {
|
|
13222
|
+
if (mog.DetalleChile.ManoObraBaremo.length !== 1) {
|
|
13223
|
+
throw new Error(`No se pudo obtener especialidad para Codigo: ${mog.Codigo}`);
|
|
13224
|
+
}
|
|
13225
|
+
const especialidad = mog.DetalleChile.ManoObraBaremo[0].Especialidad;
|
|
13226
|
+
const actividad = {
|
|
13227
|
+
Codigo: "A",
|
|
13228
|
+
Nombre: "ACTIVIDAD GENERAL"
|
|
13229
|
+
};
|
|
13230
|
+
const clave = {
|
|
13231
|
+
Codigo: "C001",
|
|
13232
|
+
Nombre: "CLAVE GENERAL"
|
|
13233
|
+
};
|
|
13234
|
+
const reserva = new ValorizacionManoObraDTO2();
|
|
13235
|
+
reserva.Amap = mog.Amap;
|
|
13236
|
+
reserva.Codigo = mog.Codigo;
|
|
13237
|
+
reserva.Descripcion = mog.Actividad;
|
|
13238
|
+
reserva.Unidad = mog.Unidad.Nombre;
|
|
13239
|
+
reserva.Moneda = priceContractorMOPropia.Moneda;
|
|
13240
|
+
reserva.DetalleChile.Codigo = hashCode(codigoMacroObras);
|
|
13241
|
+
reserva.DetalleChile.Linea = hashCode(mog.Codigo);
|
|
13242
|
+
reserva.DetalleChile.CodigoCub = reserva.DetalleChile.Codigo;
|
|
13243
|
+
reserva.DetalleChile.Especialidad = especialidad;
|
|
13244
|
+
reserva.DetalleChile.Actividad = actividad;
|
|
13245
|
+
reserva.DetalleChile.Clave = clave;
|
|
13246
|
+
reserva.DetalleChile.Tarea = "0000";
|
|
13247
|
+
reserva.DetalleChile.PuntoBaremo = mog.DetalleChile.ManoObraBaremo[0].PuntoBaremo;
|
|
13248
|
+
reserva.DetalleChile.ManoObra = {
|
|
13249
|
+
Codigo: mog.Codigo,
|
|
13250
|
+
Nombre: mog.Actividad,
|
|
13251
|
+
UnidadMedida: mog.Unidad.Nombre
|
|
13252
|
+
};
|
|
13253
|
+
reserva.DetalleChile.UnidadObra = {
|
|
13254
|
+
Codigo: "0",
|
|
13255
|
+
Nombre: "SIN UO",
|
|
13256
|
+
UnidadMedida: "UN"
|
|
13257
|
+
};
|
|
13258
|
+
reserva.DetalleChile.LineaCodigoCub = `${reserva.DetalleChile.Linea}${reserva.DetalleChile.CodigoCub}`;
|
|
13259
|
+
const { Precio, PuntoBaremo } = updatePricePBBudgetAlemaniaAL02(reserva.DetalleChile.ManoObra, reserva.Cantidad, priceContractorMOPropia, dataMOG, ExceptionClass);
|
|
13260
|
+
reserva.Precio = Precio;
|
|
13261
|
+
reserva.DetalleChile.PuntoBaremo = PuntoBaremo;
|
|
13262
|
+
return reserva;
|
|
13263
|
+
});
|
|
13264
|
+
}
|
|
13265
|
+
__name(buildReservaMOJobMajorProjectsAlemaniaAL02, "buildReservaMOJobMajorProjectsAlemaniaAL02");
|
|
13266
|
+
|
|
13084
13267
|
// src/Programados/Alemania/CalcularResumenHPMOLiquidado/index.ts
|
|
13085
13268
|
var CalcularResumenHPMOLiquidado = /* @__PURE__ */ __name((trabajo) => {
|
|
13086
13269
|
return trabajo.Ultima_PreLiquidacion.Valorizacion.reduce((acc, valorizacion) => {
|
|
@@ -14033,138 +14216,6 @@ function obtenerDocumentacionClientes({ codEspecialidades }) {
|
|
|
14033
14216
|
}
|
|
14034
14217
|
__name(obtenerDocumentacionClientes, "obtenerDocumentacionClientes");
|
|
14035
14218
|
|
|
14036
|
-
// src/Programados/Alemania/ObtenerMONoReservada/generarModeloAmap.ts
|
|
14037
|
-
import { DetalleChileValorizacionMODTO, ValorizacionManoObraDTO } from "sigo-entities";
|
|
14038
|
-
function generarModeloAmap(params) {
|
|
14039
|
-
const { ManoObraGlobal, Precio, PrecioEspecialidad } = params;
|
|
14040
|
-
const DetalleChile = generarModeloDetalleChile(params);
|
|
14041
|
-
const newAmap = new ValorizacionManoObraDTO();
|
|
14042
|
-
newAmap.DetalleChile = DetalleChile;
|
|
14043
|
-
newAmap.Amap = ManoObraGlobal.Amap;
|
|
14044
|
-
newAmap.Codigo = ManoObraGlobal.Codigo;
|
|
14045
|
-
newAmap.Descripcion = ManoObraGlobal.Actividad;
|
|
14046
|
-
newAmap.Precio = Precio;
|
|
14047
|
-
newAmap.Total = newAmap.Precio * newAmap.Cantidad * newAmap.DetalleChile.PuntoBaremo;
|
|
14048
|
-
newAmap.Unidad = ManoObraGlobal.Unidad.Nombre;
|
|
14049
|
-
newAmap.Moneda = PrecioEspecialidad.Moneda;
|
|
14050
|
-
newAmap.Simbolo = PrecioEspecialidad.Simbolo;
|
|
14051
|
-
newAmap.Decimales = PrecioEspecialidad.Decimales;
|
|
14052
|
-
newAmap.WBE.CodigoWBE = "SIGPE";
|
|
14053
|
-
newAmap.CantidadUOAprobada = 1e-6;
|
|
14054
|
-
newAmap.DatosCatalogoMO = {
|
|
14055
|
-
DatosManoObraGlobal: {
|
|
14056
|
-
Actividad: ManoObraGlobal.Actividad,
|
|
14057
|
-
Alcance: ManoObraGlobal.Alcance,
|
|
14058
|
-
Material: ManoObraGlobal.Material,
|
|
14059
|
-
DetalleChile: ManoObraGlobal.DetalleChile
|
|
14060
|
-
},
|
|
14061
|
-
DatosPrecioEspecialidad: {
|
|
14062
|
-
Moneda: PrecioEspecialidad.Moneda,
|
|
14063
|
-
Simbolo: PrecioEspecialidad.Simbolo,
|
|
14064
|
-
Decimales: PrecioEspecialidad.Decimales,
|
|
14065
|
-
Agencias: PrecioEspecialidad.Agencias,
|
|
14066
|
-
Contratistas: params.contratista
|
|
14067
|
-
},
|
|
14068
|
-
DatosUnidadObraMaterial: {
|
|
14069
|
-
Codigo: "0",
|
|
14070
|
-
Descripcion: "SIN UO",
|
|
14071
|
-
Materiales: []
|
|
14072
|
-
}
|
|
14073
|
-
};
|
|
14074
|
-
return newAmap;
|
|
14075
|
-
}
|
|
14076
|
-
__name(generarModeloAmap, "generarModeloAmap");
|
|
14077
|
-
function generarModeloDetalleChile(params) {
|
|
14078
|
-
const { Obra, ManoObraGlobal, MOB } = params;
|
|
14079
|
-
let codigoVal = "00000";
|
|
14080
|
-
if (!!Obra?.DetalleChile?.codigo) {
|
|
14081
|
-
codigoVal = Obra?.DetalleChile?.codigo;
|
|
14082
|
-
}
|
|
14083
|
-
const newDto = new DetalleChileValorizacionMODTO();
|
|
14084
|
-
newDto.Codigo = codigoVal;
|
|
14085
|
-
newDto.CodigoCub = "";
|
|
14086
|
-
newDto.Linea = hashCode(ManoObraGlobal.Codigo), newDto.Especialidad = MOB.Especialidad;
|
|
14087
|
-
newDto.Actividad.Codigo = "CH0001";
|
|
14088
|
-
newDto.Actividad.Nombre = "ACTIVIDAD GENERAL";
|
|
14089
|
-
newDto.Clave.Codigo = "CH0001";
|
|
14090
|
-
newDto.Clave.Nombre = "CLAVE GENERAL";
|
|
14091
|
-
newDto.Tarea = "0000";
|
|
14092
|
-
newDto.ManoObra.Codigo = ManoObraGlobal.Codigo;
|
|
14093
|
-
newDto.ManoObra.Nombre = ManoObraGlobal.Actividad;
|
|
14094
|
-
newDto.ManoObra.UnidadMedida = ManoObraGlobal.Unidad.Nombre;
|
|
14095
|
-
newDto.UnidadObra.Codigo = "0";
|
|
14096
|
-
newDto.UnidadObra.Nombre = "SIN UO";
|
|
14097
|
-
newDto.UnidadObra.UnidadMedida = "UN";
|
|
14098
|
-
newDto.LineaCodigoCub = hashCode(ManoObraGlobal.Codigo) + "" + codigoVal;
|
|
14099
|
-
newDto.PuntoBaremo = MOB.PuntoBaremo;
|
|
14100
|
-
return newDto;
|
|
14101
|
-
}
|
|
14102
|
-
__name(generarModeloDetalleChile, "generarModeloDetalleChile");
|
|
14103
|
-
function hashCode(str = "") {
|
|
14104
|
-
let hash = 0;
|
|
14105
|
-
for (let i = 0; i < str.length; i++) {
|
|
14106
|
-
const char = str.charCodeAt(i);
|
|
14107
|
-
hash = (hash << 5) - hash + char;
|
|
14108
|
-
}
|
|
14109
|
-
return Math.abs(hash).toString();
|
|
14110
|
-
}
|
|
14111
|
-
__name(hashCode, "hashCode");
|
|
14112
|
-
|
|
14113
|
-
// src/Programados/Alemania/ObtenerMONoReservada/filtrarMONoReservada.ts
|
|
14114
|
-
function filtrarMONoReservada(params) {
|
|
14115
|
-
return params.ModelosAmap.reduce((acc, amap) => {
|
|
14116
|
-
const exist = params.ManoObra.Valorizacion.find((e) => e.DetalleChile.ManoObra.Codigo === amap.DetalleChile.ManoObra.Codigo);
|
|
14117
|
-
if (exist) return acc;
|
|
14118
|
-
return [
|
|
14119
|
-
...acc,
|
|
14120
|
-
amap
|
|
14121
|
-
];
|
|
14122
|
-
}, []);
|
|
14123
|
-
}
|
|
14124
|
-
__name(filtrarMONoReservada, "filtrarMONoReservada");
|
|
14125
|
-
|
|
14126
|
-
// src/Programados/Alemania/ObtenerMONoReservada/index.ts
|
|
14127
|
-
function ObtenerMONoReservada(params) {
|
|
14128
|
-
const { dataManoObraGlobal, dataPrecioEspecialidad, Obra, ManoObra } = params;
|
|
14129
|
-
const ModelosAmap = [];
|
|
14130
|
-
for (const ManoObraGlobal of dataManoObraGlobal) {
|
|
14131
|
-
for (const MOB of ManoObraGlobal.DetalleChile.ManoObraBaremo) {
|
|
14132
|
-
const matchPrecioEspecialidad = dataPrecioEspecialidad.filter((p) => p.Especialidad.Codigo === MOB.Especialidad.Codigo && p.ContratoOT.Codigo === ManoObraGlobal.ContratoOT.Codigo);
|
|
14133
|
-
if (matchPrecioEspecialidad.length !== 1) {
|
|
14134
|
-
console.warn(`No se pudo obtener Precio Especialidad para ManoObraGlobal: ${ManoObraGlobal.Codigo}, Codigo Especialidad: ${MOB.Especialidad.Codigo}`);
|
|
14135
|
-
continue;
|
|
14136
|
-
}
|
|
14137
|
-
const agencia = matchPrecioEspecialidad[0].Agencias.filter((e) => e.Codigo === Obra.DetalleChile.agencia);
|
|
14138
|
-
if (agencia.length !== 1) {
|
|
14139
|
-
console.warn(`No se pudo Obtener Agencia`);
|
|
14140
|
-
continue;
|
|
14141
|
-
}
|
|
14142
|
-
let contratista = [];
|
|
14143
|
-
if (!params.Trabajo.Ultima_asignacion.Empresa.Propia) {
|
|
14144
|
-
contratista = matchPrecioEspecialidad[0].Contratistas.filter((e) => e.Empresa.Codigo === params.Trabajo.Ultima_asignacion.Empresa.Codigo);
|
|
14145
|
-
if (contratista.length !== 1) {
|
|
14146
|
-
console.warn(`No se pudo Obtener Contratista`);
|
|
14147
|
-
continue;
|
|
14148
|
-
}
|
|
14149
|
-
}
|
|
14150
|
-
const newModelo = generarModeloAmap({
|
|
14151
|
-
ManoObraGlobal,
|
|
14152
|
-
MOB,
|
|
14153
|
-
Obra,
|
|
14154
|
-
PrecioEspecialidad: matchPrecioEspecialidad[0],
|
|
14155
|
-
Precio: agencia[0].Ultimo_Precio.Precio,
|
|
14156
|
-
contratista
|
|
14157
|
-
});
|
|
14158
|
-
ModelosAmap.push(newModelo);
|
|
14159
|
-
}
|
|
14160
|
-
}
|
|
14161
|
-
return filtrarMONoReservada({
|
|
14162
|
-
ModelosAmap,
|
|
14163
|
-
ManoObra
|
|
14164
|
-
});
|
|
14165
|
-
}
|
|
14166
|
-
__name(ObtenerMONoReservada, "ObtenerMONoReservada");
|
|
14167
|
-
|
|
14168
14219
|
// src/Programados/Alemania/UpdateNodosDocDP/updateNodoAsfaltoRecursivo.ts
|
|
14169
14220
|
var updateNodoAsfaltoRecursivo = /* @__PURE__ */ __name((nodos, metros) => {
|
|
14170
14221
|
for (const nodo of nodos) {
|
|
@@ -15728,6 +15779,7 @@ export {
|
|
|
15728
15779
|
buildDataMOFromMaterialRules,
|
|
15729
15780
|
buildDataMaterialsRule,
|
|
15730
15781
|
buildKeyMO,
|
|
15782
|
+
buildReservaMOJobMajorProjectsAlemaniaAL02,
|
|
15731
15783
|
buildTenantCollectionName,
|
|
15732
15784
|
calcularTotalMaterialValorizacionPeru9112,
|
|
15733
15785
|
checkAndBuildMaterialsFromStock,
|