This commit is contained in:
2023-10-30 11:26:50 +08:00
parent bd7f854f31
commit 2291c4f096
2 changed files with 11 additions and 0 deletions

View File

@@ -200,6 +200,11 @@ namespace Tnb.EquipMgr
public async Task<string> 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<bool> result = await db.Ado.UseTranAsync(async () =>
{

View File

@@ -119,6 +119,7 @@ namespace Tnb.EquipMgr
DbResult<bool> 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,