执行代码清理,修复warning
This commit is contained in:
@@ -30,22 +30,25 @@ namespace Tnb.EquipMgr
|
||||
string id = parameters["id"];
|
||||
DbResult<bool> result = await _repository.AsSugarClient().Ado.UseTranAsync(async () =>
|
||||
{
|
||||
await _repository.UpdateAsync(x => new EqpMaintainTemEquipH()
|
||||
_ = await _repository.UpdateAsync(x => new EqpMaintainTemEquipH()
|
||||
{
|
||||
is_start = "0"
|
||||
}, x => x.id == id);
|
||||
List<string> ids = await _repository.AsSugarClient().Queryable<EqpMaintainRecordH>()
|
||||
.Where(x => x.maintain_tem_equip_id == id && x.status == SpotInsRecordExecutionStatus.TOBEEXECUTED)
|
||||
.Select(x => x.id).ToListAsync();
|
||||
await _repository.AsSugarClient().Deleteable<EqpMaintainRecordH>()
|
||||
_ = await _repository.AsSugarClient().Deleteable<EqpMaintainRecordH>()
|
||||
.Where(x => x.maintain_tem_equip_id == id && x.status == SpotInsRecordExecutionStatus.TOBEEXECUTED).ExecuteCommandAsync();
|
||||
|
||||
await _repository.AsSugarClient().Deleteable<EqpMaintainRecordD>()
|
||||
_ = await _repository.AsSugarClient().Deleteable<EqpMaintainRecordD>()
|
||||
.Where(x => ids.Contains(x.maintain_record_id)).ExecuteCommandAsync();
|
||||
|
||||
});
|
||||
|
||||
if (!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
throw Oops.Oh(ErrorCode.COM1008);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user