执行代码清理,修复warning
This commit is contained in:
@@ -48,23 +48,22 @@ namespace Tnb.EquipMgr
|
||||
|
||||
|
||||
string? locationId = "";
|
||||
if (input.data.TryGetValue("location_id", out var value))
|
||||
if (input.data.TryGetValue("location_id", out object? value))
|
||||
{
|
||||
locationId = value.ToString();
|
||||
}
|
||||
|
||||
string moldId = input.data.ContainsKey("mold_id") ? input.data["mold_id"].ToString() : "";
|
||||
string? moldId = input.data.ContainsKey("mold_id") ? input.data["mold_id"].ToString() : "";
|
||||
if (!string.IsNullOrEmpty(moldId))
|
||||
{
|
||||
await _db.Updateable<ToolMolds>()
|
||||
_ = await _db.Updateable<ToolMolds>()
|
||||
.SetColumns(x => x.mold_status == Tnb.BasicData.DictConst.ZKTypeId)
|
||||
.SetColumnsIF(!string.IsNullOrEmpty(locationId), x => x.location_id == locationId)
|
||||
.Where(X => X.id == moldId).ExecuteCommandAsync();
|
||||
}
|
||||
});
|
||||
|
||||
if (!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
return result.IsSuccess ? "保存成功" : result.ErrorMessage;
|
||||
return !result.IsSuccess ? throw Oops.Oh(ErrorCode.COM1008) : (dynamic)(result.IsSuccess ? "保存成功" : result.ErrorMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user