执行代码清理,修复warning

This commit is contained in:
2023-11-06 19:59:12 +08:00
parent c6b8dfc861
commit 1dbb17f103
118 changed files with 5046 additions and 4111 deletions

View File

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