Skip to content

Commit

Permalink
Merge pull request #4275 from cisagov/feature/cset-2884
Browse files Browse the repository at this point in the history
feature: cset-2884 refactor ReportsDataBusiness
  • Loading branch information
randywoods authored Dec 5, 2024
2 parents 5b75c31 + 5cbddcc commit 7aa644c
Show file tree
Hide file tree
Showing 6 changed files with 2,924 additions and 2,870 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ public class CmmcBusiness
private CSETContext _context;
private readonly IAssessmentUtil _assessmentUtil;
private readonly IAdminTabBusiness _adminTabBusiness;

private int _maturityModelId;

private static object myLock = new object();

private TranslationOverlay _overlay;

private AdditionalSupplemental _addlSuppl;
Expand Down Expand Up @@ -107,12 +102,12 @@ public int GetScoreForLevel(int assessmentId, int level)
var levelId = _context.MATURITY_LEVELS
.Where(x => x.Level == level && x.Maturity_Model_Id == modelIdCmmc2)
.Select(x => x.Maturity_Level_Id)
.FirstOrDefault();
.FirstOrDefault();

var query = from a in _context.ANSWER
join q in _context.MATURITY_QUESTIONS on a.Question_Or_Requirement_Id equals q.Mat_Question_Id
where q.Maturity_Level_Id == levelId && a.Assessment_Id == assessmentId
select a;
join q in _context.MATURITY_QUESTIONS on a.Question_Or_Requirement_Id equals q.Mat_Question_Id
where q.Maturity_Level_Id == levelId && a.Assessment_Id == assessmentId
select a;

var answerList = query.ToList().Select(x => x.Answer_Text).ToList();

Expand Down
Loading

0 comments on commit 7aa644c

Please sign in to comment.