点巡检报表 设备维修复核
This commit is contained in:
@@ -273,7 +273,8 @@ namespace Tnb.EquipMgr
|
||||
{
|
||||
if (_userManager.UserId == eqpRepairApply.repairer_id)
|
||||
{
|
||||
string status = input.is_out_apply == 1 ? RepairApplyStatus.TOBEOUTAPPLY : RepairApplyStatus.COMPLETED;
|
||||
// string status = input.is_out_apply == 1 ? RepairApplyStatus.TOBEOUTAPPLY : RepairApplyStatus.COMPLETED;
|
||||
string status = input.is_out_apply == 1 ? RepairApplyStatus.TOBEOUTAPPLY : RepairApplyStatus.REPEATCHECKING;
|
||||
_ = await _repository.UpdateAsync(x => new EqpRepairApply()
|
||||
{
|
||||
fault_id = input.fault_id,
|
||||
@@ -426,5 +427,28 @@ namespace Tnb.EquipMgr
|
||||
|
||||
return PageResult<PadRepairListOutput>.SqlSugarPageResult(result);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<string> Repeat(RepairApplyRepeatInput input)
|
||||
{
|
||||
|
||||
EqpRepairApply eqpRepairApply = await _repository.GetSingleAsync(x => x.id == input.id);
|
||||
if (eqpRepairApply.status == RepairApplyStatus.REPEATCHECKING)
|
||||
{
|
||||
string status = input.repeat_result=="1" ? RepairApplyStatus.COMPLETED : RepairApplyStatus.TOBEEXECUTED;
|
||||
await _repository.AsSugarClient().Updateable<EqpRepairApply>()
|
||||
.SetColumns(x => x.repeat_result == input.repeat_result)
|
||||
.SetColumns(x => x.repeat_descrip == input.repeat_descrip)
|
||||
.SetColumns(x => x.status == status)
|
||||
.Where(x => x.id == input.id).ExecuteCommandAsync();
|
||||
return "复核成功";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw Oops.Bah("状态错误");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user