|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
using AngleSharp.Dom;
|
|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using DS.Module.Core.Data;
|
|
|
|
|
using DS.Module.Core.Extensions;
|
|
|
|
|
using DS.Module.SqlSugar;
|
|
|
|
|
using DS.Module.UserModule;
|
|
|
|
@ -318,39 +319,39 @@ public class SeaExportService : ISeaExportService
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 业务单据删除
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="Ids">业务Ids</param>
|
|
|
|
|
/// <param name="req">业务Ids</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public DataResult SeaExportBatchDel(List<long> Ids)
|
|
|
|
|
public DataResult SeaExportBatchDel(IdModel req)
|
|
|
|
|
{
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
if (Ids.Count == 0)
|
|
|
|
|
if (req.Ids.Length == 0)
|
|
|
|
|
{
|
|
|
|
|
return DataResult.Failed("海运出口批量操作未勾选!", MultiLanguageConst.SeaExportBatchOpNoSelect);
|
|
|
|
|
}
|
|
|
|
|
if (tenantDb.Queryable<SeaExport>().Where(x => Ids.Contains(x.Id)).Any().IsNull())
|
|
|
|
|
if (tenantDb.Queryable<SeaExport>().Where(x => req.Ids.Contains(x.Id)).Any().IsNull())
|
|
|
|
|
{
|
|
|
|
|
return DataResult.Failed("不存在的海运出口信息!", MultiLanguageConst.SeaExportExist);
|
|
|
|
|
}
|
|
|
|
|
if (tenantDb.Queryable<SeaExport>().Where(x => Ids.Contains(x.Id) && x.IsBusinessLocking == true).Any())
|
|
|
|
|
if (tenantDb.Queryable<SeaExport>().Where(x => req.Ids.Contains(x.Id) && x.IsBusinessLocking == true).Any())
|
|
|
|
|
{
|
|
|
|
|
return DataResult.Failed("海运出口信息业务已锁定!", MultiLanguageConst.SeaExportBusinessLock);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (tenantDb.Queryable<SeaExport>().Where(x => Ids.Contains(x.Id) && x.IsFeeLocking == true).Any())
|
|
|
|
|
if (tenantDb.Queryable<SeaExport>().Where(x => req.Ids.Contains(x.Id) && x.IsFeeLocking == true).Any())
|
|
|
|
|
{
|
|
|
|
|
return DataResult.Failed("海运出口信息费用已锁定!", MultiLanguageConst.SeaExportFeeLock);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (tenantDb.Queryable<SeaExport>().Where(x => Ids.Contains(x.ParentId)).Any())
|
|
|
|
|
if (tenantDb.Queryable<SeaExport>().Where(x => req.Ids.Contains(x.ParentId)).Any())
|
|
|
|
|
{
|
|
|
|
|
return DataResult.Failed("海运出口存在分票信息,不能删除!", MultiLanguageConst.SeaExportPartExist);
|
|
|
|
|
}
|
|
|
|
|
if (tenantDb.Queryable<FeeRecord>().Where(x => Ids.Contains(x.BusinessId)).Any())
|
|
|
|
|
if (tenantDb.Queryable<FeeRecord>().Where(x => req.Ids.Contains(x.BusinessId)).Any())
|
|
|
|
|
{
|
|
|
|
|
return DataResult.Failed("海运出口存在费用信息,不能删除!", MultiLanguageConst.SeaExportFeeExist);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var list = tenantDb.Queryable<SeaExport>().Where(x => Ids.Contains(x.Id)).ToList();
|
|
|
|
|
var list = tenantDb.Queryable<SeaExport>().Where(x => req.Ids.Contains(x.Id)).ToList();
|
|
|
|
|
|
|
|
|
|
//tenantDb.Deleteable(list).IsLogic().ExecuteCommand("Deleted");
|
|
|
|
|
//tenantDb.Deleteable<SeaExport>(list).IsLogic().ExecuteCommand("Deleted");
|
|
|
|
|