usertest
ZR20090193-陈敬勇 6 months ago
parent 7327871214
commit c321a798c4

@ -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);
}

@ -14,11 +14,8 @@ namespace DS.WMS.Core.Code.Entity
/// </summary>
[SqlSugar.SugarTable("code_check_bill_template", "客户对账模板")]
public class CodeCheckBillTemplate : BaseModel<long>
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
{
/// <summary>
/// 对账模板名称
/// </summary>

@ -83,7 +83,7 @@ public class SaasTest
{
Type[] types = Assembly
.LoadFrom("DS.WMS.Core.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe
.GetTypes().Where(it => it.FullName.Contains("DS.WMS.Core.Check.Entity"))//命名空间过滤,当然你也可以写其他条件过滤
.GetTypes().Where(it => it.FullName.Contains("DS.WMS.Core.Code.Entity"))//命名空间过滤,当然你也可以写其他条件过滤
.ToArray();
var tenantDb = saasService.GetBizDbScopeById("1750335377144680448");
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持

Loading…
Cancel
Save