修改考试一级培训
This commit is contained in:
@@ -620,7 +620,7 @@ namespace BLL
|
||||
{
|
||||
BLL.RedisHelper redis = new BLL.RedisHelper();
|
||||
var getDataLists= redis.GetObjString<List<TestRecordItemItem>>(testRecordId); //先从redis取数据,不存在再从数据库取
|
||||
if (getDataLists.Count==0)
|
||||
if (getDataLists==null)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
@@ -98,6 +98,7 @@ namespace BLL
|
||||
GetConnectRedisMultiplexer();
|
||||
//添加注册事件
|
||||
AddRegisterEvent();
|
||||
SelectDB(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2053,11 +2054,18 @@ namespace BLL
|
||||
private static T DeserializeJson<T>(string strjson)
|
||||
{
|
||||
T tmp = default(T);
|
||||
if (!string.IsNullOrEmpty(strjson))
|
||||
try
|
||||
{
|
||||
tmp = JsonConvert.DeserializeObject<T>(strjson);
|
||||
if (!string.IsNullOrEmpty(strjson))
|
||||
{
|
||||
tmp = JsonConvert.DeserializeObject<T>(strjson);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
@@ -1766,3 +1766,36 @@ IP地址:::1
|
||||
|
||||
出错时间:03/29/2024 16:27:40
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:SqlException
|
||||
错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。
|
||||
错误堆栈:
|
||||
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
|
||||
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
|
||||
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
|
||||
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
|
||||
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
|
||||
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
|
||||
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
|
||||
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
|
||||
在 System.Data.Common.DbCommand.ExecuteReader()
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
|
||||
在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
|
||||
在 System.Linq.Queryable.Count[TSource](IQueryable`1 source)
|
||||
在 BLL.GetDataService.CorrectingPersonInOutNumber(String projectId) 位置 E:\2023公司项目\辰达\sggl_cd\SGGL\BLL\OpenService\GetDataService.cs:行号 140
|
||||
在 BLL.MonitorService.DoSynchData() 位置 E:\2023公司项目\辰达\sggl_cd\SGGL\BLL\OpenService\MonitorService.cs:行号 2180
|
||||
在 BLL.MonitorService.ColligateFormConfirmProcessEve(Object sender, ElapsedEventArgs e) 位置 E:\2023公司项目\辰达\sggl_cd\SGGL\BLL\OpenService\MonitorService.cs:行号 112
|
||||
----错误类型:Win32Exception
|
||||
----错误信息:
|
||||
----等待的操作过时。
|
||||
----错误堆栈:
|
||||
出错时间:04/07/2024 11:20:26
|
||||
出错时间:04/07/2024 11:20:26
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace Model
|
||||
/// <summary>
|
||||
/// 题目得分
|
||||
/// </summary>
|
||||
public decimal SubjectScore
|
||||
public decimal? SubjectScore
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
||||
@@ -357,7 +357,7 @@ namespace WebAPI.Controllers
|
||||
{
|
||||
BLL.RedisHelper redis = new RedisHelper();
|
||||
var trainingTestRecordItems = redis.GetObjString<List<Training_TestRecordItem>>(testRecordId); //根据试卷ID获取试卷题目列表
|
||||
var getTItem= trainingTestRecordItems.FirstOrDefault(x => x.TestRecordItemId== testRecordItemId); //获取试题
|
||||
var getTItem= trainingTestRecordItems?.FirstOrDefault(x => x.TestRecordItemId== testRecordItemId); //获取试题
|
||||
if (getTItem==null)
|
||||
{
|
||||
responeData.code = 0;
|
||||
@@ -436,7 +436,7 @@ namespace WebAPI.Controllers
|
||||
RedisHelper redis = new RedisHelper();
|
||||
var trainingTestRecordItems = redis.GetObjString<List<Training_TestRecordItem>>(testRecordId);
|
||||
|
||||
if (trainingTestRecordItems.Count>0)
|
||||
if (trainingTestRecordItems!=null)
|
||||
{
|
||||
var testRecordItem = from x in db.Training_TestRecordItem
|
||||
where x.TestRecordId == testRecordId
|
||||
@@ -524,7 +524,7 @@ namespace WebAPI.Controllers
|
||||
RedisHelper redis = new RedisHelper();
|
||||
var trainingTestRecordItems = redis.GetObjString<List<Training_TestRecordItem>>(testRecordId);
|
||||
|
||||
if (trainingTestRecordItems.Count > 0)
|
||||
if (trainingTestRecordItems!=null)
|
||||
{
|
||||
var modeltestRecordItem = from x in db.Training_TestRecordItem
|
||||
where x.TestRecordId == testRecordId
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace WebAPI
|
||||
BLL.Funs.ConnString = ConfigurationManager.AppSettings["ConnectionString"];
|
||||
BLL.Funs.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["PageSize"]);
|
||||
BLL.ErrLogInfo.DefaultErrLogFullPath = Server.MapPath("~/ErrLog.txt");
|
||||
PersonKqSocketSersvices.init(1000);
|
||||
//PersonKqSocketSersvices.init(1000);
|
||||
// 使api返回为json
|
||||
GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user