消除warning
This commit is contained in:
@@ -49,15 +49,20 @@ namespace Tnb.EquipMgr
|
||||
await _runService.Create(templateEntity, input);
|
||||
|
||||
|
||||
string locationId = "";
|
||||
string? locationId = "";
|
||||
if (input.data.TryGetValue("location_id", out var value))
|
||||
{
|
||||
locationId = value.ToString();
|
||||
}
|
||||
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 == input.data["mold_id"]).ExecuteCommandAsync();
|
||||
|
||||
string moldId = input.data.ContainsKey("mold_id") ? input.data["mold_id"].ToString() : "";
|
||||
if (!string.IsNullOrEmpty(moldId))
|
||||
{
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user