using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TEAMModelOS.SDK.Models.Cosmos.Common { public class Scoring : CosmosEntity { public Scoring() { pk = "Scoring"; } public string stuId { get; set; } public string examId { get; set; } public string subjectId { get; set; } public List items { get; set; } = new List(); public string blob { get; set; } public List tIds { get; set; } = new List(); public List marks { get; set; } = new List(); public List scores { get; set; } = new List(); public int model { get; set; } public string mode { get; set; } //阅卷类型1 正常卷 2 异常卷 3 仲裁卷 public int type { get; set; } public string err { get; set; } } public class Item { public List scores { get; set; } = new List(); //原题的配分 public double ssc { get; set; } //public string tmdId { get; set; } public bool flag { get { if (scores.Count >= 2) { List sc = scores.Select(s => s.tmdId).Where(c => string.IsNullOrEmpty(c)).ToList(); if (sc.Count > 0) { return true; } double diff = Math.Abs(scores.Select(s => s.sc).ToList().Aggregate((i, j) => (i - j) * 6)); if (diff > ssc) { return false; } else { return true; } } else { return true; } } } } public class Info { public double sc { get; set; } public string tmdId { get; set; } public int index { get;set; } } }