commit
39808dca34
@ -0,0 +1,12 @@ |
|||||||
|
{ |
||||||
|
"version": 1, |
||||||
|
"isRoot": true, |
||||||
|
"tools": { |
||||||
|
"csharpier": { |
||||||
|
"version": "0.21.0", |
||||||
|
"commands": [ |
||||||
|
"dotnet-csharpier" |
||||||
|
] |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,31 @@ |
|||||||
|
{ |
||||||
|
"version": "0.2.0", |
||||||
|
"configurations": [ |
||||||
|
{ |
||||||
|
"name": ".NET Core Launch (web)", |
||||||
|
"type": "coreclr", |
||||||
|
"request": "launch", |
||||||
|
"preLaunchTask": "build", |
||||||
|
"program": "${workspaceFolder}/bin/Debug/net7.0/CORRESPONSALBackend.dll", |
||||||
|
"args": [], |
||||||
|
"cwd": "${workspaceFolder}", |
||||||
|
"stopAtEntry": false, |
||||||
|
"serverReadyAction": { |
||||||
|
"action": "openExternally", |
||||||
|
"pattern": "\\bNow listening on:\\s+https?://\\S+", |
||||||
|
"uriFormat": "https://localhost:5051/swagger/index.html" |
||||||
|
}, |
||||||
|
"env": { |
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development" |
||||||
|
}, |
||||||
|
"sourceFileMap": { |
||||||
|
"/Views": "${workspaceFolder}/Views" |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": ".NET Core Attach", |
||||||
|
"type": "coreclr", |
||||||
|
"request": "attach" |
||||||
|
} |
||||||
|
] |
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
{ |
||||||
|
"workbench.colorCustomizations": { |
||||||
|
"titleBar.border": "#ff0000", |
||||||
|
/* "titleBar.activeForeground": "#fbfcff", |
||||||
|
"titleBar.inactiveForeground": "#b4c0e8cc", |
||||||
|
"titleBar.activeBackground": "#06660e", |
||||||
|
"titleBar.inactiveBackground": "#25eb77cc", */ |
||||||
|
/* "activityBar.activeBackground": "#25eb77cc", |
||||||
|
"activityBar.background": "#06660e", |
||||||
|
"activityBar.foreground": "#86b0da", |
||||||
|
"activityBar.inactiveForeground": "#7ea9d3", */ |
||||||
|
"sideBar.background": "#011105", |
||||||
|
"list.hoverBackground": "#3c5866" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,103 @@ |
|||||||
|
{ |
||||||
|
"version": "2.0.0", |
||||||
|
"tasks": [ |
||||||
|
{ |
||||||
|
"label": "build", |
||||||
|
"command": "dotnet", |
||||||
|
"type": "process", |
||||||
|
"args": [ |
||||||
|
"build", |
||||||
|
"${workspaceFolder}/CORRESPONSALBackend.csproj", |
||||||
|
"/property:GenerateFullPaths=true", |
||||||
|
"/consoleloggerparameters:NoSummary" |
||||||
|
], |
||||||
|
"problemMatcher": "$msCompile" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"label": "publish", |
||||||
|
"command": "dotnet", |
||||||
|
"type": "process", |
||||||
|
"args": [ |
||||||
|
"publish", |
||||||
|
"${workspaceFolder}/CORRESPONSALBackend.csproj", |
||||||
|
"/property:GenerateFullPaths=true", |
||||||
|
"/consoleloggerparameters:NoSummary" |
||||||
|
], |
||||||
|
"problemMatcher": "$msCompile" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"label": "watch", |
||||||
|
"command": "dotnet", |
||||||
|
"type": "process", |
||||||
|
"args": [ |
||||||
|
"watch", |
||||||
|
"run", |
||||||
|
"--project", |
||||||
|
"${workspaceFolder}/CORRESPONSALBackend.csproj" |
||||||
|
], |
||||||
|
"problemMatcher": "$msCompile" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"label": "publish for PRODUCTION", |
||||||
|
"command": "dotnet", |
||||||
|
"type": "process", |
||||||
|
"args": [ |
||||||
|
"publish", |
||||||
|
"/property:Configuration=Release", |
||||||
|
"/property:EnvironmentName=Production", |
||||||
|
"${workspaceFolder}/CORRESPONSALBackend.csproj", |
||||||
|
"/property:GenerateFullPaths=true", |
||||||
|
"/consoleloggerparameters:NoSummary" |
||||||
|
], |
||||||
|
"presentation": { |
||||||
|
"echo": true, |
||||||
|
"reveal": "always", |
||||||
|
"focus": false, |
||||||
|
"panel": "shared", |
||||||
|
"showReuseMessage": true, |
||||||
|
"clear": false, |
||||||
|
"close": true |
||||||
|
}, |
||||||
|
"problemMatcher": "$msCompile" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"label": "publish for QA", |
||||||
|
"command": "dotnet", |
||||||
|
"type": "process", |
||||||
|
"args": [ |
||||||
|
"publish", |
||||||
|
"/property:Configuration=Release", |
||||||
|
"/property:EnvironmentName=Staging", |
||||||
|
"${workspaceFolder}/CORRESPONSALBackend.csproj", |
||||||
|
"/property:GenerateFullPaths=true", |
||||||
|
"/consoleloggerparameters:NoSummary" |
||||||
|
], |
||||||
|
"presentation": { |
||||||
|
"echo": true, |
||||||
|
"reveal": "always", |
||||||
|
"focus": false, |
||||||
|
"panel": "shared", |
||||||
|
"showReuseMessage": true, |
||||||
|
"clear": false, |
||||||
|
"close": true |
||||||
|
}, |
||||||
|
"problemMatcher": "$msCompile" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"label": "Clean & Build", |
||||||
|
"command": "dotnet clean; dotnet build", |
||||||
|
"type": "shell", |
||||||
|
"args": [ ], |
||||||
|
"presentation": { |
||||||
|
"echo": true, |
||||||
|
"reveal": "always", |
||||||
|
"focus": false, |
||||||
|
"panel": "shared", |
||||||
|
"showReuseMessage": true, |
||||||
|
"clear": false, |
||||||
|
"close": true |
||||||
|
}, |
||||||
|
"problemMatcher": "$msCompile" |
||||||
|
} |
||||||
|
] |
||||||
|
} |
@ -0,0 +1,18 @@ |
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web"> |
||||||
|
|
||||||
|
<PropertyGroup> |
||||||
|
<TargetFramework>net7.0</TargetFramework> |
||||||
|
<Nullable>enable</Nullable> |
||||||
|
<ImplicitUsings>enable</ImplicitUsings> |
||||||
|
</PropertyGroup> |
||||||
|
|
||||||
|
<ItemGroup> |
||||||
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.5" /> |
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> |
||||||
|
<PackageReference Include="Dapper" Version="2.0.123" /> |
||||||
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.1" /> |
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.5" /> |
||||||
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="7.0.5" /> |
||||||
|
</ItemGroup> |
||||||
|
|
||||||
|
</Project> |
@ -0,0 +1,12 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Catalogos; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Catalogos |
||||||
|
{ |
||||||
|
public interface ICorresponsalesRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<CatCorresponsales>> GetAll(); |
||||||
|
public Task<IEnumerable<CatCorresponsales>> GetAllFormated(); |
||||||
|
public Task<CatCorresponsales> Append(CatCorresponsales data); |
||||||
|
public Task<CatCorresponsales> Delete(int id); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Catalogos |
||||||
|
{ |
||||||
|
public interface IProveedoresRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<CatProveedores>> GetAll(int Clasificacion); |
||||||
|
public Task<CatProveedores> Append(CatProveedores data); |
||||||
|
public Task Delete(int id); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Clientes.CasaCuervo; |
||||||
|
using CORRESPONSALBackend.DTO.Clientes.CasaCuervo; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Clientes.CasaCuervo |
||||||
|
{ |
||||||
|
public interface ICasaCuervoRepository |
||||||
|
{ |
||||||
|
public Task<Boolean> Append(List<I325Pedidos> data); |
||||||
|
public Task<Boolean> UpdateInfoFromCorresponsal(List<DTO325ComplementaPedido> data); |
||||||
|
public Task<IEnumerable<I325Pedidos>> getAll(string Inicio, string Fin, string Aduana); |
||||||
|
public Task<I325Pedidos> GetById(int Id); |
||||||
|
public Task<I325Pedidos> UpdateInfoFromWeb(DTO325UpdateFromWeb data); |
||||||
|
public Task<IEnumerable<DTO325AduanasPedidos>> getAduanas(int Usuario, int TipoUsuario); |
||||||
|
public Task<IEnumerable<I325RptCOVE>> GetRptCOVE(string Inicio, string Fin); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Contabilidad.Corresponsalias |
||||||
|
{ |
||||||
|
public interface IContabilidadCorresponsaliasRepository |
||||||
|
{ |
||||||
|
public Task<CorresponsalTraficoContabilidad> Append(CorresponsalTraficoContabilidad data); |
||||||
|
public Task<IEnumerable<string>> Get(int IdTrafico, int tipo); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
using CORRESPONSALBackend.DTO.Corresponsales; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasAnticiposRepository |
||||||
|
{ |
||||||
|
public Task<CorresponsalAnticipos> Append(CorresponsalAnticipos data); |
||||||
|
public Task<IEnumerable<CorresponsalAnticipos>> getAll(int IdTrafico); |
||||||
|
public Task Delete(int id); |
||||||
|
public Task<DashboardTotal> GetTotalAnticiposPendientes(); |
||||||
|
public Task<CorresponsalAnticipos> Autoriza(DTOCorresponsalesAnticipo data); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasCatAduanasRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<CorresponsalCatAduanas>> getAll(int IdCliente); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasCatDestinosRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<CorresponsalCatDestinos>> getAll(int IdCliente); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasCatMediosEmbarqueRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<CorresponsalCatMediosEmbarque>> getAll(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasCatTipoEmbarqueRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<CorresponsalCatTipoEmbarque>> getAll(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
using CORRESPONSALBackend.DTO.Corresponsales; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasCatTiposDocumentosRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<CorresponsalCatTiposDocumento>> getAll(int Cliente, int Clasificacion); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,12 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasContenedoresRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<CorresponsalesContenedores>> GetAll(int IdTrafico); |
||||||
|
public Task<CorresponsalesContenedores> Append(CorresponsalesContenedores data); |
||||||
|
public Task Delete(int id); |
||||||
|
public Task<CorresponsalesContenedores> Appendc1896(CorresponsalesContenedores data); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,17 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using CORRESPONSALBackend.DTO.Corresponsales; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasCuentasComplementarias |
||||||
|
{ |
||||||
|
public Task<CorresponsalCuentasComplementarias> Append(DTOCorresponsalCuentaComplementaria data); |
||||||
|
public Task<IEnumerable<CorresponsalCuentasComplementarias>> Get(int IdTrafico); |
||||||
|
public Task<DashboardTotal> GetPendientes(); |
||||||
|
public Task<IEnumerable<CorresponsalCuentasComplementariasEstatus>> GetEstatus(); |
||||||
|
public Task<CorresponsalCuentasComplementariasEstatus> AppendEstatus(CorresponsalCuentasComplementariasEstatus data); |
||||||
|
public Task<Boolean> ChangeEstatus(DTOCorresponsalCuentaComplementariaEstatus data); |
||||||
|
public Task<IEnumerable<DTOLogCorresposalCuentaComplementaria>> GetLogEstatus(int id); |
||||||
|
public Task<Boolean> ClearFile(int id, byte witchFile); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,12 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasFacturasRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<CorresponsalFacturas>> GetAll(int idTrafico); |
||||||
|
public Task<CorresponsalFacturas> Append(CorresponsalFacturas data); |
||||||
|
public Task Delete(int id); |
||||||
|
public Task<CorresponsalFacturas> Appendc1896(CorresponsalFacturas data, string UUID); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasFacturasTercerosRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<CorresponsalFacturasTerceros>> GetAll(int IdTrafico); |
||||||
|
public Task<CorresponsalFacturasTerceros> Append(CorresponsalFacturasTerceros data); |
||||||
|
public Task Delete(int id); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasGuiasRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<CorresponsalesGuias>> GetAll(int IdTrafico); |
||||||
|
public Task<CorresponsalesGuias> Append(CorresponsalesGuias data); |
||||||
|
public Task Delete(int id); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasPedimentoPartidasRepository |
||||||
|
{ |
||||||
|
public Task<CorresponsalPedimentoPartida> Append(CorresponsalPedimentoPartida data); |
||||||
|
public Task<IEnumerable<CorresponsalPedimentoPartida>> getAll(int IdTrafico); |
||||||
|
public Task Delete(int id); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasPedimentoRepository |
||||||
|
{ |
||||||
|
public Task<CorresponsalPedimento> Append(CorresponsalPedimento data); |
||||||
|
public Task<CorresponsalPedimento> Get(int IdTrafico); |
||||||
|
public Task Delete(int id); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
using CORRESPONSALBackend.DTO.Corresponsales; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using CORRESPONSALBackend.Repository.Corresponsalias; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Corresponsalias |
||||||
|
{ |
||||||
|
public interface ICorresponsaliasTraficosRepository |
||||||
|
{ |
||||||
|
public Task<ITrafico> Get(int id); |
||||||
|
public Task<DashboardTotal> GetAll(int Mode); |
||||||
|
public Task<IEnumerable<ICorRectificaciones>> GetRectificaciones(int id); |
||||||
|
public Task<ICorRectificaciones> AddRectificacion(int id); |
||||||
|
public Task<ITrafico> Append(ITrafico data); |
||||||
|
public Task<IEnumerable<CorresponsalesTraficoEstatus>> GetTraficoEstatus(); |
||||||
|
public Task<Boolean> ValidaTraficoCompleto(DTOTraficoCompleto data); |
||||||
|
public Task<Boolean> RectificacionHistoricoAppend(DTORectificacionHistorico data); |
||||||
|
public Task<CorresponsaliasTraficoRectificacionHistorico> RectificacionHistoricoGet(int IdTrafico); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
using CORRESPONSALBackend.DTO.Cliente; |
||||||
|
using CORRESPONSALBackend.DTO.Usuario; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts |
||||||
|
{ |
||||||
|
public interface IClientesRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<IClientes>> getAllClientes(int id); |
||||||
|
public Task<IEnumerable<IClientes>> getClientesAsignados(int id); |
||||||
|
public Task<string> GetCustomerName(int sClave); |
||||||
|
public Task<IEnumerable<IClientes>> addCliente(DTOClienteUsuario CU); |
||||||
|
public Task<IEnumerable<DTOClienteProveedor>> asignaClienteProveedor(DTOClienteProveedor cp); |
||||||
|
public Task<IEnumerable<Transportistas>> asignaUsuarioTransportista(DTOUsuarioTransportista t); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts |
||||||
|
{ |
||||||
|
public interface IMenuRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<Menu>> GetItemsMenu(Usuarios user); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
using CORRESPONSALBackend.DTO; |
||||||
|
using CORRESPONSALBackend.DTO.Usuario; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts |
||||||
|
{ |
||||||
|
public interface IPerfilesRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<Perfiles>> getPerfiles(); |
||||||
|
public Task<Perfiles> PerfilGetById(int id); |
||||||
|
public Task<IEnumerable<Menu>> getMenu(); |
||||||
|
public Task<IEnumerable<PerfilesMenu>> getPerfilMenuById(int id); |
||||||
|
public Task<IEnumerable<PerfilesMenu>> getAllPerfilesMenu(); |
||||||
|
public Task<IEnumerable<DTOPerfilCreate>> createPerfil(DTOPerfilCreate data); |
||||||
|
public Task<IEnumerable<Menu>> createItemMenu(Menu data); |
||||||
|
public Task<IEnumerable<DTOItemMenuPerfil>> asignaItemMenuPerfil(DTOItemMenuPerfil data); |
||||||
|
public Task<IEnumerable<Transportistas>> getAllTransportistas(int id); |
||||||
|
public Task<IEnumerable<Proveedores>> getAllProveedores(int id); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,14 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Utils; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Utils |
||||||
|
{ |
||||||
|
public interface IFileManagerRepository |
||||||
|
{ |
||||||
|
public Task<FileManager> FileManager(FileManager data); |
||||||
|
public Task<FileManager> getFileByProcess(long id, int Proceso); |
||||||
|
public Task<List<FileManager>> getAllFilesByProcess(long Tags, int Proceso); |
||||||
|
public Task<FileManager> getFileById(long id); |
||||||
|
public Task deleteFileByProcess(long id, int Proceso); |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
using CORRESPONSALBackend.Models.Clientes.CasaCuervo; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts.Utils |
||||||
|
{ |
||||||
|
public interface IPDFGenerator |
||||||
|
{ |
||||||
|
public Task<byte[]> GeneratePdfFromString(string htmlContent); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
using CORRESPONSALBackend.DTO.Reportes; |
||||||
|
using CORRESPONSALBackend.DTO.Corresponsales; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Contracts |
||||||
|
{ |
||||||
|
public interface IReportesRepository |
||||||
|
{ |
||||||
|
public Task<IEnumerable<DTOCorresponsalTrafico>> GetRptCorresponsalesTraficos(DTOReporteCorresponsales data); |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
namespace CORRESPONSALBackend.Contracts.Utils |
||||||
|
{ |
||||||
|
public interface IValidaFraccion |
||||||
|
{ |
||||||
|
public Boolean ValidaFraccion(string Fraccion); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,56 @@ |
|||||||
|
|
||||||
|
using CORRESPONSALBackend.Models.Catalogos; |
||||||
|
using CORRESPONSALBackend.Contracts.Catalogos; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Catalogos |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[Route("api/Catalogos/[controller]")]
|
||||||
|
public class CorresponsalesController : Controller |
||||||
|
{ |
||||||
|
private readonly ICorresponsalesRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
private readonly string ZipsCorresponsalesPath; |
||||||
|
private readonly string CorresponsalesFilePath; |
||||||
|
|
||||||
|
public CorresponsalesController(ICorresponsalesRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
ZipsCorresponsalesPath = _config.GetValue<string>("pathZipCorresponsales"); |
||||||
|
CorresponsalesFilePath = _config.GetValue<string>("CorresponsalesFilePath"); |
||||||
|
} |
||||||
|
|
||||||
|
[Route("getAll")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<IEnumerable<CatCorresponsales>> GatAll() |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetAll(); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[Route("getAllFormated")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<IEnumerable<CatCorresponsales>> getAllFormated() |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetAllFormated(); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[Route("Append")] |
||||||
|
[HttpPost] |
||||||
|
public async Task<CatCorresponsales> Append([FromBody] CatCorresponsales data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpDelete("Delete/{id}")] |
||||||
|
public async Task<CatCorresponsales> Delete(int id) |
||||||
|
{ |
||||||
|
return await _Repo.Delete(id); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,47 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Catalogos; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Catalogos |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[Route("api/Catalogos/Corresponsales/[controller]")]
|
||||||
|
[ApiController] |
||||||
|
public class ProveedoresController : Controller |
||||||
|
{ |
||||||
|
private readonly IProveedoresRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
|
||||||
|
public ProveedoresController(IProveedoresRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
/// Catalogo de Proveedores |
||||||
|
[HttpGet] |
||||||
|
[Route("getAll")] |
||||||
|
public async Task<IEnumerable<CatProveedores>> GetAll(int Clasificacion) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetAll(Clasificacion); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Append")] |
||||||
|
public async Task<CatProveedores> Append([FromBody] CatProveedores data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpDelete("Delete/{id}")] |
||||||
|
public async Task<IActionResult> Delete(int id) |
||||||
|
{ |
||||||
|
await _Repo.Delete(id); |
||||||
|
return new OkObjectResult(new { respuesta = "Se elimino el registro" }); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,99 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts; |
||||||
|
using CORRESPONSALBackend.DTO.Cliente; |
||||||
|
using CORRESPONSALBackend.DTO.Usuario; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers |
||||||
|
{ |
||||||
|
[Route("api/[controller]")]
|
||||||
|
public class ClientesController : Controller |
||||||
|
{ |
||||||
|
private readonly IClientesRepository _clientesRepo; |
||||||
|
|
||||||
|
public ClientesController(IClientesRepository clientesRepo) |
||||||
|
{ |
||||||
|
_clientesRepo = clientesRepo; |
||||||
|
} |
||||||
|
|
||||||
|
[Route("getAllClientes")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<IActionResult> GetAllClientes(int id) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var clientes = await _clientesRepo.getAllClientes(id); |
||||||
|
return Ok(clientes); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
//log error |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[Route("getClientesAsignados")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<IActionResult> GetClientesAsignados(int id) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var clientes = await _clientesRepo.getClientesAsignados(id); |
||||||
|
return Ok(clientes); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
//log error |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[Route("addCliente")] |
||||||
|
[HttpPost] |
||||||
|
public async Task<IActionResult> Post([FromBody] DTOClienteUsuario CC) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var clientes = await _clientesRepo.addCliente(CC); |
||||||
|
return Ok(clientes); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
//log error |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[Route("asignaClienteProveedor")] |
||||||
|
[HttpPost] |
||||||
|
public async Task<IActionResult> Post([FromBody] DTOClienteProveedor cp) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var result = await _clientesRepo.asignaClienteProveedor(cp); |
||||||
|
return Ok(result); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
//log error |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[Route("asignaClienteTransportista")] |
||||||
|
[HttpPost] |
||||||
|
public async Task<IActionResult> Post([FromBody] DTOUsuarioTransportista t) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var result = await _clientesRepo.asignaUsuarioTransportista(t); |
||||||
|
return Ok(result); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
//log error |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Contabilidad.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Contabilidad.Corresponsales |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[Route("api/Contabilidad/Corresponsales/[controller]")]
|
||||||
|
[ApiController] |
||||||
|
public class ContabilidadTraficoController : ControllerBase |
||||||
|
{ |
||||||
|
private readonly IContabilidadCorresponsaliasRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
|
||||||
|
public ContabilidadTraficoController(IContabilidadCorresponsaliasRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Validacion")] |
||||||
|
public async Task<CorresponsalTraficoContabilidad> Validacion([FromBody] CorresponsalTraficoContabilidad data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("Get")] |
||||||
|
public async Task<IEnumerable<string>> Get(int IdTrafico, int tipo) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Get(IdTrafico, tipo); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,66 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
using CORRESPONSALBackend.DTO.Corresponsales; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
[ApiController] |
||||||
|
|
||||||
|
public class AnticiposController : Controller |
||||||
|
{ |
||||||
|
private readonly ICorresponsaliasAnticiposRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
|
||||||
|
public AnticiposController(ICorresponsaliasAnticiposRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Append")] |
||||||
|
public async Task<CorresponsalAnticipos> Append([FromBody] CorresponsalAnticipos data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("Get")] |
||||||
|
public async Task<IEnumerable<CorresponsalAnticipos>> GetAll([FromQuery] int IdTrafico) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.getAll(IdTrafico); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpDelete("Delete/{id}")] |
||||||
|
public async Task<IActionResult> Delete(int id) |
||||||
|
{ |
||||||
|
await _Repo.Delete(id); |
||||||
|
return new OkObjectResult(new { respuesta = "Se elimino el registro" }); |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("getPendientesAutorizar")] |
||||||
|
public async Task<DashboardTotal> GetTotalAnticiposPendientes() |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetTotalAnticiposPendientes(); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Autoriza")] |
||||||
|
public async Task<CorresponsalAnticipos> Autoriza([FromBody] DTOCorresponsalesAnticipo data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Autoriza(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,31 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[ApiController] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
public class CatAduanasController : ControllerBase |
||||||
|
{ |
||||||
|
|
||||||
|
private readonly ICorresponsaliasCatAduanasRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
|
||||||
|
public CatAduanasController(ICorresponsaliasCatAduanasRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetAll")] |
||||||
|
public async Task<IEnumerable<CorresponsalCatAduanas>> GetAll([FromQuery] int IdCliente) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.getAll(IdCliente); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,30 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[ApiController] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
public class CatDestinosController : ControllerBase |
||||||
|
{ |
||||||
|
private readonly ICorresponsaliasCatDestinosRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
public CatDestinosController(ICorresponsaliasCatDestinosRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetAll")] |
||||||
|
public async Task<IEnumerable<CorresponsalCatDestinos>> GetAll([FromQuery] int IdCliente) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.getAll(IdCliente); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[ApiController] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
public class CatMediosEmbarquesController : Controller |
||||||
|
{ |
||||||
|
|
||||||
|
private readonly ICorresponsaliasCatMediosEmbarqueRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
public CatMediosEmbarquesController(ICorresponsaliasCatMediosEmbarqueRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetAll")] |
||||||
|
public async Task<IEnumerable<CorresponsalCatMediosEmbarque>> GetAll() |
||||||
|
{ |
||||||
|
var entrada = await _Repo.getAll(); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,33 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
using CORRESPONSALBackend.DTO.Corresponsales; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[ApiController] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
public class CatTiposDocumento : Controller |
||||||
|
{ |
||||||
|
|
||||||
|
private readonly ICorresponsaliasCatTiposDocumentosRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
|
||||||
|
public CatTiposDocumento(ICorresponsaliasCatTiposDocumentosRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("Get")] |
||||||
|
public async Task<IEnumerable<CorresponsalCatTiposDocumento>> GetAll([FromQuery] int Cliente, int Clasificacion) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.getAll(Cliente, Clasificacion); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,30 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
// [Authorize] |
||||||
|
[ApiController] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
public class CatTiposEmbarqueController : ControllerBase |
||||||
|
{ |
||||||
|
private readonly ICorresponsaliasCatTipoEmbarqueRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
public CatTiposEmbarqueController(ICorresponsaliasCatTipoEmbarqueRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetAll")] |
||||||
|
public async Task<IEnumerable<CorresponsalCatTipoEmbarque>> GetAll() |
||||||
|
{ |
||||||
|
var entrada = await _Repo.getAll(); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,47 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
[ApiController] |
||||||
|
public class ContenedoresController : Controller |
||||||
|
{ |
||||||
|
private readonly ICorresponsaliasContenedoresRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
|
||||||
|
public ContenedoresController(ICorresponsaliasContenedoresRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
/// Corresponsales : Contenedores |
||||||
|
[HttpGet] |
||||||
|
[Route("getAll")] |
||||||
|
public async Task<IEnumerable<CorresponsalesContenedores>> GetAllCorresponsalesContenedores([FromQuery] int IdTrafico) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetAll(IdTrafico); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Append")] |
||||||
|
public async Task<CorresponsalesContenedores> CreateUpdateCorresponsalesContenedores([FromBody] CorresponsalesContenedores data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpDelete("Delete/{id}")] |
||||||
|
public async Task<IActionResult> DeleteCorresponsalesContenedores(int id) |
||||||
|
{ |
||||||
|
await _Repo.Delete(id); |
||||||
|
return new OkObjectResult(new { respuesta = "Se elimino el registro" }); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,91 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
using CORRESPONSALBackend.DTO.Corresponsales; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using CORRESPONSALBackend.Contracts.Utils; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[ApiController] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
public class CuentasComplementariasController : ControllerBase |
||||||
|
{ |
||||||
|
// private readonly IFileManagerRepository _RepoFileManager; |
||||||
|
private readonly ICorresponsaliasCuentasComplementarias _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
|
||||||
|
public CuentasComplementariasController(ICorresponsaliasCuentasComplementarias Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
// _RepoFileManager = RepoFileManager; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Append")] |
||||||
|
public async Task<CorresponsalCuentasComplementarias> Append([FromBody] DTOCorresponsalCuentaComplementaria data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("Get")] |
||||||
|
public async Task<IEnumerable<CorresponsalCuentasComplementarias>> Get([FromQuery] int IdTrafico) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Get(IdTrafico); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetPendientes")] |
||||||
|
public async Task<DashboardTotal> GetPendientes() |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetPendientes(); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetEstatus")] |
||||||
|
public async Task<IEnumerable<CorresponsalCuentasComplementariasEstatus>> GetEstatus() |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetEstatus(); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("AppendEstatus")] |
||||||
|
public async Task<CorresponsalCuentasComplementariasEstatus> AppendEstatus(CorresponsalCuentasComplementariasEstatus data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.AppendEstatus(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("ChangeEstatus")] |
||||||
|
public async Task<Boolean> ChangeEstatus([FromBody] DTOCorresponsalCuentaComplementariaEstatus data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.ChangeEstatus(data); |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetLogEstatus")] |
||||||
|
public async Task<IEnumerable<DTOLogCorresposalCuentaComplementaria>> GetLogEstatus(int id) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetLogEstatus(id); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
[HttpPut("ClearFile/{IDCuenta}/{witchFile}")] |
||||||
|
public async Task<Boolean> ClearFile(int IDCuenta, byte witchFile) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.ClearFile(IDCuenta, witchFile); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,57 @@ |
|||||||
|
using System.IO.Compression; |
||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using CORRESPONSALBackend.Services.C1896; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
[ApiController] |
||||||
|
public class FacturasController : Controller |
||||||
|
{ |
||||||
|
private readonly ICorresponsaliasFacturasRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
public FacturasController(ICorresponsaliasFacturasRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
/// Corresponsales: Facturas |
||||||
|
[HttpGet] |
||||||
|
[Route("getAll")] |
||||||
|
public async Task<IEnumerable<CorresponsalFacturas>> GetAll([FromQuery] int idTrafico) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetAll(idTrafico); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Append")] |
||||||
|
public async Task<CorresponsalFacturas> Append([FromBody] CorresponsalFacturas data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpDelete("Delete/{id}")] |
||||||
|
public async Task<IActionResult> DeleteCorresponsalesFacturas(int id) |
||||||
|
{ |
||||||
|
await _Repo.Delete(id); |
||||||
|
return new OkObjectResult(new { respuesta = "Se elimino el registro" }); |
||||||
|
} |
||||||
|
//---------------------------------------------------------------------------------------------------------------------------------- |
||||||
|
|
||||||
|
/* [HttpGet] |
||||||
|
[Route("uploadI1896Templete")] |
||||||
|
public async Task<IEnumerable<I1896TempleteUpload>> UploadI1868Templete([FromQuery] int idTrafico) |
||||||
|
{ |
||||||
|
SrvUploadTemplete Srv = new SrvUploadTemplete(); |
||||||
|
return Srv.ReadDataFromFile(@"c:\data\layout_omg_alen.txt"); |
||||||
|
} |
||||||
|
*/ |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,53 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
[ApiController] |
||||||
|
public class FacturasTercerosController : Controller |
||||||
|
{ |
||||||
|
private readonly ICorresponsaliasFacturasTercerosRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
|
||||||
|
public FacturasTercerosController(ICorresponsaliasFacturasTercerosRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("getAll")] |
||||||
|
public async Task<IEnumerable<CorresponsalFacturasTerceros>> GetAll([FromQuery] int idTrafico) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetAll(idTrafico); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Append")] |
||||||
|
public async Task<IActionResult> Append([FromBody] CorresponsalFacturasTerceros data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
if (entrada.id < 0) |
||||||
|
{ |
||||||
|
return StatusCode(409, new { registro = entrada, respuesta = "Esa factura ya se ha registrado previamente" }); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
return StatusCode(200, new { registro = entrada, respuesta = "La factura se ha agregado exitosamente" }); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[HttpDelete("Delete/{id}")] |
||||||
|
public async Task<IActionResult> Delete(int id) |
||||||
|
{ |
||||||
|
await _Repo.Delete(id); |
||||||
|
return new OkObjectResult(new { respuesta = "Se elimino el registro" }); |
||||||
|
} |
||||||
|
//---------------------------------------------------------------------------------------------------------------------------------- |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,47 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[ApiController] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
public class PedimentoController : ControllerBase |
||||||
|
{ |
||||||
|
|
||||||
|
private readonly ICorresponsaliasPedimentoRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
|
||||||
|
public PedimentoController(ICorresponsaliasPedimentoRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Append")] |
||||||
|
public async Task<CorresponsalPedimento> Append([FromBody] CorresponsalPedimento data) |
||||||
|
{ |
||||||
|
data.Activo = 1; |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("Get")] |
||||||
|
public async Task<CorresponsalPedimento> Get([FromQuery] int IdTrafico) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Get(IdTrafico); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpDelete("Delete/{id}")] |
||||||
|
public async Task<IActionResult> Delete(int id) |
||||||
|
{ |
||||||
|
await _Repo.Delete(id); |
||||||
|
return new OkObjectResult(new { respuesta = "Se elimino el registro" }); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,55 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[ApiController] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
public class PedimentoPartidaController : ControllerBase |
||||||
|
{ |
||||||
|
|
||||||
|
private readonly ICorresponsaliasPedimentoPartidasRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
public PedimentoPartidaController(ICorresponsaliasPedimentoPartidasRepository Repo, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetAll")] |
||||||
|
public async Task<IEnumerable<CorresponsalPedimentoPartida>> GetAll([FromQuery] int idTrafico) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.getAll(idTrafico); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Append")] |
||||||
|
public async Task<CorresponsalPedimentoPartida> Append([FromBody] CorresponsalPedimentoPartida data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
if (entrada.id < 0) |
||||||
|
{ |
||||||
|
// return StatusCode(409, new { respuesta = "Esa partida ya se ha registrado previamente" }); |
||||||
|
data.id = -1; |
||||||
|
return data; |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[HttpDelete("Delete/{id}")] |
||||||
|
public async Task<IActionResult> Delete(int id) |
||||||
|
{ |
||||||
|
await _Repo.Delete(id); |
||||||
|
return new OkObjectResult(new { respuesta = "Se elimino el registro" }); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,131 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts.Corresponsalias; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
using CORRESPONSALBackend.Models.Corresponsales; |
||||||
|
using CORRESPONSALBackend.DTO.Corresponsales; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
using CORRESPONSALBackend.Services.C1896; |
||||||
|
using CORRESPONSALBackend.Repository.Corresponsalias; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Corresponsalias |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[Route("api/Corresponsalias/[controller]")]
|
||||||
|
[ApiController] |
||||||
|
public class TraficosController : Controller |
||||||
|
{ |
||||||
|
|
||||||
|
private readonly ICorresponsaliasTraficosRepository _Repo; |
||||||
|
private readonly ICorresponsaliasFacturasRepository _RepoFacturas; |
||||||
|
private readonly ICorresponsaliasContenedoresRepository _RepoContenedores; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
|
||||||
|
public TraficosController(ICorresponsaliasTraficosRepository Repo, ICorresponsaliasFacturasRepository RepoFacturas, ICorresponsaliasContenedoresRepository RepoContenedores, IConfiguration config) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
_RepoFacturas = RepoFacturas; |
||||||
|
_RepoContenedores = RepoContenedores; |
||||||
|
} |
||||||
|
|
||||||
|
/// Corresponsales: Traficos |
||||||
|
[HttpGet] |
||||||
|
[Route("getTotal")] |
||||||
|
public async Task<DashboardTotal> GetAll(int Mode) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetAll(Mode); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("Get")] |
||||||
|
public async Task<ITrafico> Get([FromQuery] int id) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Get(id); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPut("AddRectificacion/{id}")] |
||||||
|
public async Task<ICorRectificaciones> AddRectificacion(int id) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.AddRectificacion(id); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetRectificaciones")] |
||||||
|
public async Task<IEnumerable<ICorRectificaciones>> GetRectificaciones([FromQuery] int id) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetRectificaciones(id); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Append")] |
||||||
|
public async Task<ITrafico> Append([FromBody] ITrafico data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetCorTraficoEstatus")] |
||||||
|
public async Task<IEnumerable<CorresponsalesTraficoEstatus>> GetCorresponsalesTraficoEstatus() |
||||||
|
{ |
||||||
|
var entrada = await _Repo.GetTraficoEstatus(); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPut("ValidateComplete/{id}")] |
||||||
|
public async Task<ActionResult> ValidateComplete(int id, [FromBody] DTOTraficoCompleto data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.ValidaTraficoCompleto(data); |
||||||
|
return Ok(new { respuesta = "Informacion completa" }); |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("AutoAppendI1896")] |
||||||
|
public async Task<ITrafico> AutoAppendI1896() |
||||||
|
{ |
||||||
|
ITrafico data = new ITrafico(); |
||||||
|
data.IdUsuario = 1; |
||||||
|
data.IdCliente = 1896; |
||||||
|
data.TipoOperacion = 2; |
||||||
|
data.OpEntrada = 4; |
||||||
|
data.OpSalida = 4; |
||||||
|
data.IdCorresponsal = 5; |
||||||
|
var entrada = await _Repo.Append(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Upload1896File")] |
||||||
|
public async Task<List<I1896TempleteUpload>> Upload1896File(IFormFile Archivo, int id) |
||||||
|
{ |
||||||
|
string tempPath = _config.GetValue<string>("pathTemp"); |
||||||
|
using (var fileStream = new FileStream(Path.Combine(tempPath, Archivo.FileName), FileMode.Create)) |
||||||
|
{ |
||||||
|
await Archivo.CopyToAsync(fileStream); |
||||||
|
} |
||||||
|
SrvUploadTemplete Srv = new SrvUploadTemplete(_Repo, _RepoFacturas, _RepoContenedores, _config); |
||||||
|
return await Srv.AutoInsertFromTemplete(tempPath + Archivo.FileName, id); |
||||||
|
} |
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Rectificacion/Historico/Append")] |
||||||
|
public async Task<Boolean> RectificacionHistoricoAppend(DTORectificacionHistorico data) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.RectificacionHistoricoAppend(data); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("Rectificacion/Historico/Get")] |
||||||
|
public async Task<CorresponsaliasTraficoRectificacionHistorico> RectificacionHistoricoGet(int IdTrafico) |
||||||
|
{ |
||||||
|
var entrada = await _Repo.RectificacionHistoricoGet(IdTrafico); |
||||||
|
return entrada; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,204 @@ |
|||||||
|
using System.Numerics; |
||||||
|
//using CORRESPONSALBackend.Models.Catalogos; |
||||||
|
using CORRESPONSALBackend.DTO; |
||||||
|
using CORRESPONSALBackend.Contracts; |
||||||
|
using CORRESPONSALBackend.Contracts.Clientes.CasaCuervo; |
||||||
|
using CORRESPONSALBackend.Contracts.Utils; |
||||||
|
using CORRESPONSALBackend.Models.Utils; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers |
||||||
|
{ |
||||||
|
// [Authorize] |
||||||
|
[Route("api/[controller]")]
|
||||||
|
// [ApiController] |
||||||
|
public class FileManagerController : Controller |
||||||
|
{ |
||||||
|
private readonly IFileManagerRepository _Repo; |
||||||
|
private readonly IUsuariosRepository _RepoUsuarios; |
||||||
|
private readonly ICasaCuervoRepository _RepoCasaCuervo; |
||||||
|
private readonly IFilePaths4ProcessRepository _RepoRelativePath; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
private readonly string RootPathCorresponsales; |
||||||
|
|
||||||
|
|
||||||
|
public FileManagerController(IFileManagerRepository Repo, |
||||||
|
IFilePaths4ProcessRepository RepoRelativePath, |
||||||
|
IConfiguration config, |
||||||
|
IUsuariosRepository RepoUsuarios, |
||||||
|
ICasaCuervoRepository RepoCasaCuervo) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_Repo = Repo; |
||||||
|
_RepoUsuarios = RepoUsuarios; |
||||||
|
_RepoCasaCuervo = RepoCasaCuervo; |
||||||
|
_RepoRelativePath = RepoRelativePath; |
||||||
|
RootPathCorresponsales = _config.GetValue<string>("AllFiles"); |
||||||
|
} |
||||||
|
|
||||||
|
[Route("GetFileInfoByProcess")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<FileManager> GetFileInfoByProcess([FromQuery] int id, int Proceso) |
||||||
|
{ |
||||||
|
FileManager data = new FileManager(); |
||||||
|
data = await _Repo.getFileByProcess(id, Proceso); |
||||||
|
return data; |
||||||
|
} |
||||||
|
|
||||||
|
[Route("GetFileInfoById")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<FileManager> GetFileInfoByProcess([FromQuery] int id) |
||||||
|
{ |
||||||
|
FileManager data = new FileManager(); |
||||||
|
data = await _Repo.getFileById(id); |
||||||
|
return data; |
||||||
|
} |
||||||
|
|
||||||
|
[Route("AppendFileByProcess")] |
||||||
|
[HttpPost] |
||||||
|
public async Task<FileManager> AppendFileByProcess(IFormFile file, int IdUsuario, int Proceso, string Tags, int crud) |
||||||
|
{ |
||||||
|
DateTime time = DateTime.Now; |
||||||
|
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Proceso); |
||||||
|
string fullPath = ""; |
||||||
|
fullPath = RootPathCorresponsales + RelativePath.Path; |
||||||
|
string fileMime = file.FileName.Substring(file.FileName.LastIndexOf('.') + 1); |
||||||
|
string newFileName = file.FileName.Replace("." + fileMime, "") + "_" + time.ToString("yyyy_MM_dd_HH_mm_ss") + "." + fileMime; |
||||||
|
FileManager data = new FileManager(); |
||||||
|
data.id = 0; |
||||||
|
data.IdUsuario = IdUsuario; |
||||||
|
data.NombreArchivo = newFileName; |
||||||
|
data.Proceso = Proceso; |
||||||
|
data.FechaRegistro = ""; |
||||||
|
data.Tags = Tags; |
||||||
|
data.Activo = 1; |
||||||
|
long fileLength = 0; |
||||||
|
if (@crud == 1) |
||||||
|
{ |
||||||
|
if (file.Length > 0) |
||||||
|
{ |
||||||
|
var filePath = fullPath + newFileName; |
||||||
|
using (var stream = System.IO.File.Create(filePath)) |
||||||
|
{ |
||||||
|
await file.CopyToAsync(stream); |
||||||
|
} |
||||||
|
fileLength = new System.IO.FileInfo(filePath).Length / 1024; |
||||||
|
data.Size = fileLength; |
||||||
|
if (fileLength > 0) |
||||||
|
{ |
||||||
|
return await _Repo.FileManager(data); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return data; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
// El aifuiente procaso se tiene que validar de todo a todo, ya que sera facilitado el acceso a usuarios externos a GEMCO: Clientes, Corresponsales, etc |
||||||
|
/* [Route("AppendFileUpdatesCasaCuervo")] |
||||||
|
[HttpPost] |
||||||
|
public async Task<IActionResult> AppendFileUpdatesCasaCuervo(IFormFile file, string Usuario, string Contrasenia) |
||||||
|
{ |
||||||
|
int Proceso = 6; |
||||||
|
string Tags = "-1"; |
||||||
|
DateTime time = DateTime.Now; |
||||||
|
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Proceso); |
||||||
|
string fullPath = ""; |
||||||
|
fullPath = RootPathCorresponsales + RelativePath.Path; |
||||||
|
string fileMime = file.FileName.Substring(file.FileName.Length - 4); |
||||||
|
string newFileName = file.FileName.Replace(fileMime, "") + "_" + time.ToString("yyyy_MM_dd_HH_mm_ss") + fileMime; |
||||||
|
DTOLogin authUser = new DTOLogin(); |
||||||
|
authUser.Usuario = Usuario; |
||||||
|
authUser.Contrasena = Contrasenia; |
||||||
|
var ExternalUser = await _RepoUsuarios.GetUsuario(authUser); |
||||||
|
FileManager data = new FileManager(); |
||||||
|
data.id = 0; |
||||||
|
data.IdUsuario = ExternalUser.Id; |
||||||
|
data.NombreArchivo = newFileName; |
||||||
|
data.Proceso = Proceso; |
||||||
|
data.FechaRegistro = ""; |
||||||
|
data.Tags = Tags; |
||||||
|
data.Activo = 1; |
||||||
|
long fileLength = 0; |
||||||
|
string filePath = ""; |
||||||
|
filePath = fullPath + newFileName; |
||||||
|
using (var stream = System.IO.File.Create(filePath)) |
||||||
|
{ |
||||||
|
await file.CopyToAsync(stream); |
||||||
|
} |
||||||
|
fileLength = new System.IO.FileInfo(filePath).Length / 1024; |
||||||
|
data.Size = fileLength; |
||||||
|
if (fileLength > 0) |
||||||
|
{ |
||||||
|
SCasaCuervo proc = new SCasaCuervo(_RepoCasaCuervo, filePath); |
||||||
|
var result = await proc.UpdateInfoFromCorresponsal(); |
||||||
|
if (result) return new OkObjectResult(new { respuesta = "El archivo se agrego exitosamente" }); |
||||||
|
else return new OkObjectResult(new { respuesta = "Ocurrio un error, el archivo no se guardo, verifique que el formato de fecha sea MM/dd/yyyy" }); |
||||||
|
} |
||||||
|
return new OkObjectResult(new { respuesta = "Ocurrio un error el archivo no se guardo" }); |
||||||
|
} */ |
||||||
|
|
||||||
|
[Route("getFile")] |
||||||
|
[HttpGet, DisableRequestSizeLimit] |
||||||
|
public async Task<IActionResult> getFileFromFileManager([FromQuery] long id, int Proceso) |
||||||
|
{ |
||||||
|
Boolean ExisteEnDisco = false; |
||||||
|
FileManager recFound = await _Repo.getFileByProcess(id, Proceso); |
||||||
|
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Proceso); |
||||||
|
string fullPath = ""; |
||||||
|
fullPath = RootPathCorresponsales + RelativePath.Path; |
||||||
|
if (!String.IsNullOrEmpty(recFound.NombreArchivo)) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
if (System.IO.File.Exists(Path.Combine(fullPath, recFound.NombreArchivo))) |
||||||
|
{ |
||||||
|
ExisteEnDisco = true; |
||||||
|
} |
||||||
|
else return BadRequest(new { respuesta = "Ese archivo no existe" }); |
||||||
|
} |
||||||
|
catch (IOException ex) |
||||||
|
{ |
||||||
|
return BadRequest(new { respuesta = "Ese archivo no existe" + ex.ToString() }); |
||||||
|
} |
||||||
|
if (ExisteEnDisco) |
||||||
|
{ |
||||||
|
string fileMime = recFound.NombreArchivo.Substring(recFound.NombreArchivo.Length - 3).ToLower(); |
||||||
|
var mime = "application/" + fileMime.ToLower(); |
||||||
|
string targetFile = fullPath + recFound.NombreArchivo; |
||||||
|
if (System.IO.File.Exists(targetFile)) |
||||||
|
{ |
||||||
|
byte[] pdfBytes = System.IO.File.ReadAllBytes(targetFile); |
||||||
|
MemoryStream ms = new MemoryStream(pdfBytes); |
||||||
|
return new FileStreamResult(ms, mime); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return BadRequest(new { respuesta = "Ese archivo no existe" }); |
||||||
|
} |
||||||
|
|
||||||
|
[HttpDelete("DeleteById/{id}")] |
||||||
|
public async Task<IActionResult> DeleteByProcess(long id) |
||||||
|
{ |
||||||
|
FileManager Found = await _Repo.getFileById(id); |
||||||
|
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Found.Proceso); |
||||||
|
string fullPath = ""; |
||||||
|
fullPath = RootPathCorresponsales + RelativePath.Path; |
||||||
|
try |
||||||
|
{ |
||||||
|
if (System.IO.File.Exists(Path.Combine(fullPath, Found.NombreArchivo))) |
||||||
|
{ |
||||||
|
System.IO.File.Delete(Path.Combine(fullPath, Found.NombreArchivo)); |
||||||
|
await _Repo.deleteFileByProcess(Found.id, Found.Proceso); |
||||||
|
} |
||||||
|
else return new OkObjectResult(new { respuesta = "Ese archivo no existe" }); |
||||||
|
} |
||||||
|
catch (IOException ex) |
||||||
|
{ |
||||||
|
return new OkObjectResult(new { respuesta = "Ocurrio un error al intentar eliminar el registro: " + ex.ToString() }); |
||||||
|
} |
||||||
|
return new OkObjectResult(new { respuesta = "Se elimino el registro" }); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,165 @@ |
|||||||
|
using CORRESPONSALBackend.Contracts; |
||||||
|
using CORRESPONSALBackend.DTO; |
||||||
|
using CORRESPONSALBackend.DTO.Usuario; |
||||||
|
using CORRESPONSALBackend.Models; |
||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers |
||||||
|
{ |
||||||
|
[Route("api/[controller]")]
|
||||||
|
[ApiController] |
||||||
|
public class PerfilesController : ControllerBase |
||||||
|
{ |
||||||
|
public IConfiguration _configuration; |
||||||
|
private readonly IUsuariosRepository _usuariosRepo; |
||||||
|
private readonly IMenuRepository _menuRepo; |
||||||
|
private readonly IPerfilesRepository _perfilesRepo; |
||||||
|
public PerfilesController(IConfiguration config, IUsuariosRepository usuariosRepo, IMenuRepository menuRepo, IPerfilesRepository perfilesRepo) |
||||||
|
{ |
||||||
|
_configuration = config; |
||||||
|
_usuariosRepo = usuariosRepo; |
||||||
|
_menuRepo = menuRepo; |
||||||
|
_perfilesRepo = perfilesRepo; |
||||||
|
} |
||||||
|
|
||||||
|
[Route("getPerfiles")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<IActionResult> GetPerfiles() |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var perfiles = await _perfilesRepo.getPerfiles(); |
||||||
|
return Ok(perfiles); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[Route("getMenu")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<IActionResult> GetMenu() |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var perfiles = await _perfilesRepo.getMenu(); |
||||||
|
return Ok(perfiles); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
[Route("asignaItemMenu")] |
||||||
|
[HttpPost] |
||||||
|
public async Task<IActionResult> asignaItemMenu(DTOItemMenuPerfil data) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var perfiles = await _perfilesRepo.asignaItemMenuPerfil(data); |
||||||
|
return Ok(perfiles); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[Route("getAllPerfilesMenu")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<IActionResult> GetAllPerfilesMenu() |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var perfiles = await _perfilesRepo.getAllPerfilesMenu(); |
||||||
|
return Ok(perfiles); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
[Route("getPerfilMenuById")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<IActionResult> GetPerfilMenuBuId(int id) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var perfiles = await _perfilesRepo.getPerfilMenuById(id); |
||||||
|
return Ok(perfiles); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[Route("createPerfil")] |
||||||
|
[HttpPost] |
||||||
|
public async Task<IActionResult> createPerfil(DTOPerfilCreate data) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var perfiles = await _perfilesRepo.createPerfil(data); |
||||||
|
return Ok(perfiles); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
[Route("createItemMenu")] |
||||||
|
[HttpPost] |
||||||
|
public async Task<IActionResult> createItemMenu(Menu data) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var result = await _perfilesRepo.createItemMenu(data); |
||||||
|
return Ok(result); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
[Route("getAllTransportistas")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<IActionResult> GetAllTransportistas(int id) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var transportistas = await _perfilesRepo.getAllTransportistas(id); |
||||||
|
return Ok(transportistas); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
[Route("getAllProveedores")] |
||||||
|
[HttpGet] |
||||||
|
public async Task<IActionResult> GetAllProveedores(int id) |
||||||
|
{ |
||||||
|
try |
||||||
|
{ |
||||||
|
var proveedores = await _perfilesRepo.getAllProveedores(id); |
||||||
|
return Ok(proveedores); |
||||||
|
} |
||||||
|
catch (Exception ex) |
||||||
|
{ |
||||||
|
return StatusCode(500, ex.Message); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,62 @@ |
|||||||
|
using Microsoft.AspNetCore.Mvc; |
||||||
|
using CORRESPONSALBackend.Services.MFileManager; |
||||||
|
using CORRESPONSALBackend.Contracts.Utils; |
||||||
|
using CORRESPONSALBackend.Models.Utils; |
||||||
|
using Microsoft.AspNetCore.Authorization; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Controllers.Utils |
||||||
|
{ |
||||||
|
[Authorize] |
||||||
|
[ApiController] |
||||||
|
[Route("api/Utils/[controller]")]
|
||||||
|
public class MFileManagerController : ControllerBase |
||||||
|
{ |
||||||
|
|
||||||
|
private readonly IFileManagerRepository _Repo; |
||||||
|
private readonly IConfiguration _config; |
||||||
|
private readonly IFilePaths4ProcessRepository _RepoRelativePath; |
||||||
|
private readonly string RootPath; |
||||||
|
|
||||||
|
public MFileManagerController(IConfiguration config, IFilePaths4ProcessRepository RepoRelativePath, IFileManagerRepository Repo) |
||||||
|
{ |
||||||
|
_config = config; |
||||||
|
_RepoRelativePath = RepoRelativePath; |
||||||
|
_Repo = Repo; |
||||||
|
RootPath = _config.GetValue<string>("AllFiles"); |
||||||
|
} |
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetFilesFromLog")] |
||||||
|
public async Task<List<FileManager>> GetFilesFromLog(int Tags, int Proceso) |
||||||
|
{ |
||||||
|
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Proceso); |
||||||
|
SvcMFileManager FM = new SvcMFileManager(_config, _Repo, RootPath + RelativePath.Path); |
||||||
|
return await FM.GetFilesFromLog(Tags, Proceso); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
[HttpGet] |
||||||
|
[Route("GetFileContentById")] |
||||||
|
public async Task<IActionResult> GetFileContentById(long id, int Proceso) |
||||||
|
{ |
||||||
|
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Proceso); |
||||||
|
SvcMFileManager FM = new SvcMFileManager(_config, _Repo, RootPath + RelativePath.Path); |
||||||
|
return await FM.getFileContentById(id); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
[HttpPost] |
||||||
|
[Route("Append")] |
||||||
|
public async Task<List<FileManager>> Append(List<IFormFile> FileList, int Tags, int Proceso, int Usuario) |
||||||
|
{ |
||||||
|
List<string> data = new List<string>(); |
||||||
|
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Proceso); |
||||||
|
SvcMFileManager FM = new SvcMFileManager(_config, _Repo, RootPath + RelativePath.Path); |
||||||
|
List<string> filePaths = await FM.SaveFile2DiskList(FileList); |
||||||
|
var fileData = await FM.SaveFileLog(filePaths, Tags, Proceso, Usuario); |
||||||
|
return fileData; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO.AnexoFacturacion |
||||||
|
{ |
||||||
|
public class DTOAnexoFacturacionAlen |
||||||
|
{ |
||||||
|
public string sReferencia { get; set; } = null!; |
||||||
|
public double nHonorarios { get; set; } = 0; |
||||||
|
public double nValidacion { get; set; } = 0; |
||||||
|
public double nPrevalidacion { get; set; } = 0; |
||||||
|
public double nCoordinacion { get; set; } = 0; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,12 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO.AnexoFacturacion |
||||||
|
{ |
||||||
|
public class DTOAnexoFacturacionMission |
||||||
|
{ |
||||||
|
public string sReferencia { get; set; } = null!; |
||||||
|
public double CordCruce { get; set; } = 0; |
||||||
|
public double CordFlete { get; set; } = 0; |
||||||
|
public double nServicio { get; set; } = 0; |
||||||
|
public double nContraprestacion { get; set; } = 0; |
||||||
|
public double nHonorario { get; set; } = 0; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO.Clientes.CasaCuervo |
||||||
|
{ |
||||||
|
public class DTO325AduanasPedidos |
||||||
|
{ |
||||||
|
public string id { set; get; } = string.Empty; |
||||||
|
public string value { set; get; } = string.Empty; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
|
||||||
|
namespace CORRESPONSALBackend.DTO.Clientes.CasaCuervo |
||||||
|
{ |
||||||
|
public class DTO325RptPedidos |
||||||
|
{ |
||||||
|
public string Inicio { get; set; } = string.Empty; |
||||||
|
public string Fin { get; set; } = string.Empty; |
||||||
|
public string Aduana { get; set; } = string.Empty; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,18 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO.Clientes.CasaCuervo |
||||||
|
{ |
||||||
|
public class DTO325UpdateFromWeb |
||||||
|
{ |
||||||
|
public int id { get; set; } = 0!; |
||||||
|
public string ComentarioGEMCO { get; set; } = string.Empty; |
||||||
|
public string FechaCompromiso { get; set; } = string.Empty; |
||||||
|
public string FechaCruce { get; set; } = string.Empty; |
||||||
|
public string Factura { get; set; } = string.Empty; |
||||||
|
public string MedidaCaja { get; set; } = string.Empty; |
||||||
|
public string Sello1 { get; set; } = string.Empty; |
||||||
|
public string Sello2 { get; set; } = string.Empty; |
||||||
|
public string UUID { get; set; } = string.Empty; |
||||||
|
public string Trafico { get; set; } = string.Empty; |
||||||
|
public string Pedimento { get; set; } = string.Empty; |
||||||
|
public string Patente { get; set; } = string.Empty; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO.Corresponsales |
||||||
|
{ |
||||||
|
public class DTOCorresponsalCuentaComplementaria |
||||||
|
{ |
||||||
|
public int Id { get; set; } = 0; |
||||||
|
public int IdTrafico { get; set; } = 0; |
||||||
|
public long IdFile { get; set; } = 0!; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO.Corresponsales |
||||||
|
{ |
||||||
|
public class DTOCorresponsalCuentaComplementariaEstatus |
||||||
|
{ |
||||||
|
public int Id { get; set; } = 0; |
||||||
|
public byte Estatus { get; set; } = 0; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,52 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO.Corresponsales |
||||||
|
{ |
||||||
|
public class DTOCorresponsalTrafico |
||||||
|
{ |
||||||
|
public int id { get; set; } = 0; |
||||||
|
public string? Folio { get; set; } = null!; |
||||||
|
public string? FechaRegistro { get; set; } = null!; |
||||||
|
public int IdUsuario { get; set; } = 0; |
||||||
|
public string sUsuario { get; set; } = null!; |
||||||
|
public int IdCliente { get; set; } = 0; |
||||||
|
public string sCliente { get; set; } = null!; |
||||||
|
public int TipoOperacion { get; set; } = 0; |
||||||
|
public string sTipoOperacion { get; set; } = null!; |
||||||
|
public int OpEntrada { get; set; } = 0; |
||||||
|
public string sOpEntrada { get; set; } = null!; |
||||||
|
public int OpSalida { get; set; } = 0; |
||||||
|
public string sOpSalida { get; set; } = null!; |
||||||
|
public int IdCorresponsal { get; set; } = 0; |
||||||
|
public string sCorresponsal { get; set; } = null!; |
||||||
|
public int? Bultos { get; set; } = 0; |
||||||
|
public int? Kilos { get; set; } = 0; |
||||||
|
public int? Estatus { get; set; } = 0; |
||||||
|
public string sEstatus { get; set; } = null!; |
||||||
|
public string? Trafico { get; set; } = null!; |
||||||
|
public int? Aduana { get; set; } = 0; |
||||||
|
public int? Patente { get; set; } = 0; |
||||||
|
public int? Pedimento { get; set; } = 0; |
||||||
|
public string? Clave { get; set; } = null!; |
||||||
|
public string? FechaPago { get; set; } = null!; |
||||||
|
public double? TipoCambio { get; set; } = 0; |
||||||
|
public double? ValorAduanaMN { get; set; } = 0; |
||||||
|
public double? TotalPagado { get; set; } = 0; |
||||||
|
public double? ValorFacturaMN { get; set; } = 0; |
||||||
|
public int? CantidadFracciones { get; set; } = 0; |
||||||
|
public string? Buque { get; set; } = null!; |
||||||
|
public double? ValorFacturaDls { get; set; } = 0; |
||||||
|
public string? DescripcionMercancia { get; set; } = null!; |
||||||
|
public string? Observaciones { get; set; } = null!; |
||||||
|
public string? FechaDesaduanamiento { get; set; } = null!; |
||||||
|
public byte? SemaforoFiscal { get; set; } = 0; |
||||||
|
public string? NoCuenta { get; set; } = null!; |
||||||
|
public string? FechaCuenta { get; set; } = null!; |
||||||
|
public int? TipoMercancia { get; set; } = 0; |
||||||
|
public string? UltimaActualizacion { get; set; } = null!; |
||||||
|
public string? ZIPGEMCO { get; set; } = null!; |
||||||
|
public string? ZIPCorresponsal { get; set; } = null!; |
||||||
|
public int? Proceso { get; set; } = 0; |
||||||
|
public int Rechazado { get; set; } = 0; |
||||||
|
public int NoRecti { get; set; } = 0; |
||||||
|
public byte? Activo { get; set; } = 0; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO.Corresponsales |
||||||
|
{ |
||||||
|
public class DTOLogCorresposalCuentaComplementaria |
||||||
|
{ |
||||||
|
public int Estatus { get; set; } = 0; |
||||||
|
public string FCreacion { get; set; } = null!; |
||||||
|
public string sEstatus { get; set; } = null!; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
|
||||||
|
namespace CORRESPONSALBackend.DTO.Corresponsales |
||||||
|
{ |
||||||
|
public class DTORectificacionHistorico |
||||||
|
{ |
||||||
|
public int IdTrafico { get; set; } = 0; |
||||||
|
public int IdUsuario { get; set; } = 0; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO.Corresponsales |
||||||
|
{ |
||||||
|
public class DTOTraficoCompleto |
||||||
|
{ |
||||||
|
public int Id { get; set; } = 0; |
||||||
|
public int IdUsuario { get; set; } = 0; |
||||||
|
public byte Estatus { get; set; } = 0; |
||||||
|
public string Comentarios { get; set; } = null!; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO.Usuario |
||||||
|
{ |
||||||
|
public class DTOPINData |
||||||
|
{ |
||||||
|
public int PIN { get; set; } = 0!; |
||||||
|
public string Correo { get; set; } = string.Empty; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO.Usuario |
||||||
|
{ |
||||||
|
public class DTOPINUsuario |
||||||
|
{ |
||||||
|
public int PIN { get; set; } = 0!; |
||||||
|
public string Usuario { get; set; } = string.Empty; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
namespace CORRESPONSALBackend.DTO |
||||||
|
{ |
||||||
|
public class DTORespuesta |
||||||
|
{ |
||||||
|
public int code { get; set; } = 0!; |
||||||
|
public string respuesta { get; set; } = null!; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
|
||||||
|
namespace CORRESPONSALBackend.DTO |
||||||
|
{ |
||||||
|
public class DTORolesAsignados |
||||||
|
{ |
||||||
|
public int Id { get; set; } = 0; |
||||||
|
public int Usuario { get; set; } = 0; |
||||||
|
public int Rol { get; set; } = 0; |
||||||
|
public Boolean Activo { get; set; } = false; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
|
||||||
|
namespace CORRESPONSALBackend.Clientes.ZincInternacional.DTO |
||||||
|
{ |
||||||
|
public class DTOSendEmail |
||||||
|
{ |
||||||
|
public string To { get; set; } = null!; |
||||||
|
public string Subject { get; set; } = null!; |
||||||
|
public string Text { get; set; } = null!; |
||||||
|
public string Html { get; set; } = null!; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,18 @@ |
|||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.Linq; |
||||||
|
using System.Threading.Tasks; |
||||||
|
|
||||||
|
namespace CORRESPONSALBackend.DTO.Reportes |
||||||
|
{ |
||||||
|
public class DTOReporteCorresponsales |
||||||
|
{ |
||||||
|
public string? Inicio { get; set; } = null!; |
||||||
|
public string? Fin { get; set; } = null!; |
||||||
|
public int? TipoOperacion { get; set; } = 0; |
||||||
|
public int? NoCliente { get; set; } = 0; |
||||||
|
public int IdCorresponsal { get; set; } = 0; |
||||||
|
public int Proceso { get; set; } = 0; |
||||||
|
public int Modo { get; set; } = 0; |
||||||
|
} |
||||||
|
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue