执行代码清理,修复warning
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Tnb.EquipMgr
|
||||
DbResult<bool> result = await _repository.AsSugarClient().Ado.UseTranAsync(async () =>
|
||||
{
|
||||
EqpRepairApply eqpRepairApply = await _repository.AsSugarClient().Queryable<EqpRepairApply>().SingleAsync(x => x.id == input.repair_apply_id);
|
||||
EqpRepairDelay repairDelay = new EqpRepairDelay()
|
||||
EqpRepairDelay repairDelay = new()
|
||||
{
|
||||
id = SnowflakeIdHelper.NextId(),
|
||||
equip_id = eqpRepairApply?.equip_id ?? "",
|
||||
@@ -52,15 +52,14 @@ namespace Tnb.EquipMgr
|
||||
create_time = DateTime.Now,
|
||||
|
||||
};
|
||||
await _repository.InsertAsync(repairDelay);
|
||||
_ = await _repository.InsertAsync(repairDelay);
|
||||
|
||||
await _repository.AsSugarClient().Updateable<EqpRepairApply>()
|
||||
_ = await _repository.AsSugarClient().Updateable<EqpRepairApply>()
|
||||
.SetColumns(x => x.expect_complete_time == input.expected_time)
|
||||
.Where(x => x.id == input.repair_apply_id).ExecuteCommandAsync();
|
||||
});
|
||||
|
||||
if (!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
return result.IsSuccess ? "延期成功" : result.ErrorMessage;
|
||||
return !result.IsSuccess ? throw Oops.Oh(ErrorCode.COM1008) : result.IsSuccess ? "延期成功" : result.ErrorMessage;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user