Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -1076,8 +1076,9 @@ namespace Tnb.ProductionMgr
|
||||
throw new ArgumentException($"{nameof(input.Behavior)} not be null or empty");
|
||||
}
|
||||
ISqlSugarClient db = _repository.AsSugarClient();
|
||||
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
||||
try
|
||||
{
|
||||
await db.Ado.BeginTranAsync();
|
||||
List<PrdMoTask> prdTaskList = new List<PrdMoTask>();
|
||||
//var taskList = await _db.Queryable<PrdMoTask>().Where(it => input.TaskIds.Contains(it.id) && it.mo_task_status == DictConst.ToBeScheduledEncode).ToListAsync();
|
||||
//if (taskList?.Count > 0)
|
||||
@@ -1477,11 +1478,17 @@ namespace Tnb.ProductionMgr
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (!result.IsSuccess)
|
||||
throw Oops.Bah(result.ErrorMessage);
|
||||
return result.IsSuccess ? "保存成功" : result.ErrorMessage;
|
||||
await db.Ado.CommitTranAsync();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e.Message,e);
|
||||
await db.Ado.RollbackTranAsync();
|
||||
throw Oops.Bah(e.Message);
|
||||
}
|
||||
|
||||
return "保存成功";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -295,7 +295,7 @@ namespace Tnb.ProductionMgr
|
||||
)
|
||||
))
|
||||
{
|
||||
Log.Error($"{equipment.name}存在待下发的任务");
|
||||
Log.Error($"{equipment.name}存在未完成的任务");
|
||||
continue;
|
||||
}
|
||||
bool? value = await _redisData.TryGetValueByKeyField<bool?>(eqpDaq.equip_code, eqpDaq.label_name);
|
||||
|
||||
Reference in New Issue
Block a user