|
|
@ -1712,6 +1712,24 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 2024-11-10 陈冠宇反馈,其公司有操作使用船公司与船期信息间的漏洞:检验保存的船期信息 包含:船公司+开船日期+船名航次,是否可以与船名航次维护模块已维护的数据匹配;
|
|
|
|
|
|
|
|
// 若无法成功匹配,则报错不允许保存;严格要求操作按照已维护的船名航次信息进行处理
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(entity.CARRIERID) && entity.ETD != null && !string.IsNullOrEmpty(entity.VESSEL) && !string.IsNullOrEmpty(entity.VOYNO))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var sql = _vesselInfo.AsQueryable().Filter(null, true).Where(x => x.CARRIERID == entity.CARRIERID
|
|
|
|
|
|
|
|
&& x.ETD.Value.Date == entity.ETD.Value.Date
|
|
|
|
|
|
|
|
&& x.Vessel == entity.VESSEL
|
|
|
|
|
|
|
|
&& x.Voyno == entity.VOYNO).ToSqlString();
|
|
|
|
|
|
|
|
var isInVesselInfo = await _vesselInfo.AsQueryable().Filter(null, true).Where(x => x.CARRIERID == entity.CARRIERID
|
|
|
|
|
|
|
|
&& x.ETD.Value.Date == entity.ETD.Value.Date
|
|
|
|
|
|
|
|
&& x.Vessel == entity.VESSEL
|
|
|
|
|
|
|
|
&& x.Voyno == entity.VOYNO).AnyAsync();
|
|
|
|
|
|
|
|
if (!isInVesselInfo)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
throw Oops.Bah("船名航次匹配错误!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (input.Id == 0)
|
|
|
|
if (input.Id == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (string.IsNullOrEmpty(entity.VOYNO))
|
|
|
|
if (string.IsNullOrEmpty(entity.VOYNO))
|
|
|
|