sigo-package 1.2.0 → 1.2.1
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 +37 -0
- package/dist/index.mjs +36 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ManoObraENTITY, ReservaENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, ManoObraGlobalENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, ValorizacionManoObraDTO, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY } from 'sigo-entities';
|
|
1
|
+
import { ManoObraENTITY, ReservaENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, ManoObraGlobalENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, ValorizacionManoObraDTO, ValorizacionDTO, PrecioContratistaMOAL02ENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY } from 'sigo-entities';
|
|
2
2
|
|
|
3
3
|
interface IenvSIGO$1 {
|
|
4
4
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
@@ -263,6 +263,8 @@ type ReglaSoplado = {
|
|
|
263
263
|
declare const mapaReglaSopladoTroncal: Map<string, ReglaSoplado[]>;
|
|
264
264
|
declare const mapaReglaSopladoClientes: Map<string, ReglaSoplado[]>;
|
|
265
265
|
|
|
266
|
+
declare function updatePriceContractorMO(valorizaciones: Pick<ValorizacionDTO, 'Ultimo_Estado_Interno' | 'DetalleChile' | 'PrecioContrata'>[], priceContractorMO: Pick<PrecioContratistaMOAL02ENTITY, 'ManoObraGlobal' | 'Empresa'>): void;
|
|
267
|
+
|
|
266
268
|
declare const CalcularResumenLiquidaciones: Funcion$1;
|
|
267
269
|
interface Funcion$1 {
|
|
268
270
|
(trabajo: TrabajoType, trabajos: any[]): ResumenLiquidacionesTypeChile;
|
|
@@ -435,4 +437,4 @@ declare function getDateInTimeZone(timeZone: TimeZone): Date;
|
|
|
435
437
|
|
|
436
438
|
declare function generateUniqueNumber(): number;
|
|
437
439
|
|
|
438
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, GetCodigoFechaActual, type IDocumentacion, type IMO, type IMaterial, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$1 as MatStockPersonalType, type MatUtilizadosType$1 as MatUtilizadosType, type MoUoType$1 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, SEGMENT_TY, type TARGET, UpdateNodosDocDP, codBalizaAL04, codClientes, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, convertDates, dataFlujosHomePass, esCadenaFechaISOValida, esObjetoFecha, generateUniqueNumber, getChannelName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, paisMap, searchCurrentContractorSpecialtyPrice, validateNoLookup };
|
|
440
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, GetCodigoFechaActual, type IDocumentacion, type IMO, type IMaterial, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$1 as MatStockPersonalType, type MatUtilizadosType$1 as MatUtilizadosType, type MoUoType$1 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, SEGMENT_TY, type TARGET, UpdateNodosDocDP, codBalizaAL04, codClientes, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, convertDates, dataFlujosHomePass, esCadenaFechaISOValida, esObjetoFecha, generateUniqueNumber, getChannelName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, paisMap, searchCurrentContractorSpecialtyPrice, updatePriceContractorMO, validateNoLookup };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ManoObraENTITY, ReservaENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, ManoObraGlobalENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, ValorizacionManoObraDTO, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY } from 'sigo-entities';
|
|
1
|
+
import { ManoObraENTITY, ReservaENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, ManoObraGlobalENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, ValorizacionManoObraDTO, ValorizacionDTO, PrecioContratistaMOAL02ENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY } from 'sigo-entities';
|
|
2
2
|
|
|
3
3
|
interface IenvSIGO$1 {
|
|
4
4
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
@@ -263,6 +263,8 @@ type ReglaSoplado = {
|
|
|
263
263
|
declare const mapaReglaSopladoTroncal: Map<string, ReglaSoplado[]>;
|
|
264
264
|
declare const mapaReglaSopladoClientes: Map<string, ReglaSoplado[]>;
|
|
265
265
|
|
|
266
|
+
declare function updatePriceContractorMO(valorizaciones: Pick<ValorizacionDTO, 'Ultimo_Estado_Interno' | 'DetalleChile' | 'PrecioContrata'>[], priceContractorMO: Pick<PrecioContratistaMOAL02ENTITY, 'ManoObraGlobal' | 'Empresa'>): void;
|
|
267
|
+
|
|
266
268
|
declare const CalcularResumenLiquidaciones: Funcion$1;
|
|
267
269
|
interface Funcion$1 {
|
|
268
270
|
(trabajo: TrabajoType, trabajos: any[]): ResumenLiquidacionesTypeChile;
|
|
@@ -435,4 +437,4 @@ declare function getDateInTimeZone(timeZone: TimeZone): Date;
|
|
|
435
437
|
|
|
436
438
|
declare function generateUniqueNumber(): number;
|
|
437
439
|
|
|
438
|
-
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, GetCodigoFechaActual, type IDocumentacion, type IMO, type IMaterial, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$1 as MatStockPersonalType, type MatUtilizadosType$1 as MatUtilizadosType, type MoUoType$1 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, SEGMENT_TY, type TARGET, UpdateNodosDocDP, codBalizaAL04, codClientes, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, convertDates, dataFlujosHomePass, esCadenaFechaISOValida, esObjetoFecha, generateUniqueNumber, getChannelName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, paisMap, searchCurrentContractorSpecialtyPrice, validateNoLookup };
|
|
440
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, GetCodigoFechaActual, type IDocumentacion, type IMO, type IMaterial, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$1 as MatStockPersonalType, type MatUtilizadosType$1 as MatUtilizadosType, type MoUoType$1 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, SEGMENT_TY, type TARGET, UpdateNodosDocDP, codBalizaAL04, codClientes, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, convertDates, dataFlujosHomePass, esCadenaFechaISOValida, esObjetoFecha, generateUniqueNumber, getChannelName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getQueueName, getQueueNameSaveOneNotification, isValidDate, isValidPartialEntity, logTiempoProceso, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, paisMap, searchCurrentContractorSpecialtyPrice, updatePriceContractorMO, validateNoLookup };
|
package/dist/index.js
CHANGED
|
@@ -95,6 +95,7 @@ __export(index_exports, {
|
|
|
95
95
|
obtenerDocumentacionNoClientes: () => obtenerDocumentacionNoClientes,
|
|
96
96
|
paisMap: () => paisMap,
|
|
97
97
|
searchCurrentContractorSpecialtyPrice: () => searchCurrentContractorSpecialtyPrice,
|
|
98
|
+
updatePriceContractorMO: () => updatePriceContractorMO,
|
|
98
99
|
validateNoLookup: () => validateNoLookup
|
|
99
100
|
});
|
|
100
101
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -5276,6 +5277,41 @@ var mapaReglaSopladoClientes = /* @__PURE__ */ new Map([
|
|
|
5276
5277
|
]
|
|
5277
5278
|
]);
|
|
5278
5279
|
|
|
5280
|
+
// src/Programados/Alemania/updatePriceContractorMO.ts
|
|
5281
|
+
var SwitchTipo = {
|
|
5282
|
+
"T": "Asphalt",
|
|
5283
|
+
"F": "Trenching"
|
|
5284
|
+
};
|
|
5285
|
+
function updatePriceContractorMO(valorizaciones, priceContractorMO) {
|
|
5286
|
+
for (const valorizacion of valorizaciones) {
|
|
5287
|
+
if (valorizacion.Ultimo_Estado_Interno.Descripcion === "PRODUCCION") continue;
|
|
5288
|
+
let CodigoMO = valorizacion.DetalleChile.ManoObra.Codigo;
|
|
5289
|
+
let TipoMO = null;
|
|
5290
|
+
if (CodigoMO.includes("_")) {
|
|
5291
|
+
const letraTipo = CodigoMO.split("_")[0].slice(0, 1);
|
|
5292
|
+
TipoMO = SwitchTipo[letraTipo];
|
|
5293
|
+
if (!TipoMO) {
|
|
5294
|
+
throw new Error(`No se pudo encontrar clave para la letra '${letraTipo}' en SwitchTipo`);
|
|
5295
|
+
}
|
|
5296
|
+
CodigoMO = CodigoMO.split("_")[1];
|
|
5297
|
+
}
|
|
5298
|
+
var precioContratista = priceContractorMO.ManoObraGlobal.filter((e) => e.Codigo === CodigoMO && e.Estado.ID_Estado === 1);
|
|
5299
|
+
if (precioContratista.length !== 1) {
|
|
5300
|
+
throw new Error(`Hay ${precioContratista.length} resultados para precioContratista cod empresa: '${priceContractorMO.Empresa.Codigo}', cod mo: '${CodigoMO}'`);
|
|
5301
|
+
}
|
|
5302
|
+
if (TipoMO !== null) {
|
|
5303
|
+
var precio = precioContratista[0].TipoMO.find((e) => e.Tipo === TipoMO);
|
|
5304
|
+
if (precio === void 0) {
|
|
5305
|
+
throw new Error(`No hay precioContratista cod empresa: '${priceContractorMO.Empresa.Codigo}', cod mo: '${CodigoMO}', TipoMO: '${TipoMO}'`);
|
|
5306
|
+
}
|
|
5307
|
+
valorizacion.PrecioContrata = precio.Precio;
|
|
5308
|
+
} else {
|
|
5309
|
+
valorizacion.PrecioContrata = precioContratista[0].Precio;
|
|
5310
|
+
}
|
|
5311
|
+
}
|
|
5312
|
+
}
|
|
5313
|
+
__name(updatePriceContractorMO, "updatePriceContractorMO");
|
|
5314
|
+
|
|
5279
5315
|
// src/Programados/BuscarZonaContratista.ts
|
|
5280
5316
|
function BuscarZonaContratista(EmpresaContratistaEnPrecioEspecialidad, Obra, ZonaAsignada) {
|
|
5281
5317
|
const zonaSearchMapping = {
|
|
@@ -5853,5 +5889,6 @@ __name(searchCurrentContractorSpecialtyPrice, "searchCurrentContractorSpecialtyP
|
|
|
5853
5889
|
obtenerDocumentacionNoClientes,
|
|
5854
5890
|
paisMap,
|
|
5855
5891
|
searchCurrentContractorSpecialtyPrice,
|
|
5892
|
+
updatePriceContractorMO,
|
|
5856
5893
|
validateNoLookup
|
|
5857
5894
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -5180,6 +5180,41 @@ var mapaReglaSopladoClientes = /* @__PURE__ */ new Map([
|
|
|
5180
5180
|
]
|
|
5181
5181
|
]);
|
|
5182
5182
|
|
|
5183
|
+
// src/Programados/Alemania/updatePriceContractorMO.ts
|
|
5184
|
+
var SwitchTipo = {
|
|
5185
|
+
"T": "Asphalt",
|
|
5186
|
+
"F": "Trenching"
|
|
5187
|
+
};
|
|
5188
|
+
function updatePriceContractorMO(valorizaciones, priceContractorMO) {
|
|
5189
|
+
for (const valorizacion of valorizaciones) {
|
|
5190
|
+
if (valorizacion.Ultimo_Estado_Interno.Descripcion === "PRODUCCION") continue;
|
|
5191
|
+
let CodigoMO = valorizacion.DetalleChile.ManoObra.Codigo;
|
|
5192
|
+
let TipoMO = null;
|
|
5193
|
+
if (CodigoMO.includes("_")) {
|
|
5194
|
+
const letraTipo = CodigoMO.split("_")[0].slice(0, 1);
|
|
5195
|
+
TipoMO = SwitchTipo[letraTipo];
|
|
5196
|
+
if (!TipoMO) {
|
|
5197
|
+
throw new Error(`No se pudo encontrar clave para la letra '${letraTipo}' en SwitchTipo`);
|
|
5198
|
+
}
|
|
5199
|
+
CodigoMO = CodigoMO.split("_")[1];
|
|
5200
|
+
}
|
|
5201
|
+
var precioContratista = priceContractorMO.ManoObraGlobal.filter((e) => e.Codigo === CodigoMO && e.Estado.ID_Estado === 1);
|
|
5202
|
+
if (precioContratista.length !== 1) {
|
|
5203
|
+
throw new Error(`Hay ${precioContratista.length} resultados para precioContratista cod empresa: '${priceContractorMO.Empresa.Codigo}', cod mo: '${CodigoMO}'`);
|
|
5204
|
+
}
|
|
5205
|
+
if (TipoMO !== null) {
|
|
5206
|
+
var precio = precioContratista[0].TipoMO.find((e) => e.Tipo === TipoMO);
|
|
5207
|
+
if (precio === void 0) {
|
|
5208
|
+
throw new Error(`No hay precioContratista cod empresa: '${priceContractorMO.Empresa.Codigo}', cod mo: '${CodigoMO}', TipoMO: '${TipoMO}'`);
|
|
5209
|
+
}
|
|
5210
|
+
valorizacion.PrecioContrata = precio.Precio;
|
|
5211
|
+
} else {
|
|
5212
|
+
valorizacion.PrecioContrata = precioContratista[0].Precio;
|
|
5213
|
+
}
|
|
5214
|
+
}
|
|
5215
|
+
}
|
|
5216
|
+
__name(updatePriceContractorMO, "updatePriceContractorMO");
|
|
5217
|
+
|
|
5183
5218
|
// src/Programados/BuscarZonaContratista.ts
|
|
5184
5219
|
function BuscarZonaContratista(EmpresaContratistaEnPrecioEspecialidad, Obra, ZonaAsignada) {
|
|
5185
5220
|
const zonaSearchMapping = {
|
|
@@ -5756,5 +5791,6 @@ export {
|
|
|
5756
5791
|
obtenerDocumentacionNoClientes,
|
|
5757
5792
|
paisMap,
|
|
5758
5793
|
searchCurrentContractorSpecialtyPrice,
|
|
5794
|
+
updatePriceContractorMO,
|
|
5759
5795
|
validateNoLookup
|
|
5760
5796
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sigo-package",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Funciones compartidas sigo",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
"typescript": "^5.7.3"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"sigo-entities": "^1.0.
|
|
23
|
+
"sigo-entities": "^1.0.54"
|
|
24
24
|
}
|
|
25
25
|
}
|