|
@@ -450,7 +450,7 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
|
|
|
List<Dictionary<string, object>> scatterAnalysis = new List<Dictionary<string, object>>();
|
|
|
//Dictionary<string, object> scatterAnalysis = new Dictionary<string, object>();
|
|
|
- List<SimpleExam> exams = await azureCosmosDBRepository.FindByDict<SimpleExam>(request.@params);
|
|
|
+ List<ExamResult> exams = await azureCosmosDBRepository.FindByDict<ExamResult>(request.@params);
|
|
|
Dictionary<string, object> stuMap = new Dictionary<string, object>
|
|
|
{
|
|
|
{ "schoolCode", "Habook" }
|
|
@@ -474,9 +474,9 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
if (exams.IsNotEmpty())
|
|
|
{
|
|
|
//提取班级信息
|
|
|
- List<Dictionary<string, int[]>> classToName = exams[0].Classes;
|
|
|
+ List<Dictionary<string, int[]>> classToName = exams[0].classes;
|
|
|
//提取学生ID信息
|
|
|
- List<string> idToName = exams[0].Ids;
|
|
|
+ List<string> idToName = exams[0].ids;
|
|
|
exams.ForEach(e =>
|
|
|
{
|
|
|
Dictionary<string, object> detail = new Dictionary<string, object>
|
|
@@ -486,10 +486,10 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
List<List<string>> datas = new List<List<string>>();
|
|
|
Dictionary<string, object> subject = new Dictionary<string, object>
|
|
|
{
|
|
|
- { "name", e.Subject }
|
|
|
+ { "name", e.subjectCode }
|
|
|
};
|
|
|
- double[] point = StringHelper.ListTodouble(e.Point);
|
|
|
- double[,] result = StringHelper.ListToDouble(e.Result);
|
|
|
+ double[] point = StringHelper.ListTodouble(e.point);
|
|
|
+ double[,] result = StringHelper.ListToDouble(e.result);
|
|
|
try
|
|
|
{
|
|
|
var cdm = new ClouDASMatrix(result, point);
|
|
@@ -504,16 +504,16 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
//需小心的题型
|
|
|
List<int[]> careful = cdm.CarefulTopic;
|
|
|
int i = 0;
|
|
|
- for (int k = e.Ids.Count - 1; k >= 0; k--)
|
|
|
+ for (int k = e.ids.Count - 1; k >= 0; k--)
|
|
|
{
|
|
|
- if (e.Ids[k].Equals("0"))
|
|
|
+ if (e.ids[k].Equals("0"))
|
|
|
{
|
|
|
- e.Ids.Remove(e.Ids[k]);
|
|
|
+ e.ids.Remove(e.ids[k]);
|
|
|
}
|
|
|
}
|
|
|
- e.Ids.ForEach(s =>
|
|
|
+ e.ids.ForEach(s =>
|
|
|
{
|
|
|
- if (e.Result[i].Sum() != 0)
|
|
|
+ if (e.result[i].Sum() != 0)
|
|
|
{
|
|
|
List<string> info = new List<string>
|
|
|
{
|
|
@@ -522,11 +522,11 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
sta[i].ToString(),
|
|
|
pass[i].ToString(),
|
|
|
i + 1 + "",
|
|
|
- e.Result[i].Sum().ToString()
|
|
|
+ e.result[i].Sum().ToString()
|
|
|
};
|
|
|
int right = 0;
|
|
|
int wrong = 0;
|
|
|
- foreach (int p in e.Result[i])
|
|
|
+ foreach (int p in e.result[i])
|
|
|
{
|
|
|
if (p > 0)
|
|
|
{
|
|
@@ -585,21 +585,24 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
|
|
|
HashSet<string> classList = new HashSet<string>();
|
|
|
List<Dictionary<string, object>> exerciseScatter = new List<Dictionary<string, object>>();
|
|
|
- //Dictionary<string, object> scatterAnalysis = new Dictionary<string, object>();
|
|
|
+ Dictionary<string, object> scatterAnalysis = new Dictionary<string, object>();
|
|
|
request.@params.TryGetValue("subjectCode", out object subjectCode);
|
|
|
request.@params.TryGetValue("schoolCode", out object schoolCode);
|
|
|
request.@params.TryGetValue("examCode", out object examCode);
|
|
|
+ request.@params.TryGetValue("scopeCode", out object scopeCode);
|
|
|
Dictionary<string, object> sub = new Dictionary<string, object>
|
|
|
{
|
|
|
- { "subjectCode", subjectCode.ToString()}
|
|
|
+ { "subjectCode", subjectCode.ToString()},
|
|
|
+ { "scopeCode",scopeCode.ToString()}
|
|
|
};
|
|
|
Dictionary<string, object> examMap = new Dictionary<string, object>
|
|
|
{
|
|
|
{ "subjectCode", subjectCode.ToString()},
|
|
|
- { "examCode", examCode.ToString()}
|
|
|
+ { "examCode", scopeCode.ToString()},
|
|
|
+ { "schoolCode", schoolCode.ToString()}
|
|
|
};
|
|
|
List<ExamResult> exams = await azureCosmosDBRepository.FindByDict<ExamResult>(examMap);
|
|
|
- List<ExamPaper> paper = await azureCosmosDBRepository.FindByDict<ExamPaper>(sub);
|
|
|
+ List<ExamPaper> paper = await azureCosmosDBRepository.FindByDict<ExamPaper> (sub);
|
|
|
List<string> key = new List<string>
|
|
|
{
|
|
|
"id",
|
|
@@ -801,9 +804,12 @@ namespace TEAMModelOS.Controllers.Analysis
|
|
|
request.@params.TryGetValue("subjectCode", out object subjectCode);
|
|
|
request.@params.TryGetValue("schoolCode", out object schoolCode);
|
|
|
request.@params.TryGetValue("examCode", out object examCode);
|
|
|
+ request.@params.TryGetValue("scopeCode", out object scopeCode);
|
|
|
Dictionary<string, object> sub = new Dictionary<string, object>
|
|
|
{
|
|
|
- { "subjectCode", subjectCode.ToString()}
|
|
|
+ { "subjectCode", subjectCode.ToString()},
|
|
|
+ { "scopeCode",scopeCode.ToString()}
|
|
|
+
|
|
|
};
|
|
|
Dictionary<string, object> examMap = new Dictionary<string, object>
|
|
|
{
|