diff --git a/EquipMgr/Tnb.EquipMgr/EquMaintainRecordService.cs b/EquipMgr/Tnb.EquipMgr/EquMaintainRecordService.cs index 043561b7..b5ed35e9 100644 --- a/EquipMgr/Tnb.EquipMgr/EquMaintainRecordService.cs +++ b/EquipMgr/Tnb.EquipMgr/EquMaintainRecordService.cs @@ -200,6 +200,11 @@ namespace Tnb.EquipMgr public async Task RepeatMaintain(MaintainRecordRepeatInput input) { var db = _repository.AsSugarClient(); + EqpMaintainRecordH eqpMaintainRecordH = await _repository.GetSingleAsync(x => x.id == input.id); + if (eqpMaintainRecordH.status == "1") + { + throw Oops.Bah("状态错误"); + } DbResult result = await db.Ado.UseTranAsync(async () => { diff --git a/EquipMgr/Tnb.EquipMgr/EquSpotInsRecordService.cs b/EquipMgr/Tnb.EquipMgr/EquSpotInsRecordService.cs index 936f43dc..ae8bc2a6 100644 --- a/EquipMgr/Tnb.EquipMgr/EquSpotInsRecordService.cs +++ b/EquipMgr/Tnb.EquipMgr/EquSpotInsRecordService.cs @@ -119,6 +119,7 @@ namespace Tnb.EquipMgr DbResult result = await _repository.AsSugarClient().Ado.UseTranAsync(async () => { EqpSpotInsRecordH eqpSpotInsRecordH = _repository.GetSingle(x=>x.id==input.id); + string status = ""; if (eqpSpotInsRecordH.is_repeat == "1") { @@ -184,6 +185,11 @@ namespace Tnb.EquipMgr [HttpPost] public async Task RepeatSpotIns(SpotInsRecordRepeatInput input) { + EqpSpotInsRecordH eqpSpotInsRecordH = await _repository.GetSingleAsync(x => x.id == input.id); + if (eqpSpotInsRecordH.status == "1") + { + throw Oops.Bah("状态错误"); + } await _repository.UpdateAsync(x => new EqpSpotInsRecordH() { repeat_result = input.repeat_result,