booking_auth_dev
wet 2 years ago
parent 0053c81318
commit e7b1f69176

@ -470,9 +470,9 @@ namespace Myshipping.Application
/// <param name="Id"></param> /// <param name="Id"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("/BookingOrder/getRemark")] [HttpGet("/BookingOrder/getRemark")]
public async Task<BookingRemark> GetRemark(long Id) public async Task<List<BookingRemark>> GetRemark(long Id)
{ {
var list = await _bookingremark.FirstOrDefaultAsync(u => u.PId == Id); var list = await _bookingremark.AsQueryable().Where(u => u.PId == Id).ToListAsync();
return list; return list;
} }
@ -555,9 +555,9 @@ namespace Myshipping.Application
/// <param name="Id"></param> /// <param name="Id"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("/BookingOrder/getFile")] [HttpGet("/BookingOrder/getFile")]
public async Task<BookingFile> GetFile(long Id) public async Task<List<BookingFile>> GetFile(long Id)
{ {
var list = await _bookingfile.FirstOrDefaultAsync(u => u.BookingId == Id); var list = await _bookingfile.AsQueryable().Where(u => u.BookingId == Id).ToListAsync();
return list; return list;
} }

@ -19,14 +19,14 @@ namespace Myshipping.Application
Task<BookingLogDto> GetLog(long Id); Task<BookingLogDto> GetLog(long Id);
Task<BookingRemark> GetRemark(long Id); Task<List<BookingRemark>> GetRemark(long Id);
Task AddRemark(BookingRemarkDto dto); Task AddRemark(BookingRemarkDto dto);
Task AddFile(IFormFile file, [FromForm] BookingFileDto dto); Task AddFile(IFormFile file, [FromForm] BookingFileDto dto);
Task<BookingFile> GetFile(long Id); Task<List<BookingFile>> GetFile(long Id);
Task SendTrace(string BusinessId,string YARDID, string YARD, string MBLNO); Task SendTrace(string BusinessId,string YARDID, string YARD, string MBLNO);

@ -10,6 +10,7 @@ using System.Threading.Tasks;
using System.Collections.Generic; using System.Collections.Generic;
using System; using System;
using Myshipping.Core.Service.CommonDB.Dto; using Myshipping.Core.Service.CommonDB.Dto;
using Microsoft.Extensions.Logging;
namespace Myshipping.Core.Service; namespace Myshipping.Core.Service;
/// <summary> /// <summary>
@ -39,7 +40,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
private readonly SqlSugarRepository<MappingPackage> _mappingPackageRep; private readonly SqlSugarRepository<MappingPackage> _mappingPackageRep;
private readonly SqlSugarRepository<MappingService> _mappingServiceRep; private readonly SqlSugarRepository<MappingService> _mappingServiceRep;
private readonly ISysCacheService _sysCacheService; private readonly ISysCacheService _sysCacheService;
private readonly ILogger<CommonDBService> _logger;
public CommonDBService(SqlSugarRepository<CodeCarrier> codeCarrierRep, public CommonDBService(SqlSugarRepository<CodeCarrier> codeCarrierRep,
SqlSugarRepository<CodeVessel> codeVesselRep, SqlSugarRepository<CodeVessel> codeVesselRep,
SqlSugarRepository<CodeForwarder> codeForwarderRep, SqlSugarRepository<CodeForwarder> codeForwarderRep,
@ -59,6 +60,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
SqlSugarRepository<MappingPort> mappingPortRep, SqlSugarRepository<MappingPort> mappingPortRep,
SqlSugarRepository<MappingPackage> mappingPackageRep, SqlSugarRepository<MappingPackage> mappingPackageRep,
SqlSugarRepository<MappingService> mappingServiceRep, SqlSugarRepository<MappingService> mappingServiceRep,
ILogger<CommonDBService> logger,
ISysCacheService sysCacheService) ISysCacheService sysCacheService)
{ {
_codeCarrierRep = codeCarrierRep; _codeCarrierRep = codeCarrierRep;
@ -81,6 +83,8 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
_mappingPortRep = mappingPortRep; _mappingPortRep = mappingPortRep;
_mappingPackageRep = mappingPackageRep; _mappingPackageRep = mappingPackageRep;
_mappingServiceRep = mappingServiceRep; _mappingServiceRep = mappingServiceRep;
_logger = logger;
} }
@ -786,6 +790,8 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
public async Task<List<CodeCarrier>> GetAllCarrier() public async Task<List<CodeCarrier>> GetAllCarrier()
{ {
var list = await _codeCarrierRep.ToListAsync(); var list = await _codeCarrierRep.ToListAsync();
_logger.LogInformation("船公司缓存");
_logger.LogInformation(list.ToJsonString());
await _sysCacheService.SetAllCodeCarrier(list); await _sysCacheService.SetAllCodeCarrier(list);
return list; return list;
} }

@ -114,14 +114,7 @@ public class Startup : AppStartup
}); });
#region 缓存 #region 缓存
//缓存EDI数据
App.GetService<IDjyEdiSettingService>().CacheData();
//缓存字典数据
App.GetService<ISysDictDataService>().CacheData();
//租户参数
App.GetService<IDjyTenantParamService>().CacheData();
//船公司 //船公司
App.GetService<ICommonDBService>().GetAllCarrier(); App.GetService<ICommonDBService>().GetAllCarrier();
@ -177,6 +170,15 @@ public class Startup : AppStartup
App.GetService<ICommonDBService>().GetAllMappingPackage(); App.GetService<ICommonDBService>().GetAllMappingPackage();
//运输服务映射 //运输服务映射
App.GetService<ICommonDBService>().GetAllMappingService(); App.GetService<ICommonDBService>().GetAllMappingService();
//缓存EDI数据
App.GetService<IDjyEdiSettingService>().CacheData();
//缓存字典数据
App.GetService<ISysDictDataService>().CacheData();
//租户参数
App.GetService<IDjyTenantParamService>().CacheData();
#endregion #endregion
} }

Loading…
Cancel
Save