20221114知识竞赛人员类型抽取优化
This commit is contained in:
@@ -163,7 +163,7 @@ namespace BLL
|
||||
{
|
||||
if (getTestPlan.TestEndTime > DateTime.Now)
|
||||
{
|
||||
var getTestPlanTraining = db.Test_TestPlanTraining.Where(x => x.TestPlanId == getTestPlan.TestPlanId && x.UserType == testRecord.UserType);
|
||||
var getTestPlanTraining = db.Test_TestPlanTraining.Where(x => x.TestPlanId == getTestPlan.TestPlanId && (x.UserType == testRecord.UserType || x.UserType == null));
|
||||
if (getTestPlanTraining.Count() > 0)
|
||||
{
|
||||
int cout1 = getTestPlanTraining.Sum(x => x.TestType1Count ?? 0);
|
||||
@@ -294,7 +294,7 @@ namespace BLL
|
||||
var item = db.Test_TestRecordItem.FirstOrDefault(x => x.TestRecordId == testRecordId);
|
||||
if (item == null)
|
||||
{
|
||||
var getTestPlanTraining = db.Test_TestPlanTraining.Where(x => x.TestPlanId == testPlanId && x.UserType == getTestRecord.ManType);
|
||||
var getTestPlanTraining = db.Test_TestPlanTraining.Where(x => x.TestPlanId == testPlanId && (x.UserType == getTestRecord.ManType || x.UserType == null));
|
||||
if (getTestPlanTraining.Count() > 0)
|
||||
{
|
||||
List<Model.Training_TestTrainingItem> getTestTrainingItemList = new List<Model.Training_TestTrainingItem>();
|
||||
|
||||
Reference in New Issue
Block a user