|
|
|
@ -42,6 +42,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
private readonly SqlSugarRepository<MappingService> _mappingServiceRep;
|
|
|
|
|
private readonly ISysCacheService _sysCacheService;
|
|
|
|
|
private readonly SqlSugarRepository<CodeIssueType> _codeIssueTypeRep;
|
|
|
|
|
private readonly SqlSugarRepository<CommonModule> _commonModuleRep;
|
|
|
|
|
private readonly ILogger<CommonDBService> _logger;
|
|
|
|
|
public CommonDBService(SqlSugarRepository<CodeCarrier> codeCarrierRep,
|
|
|
|
|
SqlSugarRepository<CodeVessel> codeVesselRep,
|
|
|
|
@ -63,6 +64,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
SqlSugarRepository<MappingPackage> mappingPackageRep,
|
|
|
|
|
SqlSugarRepository<MappingService> mappingServiceRep,
|
|
|
|
|
SqlSugarRepository<CodeIssueType> codeIssueTypeRep,
|
|
|
|
|
SqlSugarRepository<CommonModule> commonModuleRep,
|
|
|
|
|
ILogger<CommonDBService> logger,
|
|
|
|
|
ISysCacheService sysCacheService)
|
|
|
|
|
{
|
|
|
|
@ -87,8 +89,9 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
_mappingPackageRep = mappingPackageRep;
|
|
|
|
|
_mappingServiceRep = mappingServiceRep;
|
|
|
|
|
_codeIssueTypeRep = codeIssueTypeRep;
|
|
|
|
|
_commonModuleRep = commonModuleRep;
|
|
|
|
|
_logger = logger;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -118,7 +121,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
entity.CreateUser = UserManager.DjyUserId;
|
|
|
|
|
await _codeCarrierRep.InsertAsync(entity);
|
|
|
|
|
await GetAllCarrier();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -148,7 +151,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
{
|
|
|
|
|
entity.GID = Guid.NewGuid().ToString();
|
|
|
|
|
entity.CreateTime = DateTime.Now;
|
|
|
|
|
entity.CreateUser =UserManager.DjyUserId;
|
|
|
|
|
entity.CreateUser = UserManager.DjyUserId;
|
|
|
|
|
await _mappingCarrierRep.InsertAsync(entity);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -689,7 +692,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.MapCode), x => x.MapCode.Contains(input.MapCode, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.Module), x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.MapName), x => x.MapName.Contains(input.MapName, System.StringComparison.CurrentCultureIgnoreCase));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return queryList.ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -819,7 +822,17 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 模块列表
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取箱型信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondb/modules")]
|
|
|
|
|
public async Task<dynamic> ModuleList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _commonModuleRep.AsQueryable().OrderBy(x => x.Sort).Select(x => new { x.Code, x.Name, x.Sort }).ToListAsync();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 实现接口,获取公共数据并缓存
|
|
|
|
@ -949,11 +962,11 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
[NonAction]
|
|
|
|
|
public async Task<List<CodeFrt>> GetAllFrt()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var list = await _codeFrtRep.ToListAsync();
|
|
|
|
|
await _sysCacheService.SetAllCodeFrt(list);
|
|
|
|
|
return list;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
[NonAction]
|
|
|
|
|
public async Task<List<MappingFrt>> GetAllMappingFrt()
|
|
|
|
|