1代码合并

This commit is contained in:
2025-02-05 17:57:14 +08:00
parent 4bbce72980
commit 5712066e0a
57 changed files with 334 additions and 3709 deletions
@@ -33,8 +33,6 @@ namespace BLL
newCompanyTrainingItem.AttachUrl = companyTrainingItem.AttachUrl;
newCompanyTrainingItem.CompileMan = companyTrainingItem.CompileMan;
newCompanyTrainingItem.CompileDate = companyTrainingItem.CompileDate;
newCompanyTrainingItem.LearningTime = companyTrainingItem.LearningTime;
newCompanyTrainingItem.TestTrainingIds = companyTrainingItem.TestTrainingIds;
db.Training_CompanyTrainingItem.InsertOnSubmit(newCompanyTrainingItem);
db.SubmitChanges();
}
@@ -53,8 +51,6 @@ namespace BLL
newCompanyTrainingItem.AttachUrl = companyTrainingItem.AttachUrl;
newCompanyTrainingItem.CompileMan = companyTrainingItem.CompileMan;
newCompanyTrainingItem.CompileDate = companyTrainingItem.CompileDate;
newCompanyTrainingItem.LearningTime = companyTrainingItem.LearningTime;
newCompanyTrainingItem.TestTrainingIds = companyTrainingItem.TestTrainingIds;
db.SubmitChanges();
}
}
@@ -152,37 +152,5 @@ namespace BLL
}
return icount;
}
public static void AddTestRecordForApi(Model.Training_TestRecord testRecord)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.Training_TestRecord newTestRecord = new Model.Training_TestRecord
{
TestRecordId = testRecord.TestRecordId,
ProjectId = testRecord.ProjectId,
TestPlanId = testRecord.TestPlanId,
TestManId = testRecord.TestManId,
TestType = testRecord.TestType,
};
if (string.IsNullOrEmpty(newTestRecord.TestType))
{
var getTrainTypeName = (from x in db.Training_TestPlan
join y in db.Training_Plan on x.PlanId equals y.PlanId
join z in db.Base_TrainType on y.TrainTypeId equals z.TrainTypeId
where x.TestPlanId == testRecord.TestPlanId
select z).FirstOrDefault();
if (getTrainTypeName != null)
{
testRecord.TestType = getTrainTypeName.TrainTypeName;
}
}
db.Training_TestRecord.InsertOnSubmit(newTestRecord);
db.SubmitChanges();
}
}
}
}
@@ -52,8 +52,7 @@ namespace BLL
ResourcesFromType = trainingItem.ResourcesFromType,
IsPass = trainingItem.IsPass,
UnitId = trainingItem.UnitId,
UpState = trainingItem.UpState,
LearningTime = trainingItem.LearningTime
UpState = trainingItem.UpState
};
db.Training_TrainingItem.InsertOnSubmit(newTrainingItem);
@@ -81,7 +80,6 @@ namespace BLL
newTrainingItem.ResourcesFrom = trainingItem.ResourcesFrom;
newTrainingItem.ResourcesFromType = trainingItem.ResourcesFromType;
newTrainingItem.UpState = trainingItem.UpState;
newTrainingItem.LearningTime = trainingItem.LearningTime;
db.SubmitChanges();
}
-18
View File
@@ -750,23 +750,5 @@ namespace BLL
};
}
#endregion
public static Model.SitePerson_Person GetPersonByUserIdForApi(string userId, string projectId)
{
using (var db = new Model.SGGLDB(Funs.ConnString))
{
var getPerson = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == userId);
if (getPerson == null)
{
var getUser = db.Sys_User.FirstOrDefault(e => e.UserId == userId);
if (getUser != null)
{
getPerson = db.SitePerson_Person.FirstOrDefault(e => e.IdentityCard == getUser.IdentityCard && e.ProjectId == projectId);
}
}
return getPerson;
}
}
}
}