EDI参数设置问题

booking_auth_dev
wanghaomei 2 years ago
parent c55ac67c3e
commit 8b0e221506

@ -5832,14 +5832,14 @@
业务状态
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.BSSTATUSNAME">
<member name="P:Myshipping.Application.BookingOrderInput.BBSDATE">
<summary>
业务状态名称
业务开始日期
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.BSDATE">
<member name="P:Myshipping.Application.BookingOrderInput.EBSDATE">
<summary>
业务日期
业务截止日期
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.MBLNO">
@ -5867,21 +5867,6 @@
客户合同号
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.SHIPPERID">
<summary>
发货人代码
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.CONSIGNEEID">
<summary>
收货人代码
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.NOTIFYPARTYID">
<summary>
通知人代码
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.SHIPPER">
<summary>
发货人
@ -5907,11 +5892,6 @@
场站代码
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.YARD">
<summary>
场站
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.VESSELID">
<summary>
船舶呼号
@ -5932,39 +5912,64 @@
内部航次
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.ETD">
<member name="P:Myshipping.Application.BookingOrderInput.BETD">
<summary>
开船日期
开船日期开始
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.ATD">
<member name="P:Myshipping.Application.BookingOrderInput.EETD">
<summary>
实际开船日期
开船日期截止
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.CLOSINGDATE">
<member name="P:Myshipping.Application.BookingOrderInput.BATD">
<summary>
截港日期
实际开船日期开始
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.CLOSEDOCDATE">
<member name="P:Myshipping.Application.BookingOrderInput.EATD">
<summary>
截单日期
实际开船日期截止
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.CLOSEVGMDATE">
<member name="P:Myshipping.Application.BookingOrderInput.BCLOSINGDATE">
<summary>
VGM时间
港日期开始
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.ETA">
<member name="P:Myshipping.Application.BookingOrderInput.ECLOSINGDATE">
<summary>
预计到港日期
截港日期截止
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.PLACERECEIPTID">
<member name="P:Myshipping.Application.BookingOrderInput.BCLOSEDOCDATE">
<summary>
收货地代码
截单日期开始
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.ECLOSEDOCDATE">
<summary>
截单日期截止
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.BCLOSEVGMDATE">
<summary>
截VGM时间开始
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.ECLOSEVGMDATE">
<summary>
截VGM时间截止
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.BETA">
<summary>
预计到港日期开始
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.EETA">
<summary>
预计到港日期截止
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.PLACERECEIPT">
@ -6027,7 +6032,12 @@
签单方式
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.ISSUEDATE">
<member name="P:Myshipping.Application.BookingOrderInput.BISSUEDATE">
<summary>
签单日期
</summary>
</member>
<member name="P:Myshipping.Application.BookingOrderInput.EISSUEDATE">
<summary>
签单日期
</summary>

@ -54,17 +54,20 @@ namespace Myshipping.Core.Service
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/DjyEdiSetting/add")]
public async Task Add(AddDjyEdiSettingInput input)
public async Task<long> Add(AddDjyEdiSettingInput input)
{
var cc = _rep.Count(x => x.EDICODE == input.EDICODE && x.TenantId == input.TenantId);
var cc = _rep.AsQueryable()
.Filter(null, true)
.Count(x => x.EDICODE == input.EDICODE && x.TenantId == input.TenantId && x.CARRIERID == input.CARRIERID);
if (cc > 0)
{
throw Oops.Bah($"该租户({input.TenantName})已存在相同类型({input.EDICODE}的参数设置");
throw Oops.Bah($"该租户({input.TenantName})已存在相同类型({input.EDICODE}相同船司({input.CARRIERID}的参数设置");
}
var entity = input.Adapt<DjyEdiSetting>();
await _rep.InsertAsync(entity);
await CacheData();
return entity.Id;
}
/// <summary>
@ -73,18 +76,28 @@ namespace Myshipping.Core.Service
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/DjyEdiSetting/edit")]
public async Task Update(UpdateDjyEdiSettingInput input)
public async Task<long> Update(UpdateDjyEdiSettingInput input)
{
var entity = _rep.FirstOrDefault(x => x.EDICODE == input.EDICODE && x.TenantId == input.TenantId);
var entity = _rep.AsQueryable()
.Filter(null, true)
.First(x => x.Id == input.Id);
if (entity == null)
{
throw Oops.Bah($"未找到数据");
}
var cc = _rep.AsQueryable().Filter(null, true)
.Count(x => x.EDICODE == input.EDICODE && x.TenantId == input.TenantId && x.CARRIERID == input.CARRIERID && x.Id != input.Id);
if (cc > 0)
{
throw Oops.Bah($"该租户({input.TenantName})已存在相同类型({input.EDICODE})相同船司({input.CARRIERID})的参数设置");
}
entity = input.Adapt(entity);
await _rep.UpdateAsync(entity);
await CacheData();
return entity.Id;
}
/// <summary>
@ -95,7 +108,8 @@ namespace Myshipping.Core.Service
[HttpPost("/DjyEdiSetting/delete")]
public async Task Delete(GetDjyEdiSettingInput input)
{
var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
var entity = await _rep.AsQueryable().Filter(null, true)
.FirstAsync(u => u.Id == input.Id);
if (entity == null)
{
throw Oops.Bah($"未找到数据");
@ -112,7 +126,7 @@ namespace Myshipping.Core.Service
[HttpGet("/DjyEdiSetting/detail")]
public async Task<DjyEdiSetting> Get([FromQuery] GetDjyEdiSettingInput input)
{
return await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
return await _rep.AsQueryable().Filter(null, true).FirstAsync(u => u.Id == input.Id);
}
/// <summary>

@ -8,8 +8,8 @@ namespace Myshipping.Core.Service
public interface IDjyEdiSettingService
{
Task<dynamic> Page([FromQuery] QueryDjyEdiSettingInput input);
Task Add(AddDjyEdiSettingInput input);
Task Update(UpdateDjyEdiSettingInput input);
Task<long> Add(AddDjyEdiSettingInput input);
Task<long> Update(UpdateDjyEdiSettingInput input);
Task Delete(GetDjyEdiSettingInput input);
Task<DjyEdiSetting> Get([FromQuery] GetDjyEdiSettingInput input);
//Task<dynamic> List([FromQuery] QueryDjyEdiSettingInput input);

Loading…
Cancel
Save