海运出口编辑提单号重复判断排除改配和退单情形;改配退舱修改

dev
cjy 1 month ago
parent ee9f528486
commit 7048b7736d

@ -588,10 +588,10 @@ namespace DS.WMS.Core.Op.Method
var info = await tenantDb.Queryable<SeaExport>().Where(x => x.Id == long.Parse(req.Id)).FirstAsync();
if (info.IsNull())
return await Task.FromResult(DataResult.Failed("不存在的海运出口信息!", MultiLanguageConst.SeaExportExist));
if (info.IsRefund == false)
{
return await Task.FromResult(DataResult.Failed("订单状态必须为退舱标识!"));
}
//if (info.IsRefund == false)
//{
// return await Task.FromResult(DataResult.Failed("订单状态必须为退舱标识!"));
//}
var task = await tenantDb.Queryable<BusinessTask>().Where(x => x.BusinessId == long.Parse(req.Id) && x.TaskType == TaskBaseTypeEnum.RETURN_CABIN_POOL).FirstAsync();
if (task.IsNotNull() && task.TaskStatus == TaskStatusEnum.Complete)
@ -639,10 +639,10 @@ namespace DS.WMS.Core.Op.Method
var info = await tenantDb.Queryable<SeaExport>().Where(x => x.Id == long.Parse(req.Id)).FirstAsync();
if (info.IsNull())
return await Task.FromResult(DataResult.Failed("不存在的海运出口信息!", MultiLanguageConst.SeaExportExist));
if (info.IsRefund == false)
{
return await Task.FromResult(DataResult.Failed("订单状态必须为退舱标识!"));
}
//if (info.IsRefund == false)
//{
// return await Task.FromResult(DataResult.Failed("订单状态必须为退舱标识!"));
//}
var task = await tenantDb.Queryable<BusinessTask>().Where(x => x.BusinessId == long.Parse(req.Id) && x.TaskType == TaskBaseTypeEnum.RETURN_CABIN).FirstAsync();

@ -219,7 +219,7 @@ public partial class SeaExportService : ISeaExportService
}
else
{
if (req.BLType != "拼箱分票" && !string.IsNullOrEmpty(req.MBLNO) && tenantDb.Queryable<SeaExport>().Where(x => x.Id != req.Id && x.MBLNO == req.MBLNO.Trim()).Any())
if (req.BLType != "拼箱分票" && !string.IsNullOrEmpty(req.MBLNO) && tenantDb.Queryable<SeaExport>().Where(x => x.Id != req.Id && x.MBLNO == req.MBLNO.Trim() && !(x.IsChangeETD == true || x.IsRefund == true)).Any())
{
return await Task.FromResult(DataResult.Failed("海运出口信息主提单号已存在!", MultiLanguageConst.SeaExportMBLNOExist));
}

Loading…
Cancel
Save