|
|
|
@ -435,12 +435,17 @@ namespace DS.WMS.Core.Check.Method
|
|
|
|
|
if (req.Ids.Length==0)
|
|
|
|
|
return DataResult.Failed("业务Ids不能为空");
|
|
|
|
|
|
|
|
|
|
if (tenantDb.Queryable<CheckBill>().Where(x=>x.IsLocking == true).Any())
|
|
|
|
|
if (tenantDb.Queryable<CheckBill>().Where(x=> req.Ids.Contains(x.Id) && x.IsLocking == true).Any())
|
|
|
|
|
return DataResult.Failed("存在已锁定的客户对账信息");
|
|
|
|
|
|
|
|
|
|
var list = tenantDb.Queryable<CheckBill>().Where(x => req.Ids.Contains(x.Id)).ToList();
|
|
|
|
|
|
|
|
|
|
tenantDb.Updateable(list).SetColumns(it=>it.IsLocking == true).ExecuteCommand();
|
|
|
|
|
//tenantDb.Updateable(list).SetColumns(it=>it.IsLocking == true).ExecuteCommand();
|
|
|
|
|
|
|
|
|
|
foreach (var item in list) {
|
|
|
|
|
item.IsLocking = true;
|
|
|
|
|
}
|
|
|
|
|
tenantDb.Updateable(list).ExecuteCommand();
|
|
|
|
|
|
|
|
|
|
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
|
|
|
|
|
}
|
|
|
|
@ -456,12 +461,17 @@ namespace DS.WMS.Core.Check.Method
|
|
|
|
|
if (req.Ids.Length == 0)
|
|
|
|
|
return DataResult.Failed("业务Ids不能为空");
|
|
|
|
|
|
|
|
|
|
if (tenantDb.Queryable<CheckBill>().Where(x => x.IsLocking == false).Any())
|
|
|
|
|
if (tenantDb.Queryable<CheckBill>().Where(x => req.Ids.Contains(x.Id) && x.IsLocking == false).Any())
|
|
|
|
|
return DataResult.Failed("存在已解除锁定的客户对账信息");
|
|
|
|
|
|
|
|
|
|
var list = tenantDb.Queryable<CheckBill>().Where(x => req.Ids.Contains(x.Id)).ToList();
|
|
|
|
|
|
|
|
|
|
tenantDb.Updateable(list).SetColumns(it => it.IsLocking == false).ExecuteCommand();
|
|
|
|
|
//tenantDb.Updateable(list).SetColumns(it => it.IsLocking == false).ExecuteCommand();
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
|
item.IsLocking = false;
|
|
|
|
|
}
|
|
|
|
|
tenantDb.Updateable(list).ExecuteCommand();
|
|
|
|
|
|
|
|
|
|
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
|
|
|
|
|
}
|
|
|
|
|