# Conflicts:
#	Myshipping.Application/Service/BookingOrder/BookingOrderService.cs
booking_auth_dev
wanghaomei 2 years ago
commit 9cb6881339

@ -103,11 +103,11 @@ namespace Myshipping.Application.Entity
public string OpEmail { get; set; }
/// <summary>
/// ACI HBL O(加拿大)
/// ACI HBL
/// </summary>
public string ACIHBL { get; set; }
/// <summary>
/// S0C C0C O(加拿大)
/// S0C C0C
/// </summary>
public string S0CC0C { get; set; }

@ -2342,12 +2342,12 @@
</member>
<member name="P:Myshipping.Application.Entity.BookingEDIExt.ACIHBL">
<summary>
ACI HBL O(加拿大)
ACI HBL
</summary>
</member>
<member name="P:Myshipping.Application.Entity.BookingEDIExt.S0CC0C">
<summary>
S0C C0C O(加拿大)
S0C C0C
</summary>
</member>
<member name="P:Myshipping.Application.Entity.BookingEDIExt.GoodsName">
@ -5218,12 +5218,12 @@
</member>
<member name="P:Myshipping.Application.BookingEDIExtDto.ACIHBL">
<summary>
ACI HBL O(加拿大)
ACI HBL
</summary>
</member>
<member name="P:Myshipping.Application.BookingEDIExtDto.S0CC0C">
<summary>
S0C C0C O(加拿大)
S0C C0C
</summary>
</member>
<member name="P:Myshipping.Application.BookingEDIExtDto.GoodsName">

@ -460,7 +460,7 @@ namespace Myshipping.Application
if (input.BookingEDIExt != null)
{
//检索EDI扩展
var ediExtEntity = await _bookingEDIExt.FirstOrDefaultAsync(u => u.BookingId == input.Id);
var ediExtEntity = _bookingEDIExt.FirstOrDefault(u => u.BookingId == input.Id);
if (ediExtEntity == null)
{
@ -480,7 +480,11 @@ namespace Myshipping.Application
await _bookingEDIExt.AsUpdateable(currEdiExtEntity).IgnoreColumns(it => new
{
it.BookingId
it.BookingId,
it.TenantId,
it.CreatedTime,
it.CreatedUserId,
it.CreatedUserName
}).ExecuteCommandAsync();
}
}
@ -596,7 +600,7 @@ namespace Myshipping.Application
}
//检索EDI扩展
var ediExtEntity = await _bookingEDIExt.AsQueryable().Filter(null, true).FirstAsync(u => u.BookingId == Id);
var ediExtEntity = _bookingEDIExt.FirstOrDefault(u => u.BookingId == Id);
if (ediExtEntity != null)
{

@ -97,11 +97,11 @@ namespace Myshipping.Application
public string OpEmail { get; set; }
/// <summary>
/// ACI HBL O(加拿大)
/// ACI HBL
/// </summary>
public string ACIHBL { get; set; }
/// <summary>
/// S0C C0C O(加拿大)
/// S0C C0C
/// </summary>
public string S0CC0C { get; set; }

@ -261,7 +261,7 @@ public class LogJobWorker : ISpareTimeWorker, IDynamicApiController, ITransient
/// </summary>
[SpareTime(120000, "TemporaryDocuments", Description = "后台批量删除临时文件,配置项参数:{\"quantity\": 2}不填默认为2",
DoOnce = false, StartNow = true, ExecuteType = SpareTimeExecuteTypes.Serial)]
public void TemporaryDocuments()
public void TemporaryDocuments(SpareTimer timer, long count)
{
var opt = App.GetOptions<TempFileOptions>();
var dirAbs = opt.Path;

@ -5231,7 +5231,7 @@
<param name="expression"></param>
<typeparam name="T"></typeparam>
</member>
<member name="M:Myshipping.Core.Job.LogJobWorker.TemporaryDocuments">
<member name="M:Myshipping.Core.Job.LogJobWorker.TemporaryDocuments(Furion.TaskScheduler.SpareTimer,System.Int64)">
<summary>
后台批量删除临时文件
</summary>

@ -20,7 +20,7 @@ namespace Myshipping.Core.Service;
[ApiDescriptionSettings(Name = "CommonDB", Order = 1000)]
public class CommonDBService : ICommonDBService, IDynamicApiController, ITransient
{
#region
private readonly SqlSugarRepository<CodeCarrier> _codeCarrierRep;
private readonly SqlSugarRepository<MappingCarrier> _mappingCarrierRep;
private readonly SqlSugarRepository<CodeVessel> _codeVesselRep;
@ -94,6 +94,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
}
#endregion
#region 船公司
/// <summary>
@ -117,6 +118,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addcarrier")]
public async Task AddCarrier([FromBody] CodeCarrierDto dto)
{
var list = await _sysCacheService.GetAllCodeCarrier();
var count = list.Where(x => x.Code == dto.Code).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<CodeCarrier>();
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
@ -153,6 +160,11 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addorupdatemappingcarrier")]
public async Task AddOrUpdateMappingCarrier([FromBody] MappingCarrierDto dto)
{
var list = await _sysCacheService.GetAllMappingCarrier();
var count = list.Where(x => x.Module == dto.Module && x.Code == dto.Code && x.GID != dto.GID).Count();
if (count>0) {
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<MappingCarrier>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
@ -200,6 +212,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addvessel")]
public async Task AddVessel([FromBody] CodeVesselDto dto)
{
var list = await _sysCacheService.GetAllCodeVessel();
var count = list.Where(x => x.Name.Trim() == dto.Name.Trim()).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<CodeVessel>();
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
@ -235,6 +253,16 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addorupdatevessel")]
public async Task AddOrUpdateMappingVessel([FromBody] MappingVesselDto dto)
{
var list = await _sysCacheService.GetAllMappingVessel();
var count = list.Where(x => x.Name.Trim() == dto.Name.Trim()&&x.Module==dto.Module && x.GID != dto.GID).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<MappingVessel>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
@ -276,6 +304,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addforwarder")]
public async Task AddForwarder([FromBody] CodeForwarderDto dto)
{
var list = await _sysCacheService.GetAllCodeForwarder();
var count = list.Where(x => x.Code == dto.Code).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<CodeForwarder>();
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
@ -306,6 +340,13 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addyard")]
public async Task AddYard([FromBody] CodeYardDto dto)
{
var list = await _sysCacheService.GetAllCodeYard();
var count = list.Where(x => x.Code == dto.Code).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<CodeYard>();
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
@ -344,6 +385,13 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addorupdatemappingyard")]
public async Task AddOrUpdateMappingYard([FromBody] MappingYardDto dto)
{
var list = await _sysCacheService.GetAllMappingYard();
var count = list.Where(x => x.Code == dto.Code&&x.Module==dto.Module && x.GID != dto.GID).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<MappingYard>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
@ -388,6 +436,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addportload")]
public async Task AddPortload([FromBody] CodePortLoadDto dto)
{
var list = await _sysCacheService.GetAllCodePortLoad();
var count = list.Where(x => x.Code == dto.Code ).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<CodePortLoad>();
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
@ -427,6 +481,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addorupdatemappingportload")]
public async Task AddOrUpdatePortload([FromBody] MappingPortLoadDto dto)
{
var list = await _sysCacheService.GetAllMappingPortLoad();
var count = list.Where(x => x.Code == dto.Code&&x.Module==dto.Module && x.GID != dto.GID).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<MappingPortLoad>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
@ -472,6 +532,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addport")]
public async Task AddPort([FromBody] CodePortDto dto)
{
var list = await _sysCacheService.GetAllCodePort();
var count = list.Where(x => x.Code == dto.Code ).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<CodePort>();
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
@ -510,6 +576,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addorupdatemappingport")]
public async Task AddOrUpdatePort([FromBody] MappingPortDto dto)
{
var list = await _sysCacheService.GetAllMappingPort();
var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module && x.GID != dto.GID).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<MappingPort>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
@ -550,6 +622,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addpackage")]
public async Task AddPackage([FromBody] CodePackageDto dto)
{
var list = await _sysCacheService.GetAllCodePackage();
var count = list.Where(x => x.Code == dto.Code ).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<CodePackage>();
entity.GID = Guid.NewGuid().ToString();
await _codePackageRep.InsertAsync(entity);
@ -588,6 +666,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addorupdatemappingpackage")]
public async Task AddOrUpdateMappingPackage([FromBody] MappingPackageDto dto)
{
var list = await _sysCacheService.GetAllMappingPackage();
var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module && x.GID != dto.GID).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<MappingPackage>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
@ -629,6 +713,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addservice")]
public async Task AddService([FromBody] CodeServiceDto dto)
{
var list = await _sysCacheService.GetAllCodeService();
var count = list.Where(x => x.Code == dto.Code ).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<CodeService>();
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
@ -668,6 +758,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addorupdatemappingservice")]
public async Task AddOrUpdateMappingService([FromBody] MappingServiceDto dto)
{
var list = await _sysCacheService.GetAllMappingService();
var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module && x.GID != dto.GID).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<MappingService>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
@ -711,6 +807,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addctn")]
public async Task AddCtn([FromBody] CodeCtnDto dto)
{
var list = await _sysCacheService.GetAllCodeCtn();
var count = list.Where(x => x.Code == dto.Code ).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<CodeCtn>();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
@ -750,6 +852,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addmappingctn")]
public async Task AddOrUpdateMappingCtn([FromBody] MappingCtnDto dto)
{
var list = await _sysCacheService.GetAllMappingCtn();
var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module && x.GID != dto.GID).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<MappingCtn>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
@ -795,6 +903,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addfrt")]
public async Task AddFrt([FromBody] CodeFrtDto dto)
{
var list = await _sysCacheService.GetAllCodeFrt();
var count = list.Where(x => x.Code == dto.Code ).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<CodeFrt>();
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
@ -830,6 +944,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addmappingfrt")]
public async Task AddOrUpdateMappingFrt([FromBody] MappingFrtDto dto)
{
var list = await _sysCacheService.GetAllMappingFrt();
var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module&&x.GID!=dto.GID).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<MappingFrt>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
@ -871,6 +991,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addcodeissuetype")]
public async Task AddCodeIssueType([FromBody] CodeIssueTypeDto dto)
{
var list = await _sysCacheService.GetAllCodeIssueType();
var count = list.Where(x => x.Code == dto.Code ).Count();
if (count > 0)
{
throw Oops.Bah(ErrorCode.D1006);
}
var entity = dto.Adapt<CodeIssueType>();
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;

@ -297,7 +297,7 @@ public class SysTimerService : ISysTimerService, IDynamicApiController, IScoped
if (taskMethods != null) return taskMethods;
// 获取所有本地任务方法必须有spareTimeAttribute特性
taskMethods = App.EffectiveTypes
taskMethods = App.EffectiveTypes
.Where(u => u.IsClass && !u.IsInterface && !u.IsAbstract && typeof(ISpareTimeWorker).IsAssignableFrom(u))
.SelectMany(u => u.GetMethods(BindingFlags.Public | BindingFlags.Instance)
.Where(m => m.IsDefined(typeof(SpareTimeAttribute), false) &&

Loading…
Cancel
Save