1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- 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<Item> items { get; set; } = new List<Item>();
- public string blob { get; set; }
- public List<string> tIds { get; set; } = new List<string>();
- public List<string> marks { get; set; } = new List<string>();
- public List<double> scores { get; set; } = new List<double>();
- public int model { get; set; }
- public string mode { get; set; }
- }
- public class Item
- {
- public List<Info> scores { get; set; } = new List<Info>();
- //原题的配分
- public double ssc { get; set; }
- //public string tmdId { get; set; }
- public bool flag
- {
- get
- {
- if (scores.Count >= 2)
- {
- List<string> 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; }
- }
- }
|