xiaochanghai 12 months ago
parent 1f6026e98c
commit 8c29658f1b
  1. 1201
      Model/Tiobon.Web.pdm
  2. 15
      Tiobon.Core.Model/ViewModels/Extend/DefaultGhre_ExamPaperInput.cs
  3. 15
      Tiobon.Core.Model/ViewModels/Extend/Ghre_ExamRecordExtend.cs
  4. 45
      Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs

File diff suppressed because it is too large Load Diff

@ -44,12 +44,27 @@ public class DefaultGhre_ExamPaperPageData
public List<Ghre_ExamPaperConfig> examPaperSetData { get; set; } = new List<Ghre_ExamPaperConfig> { };
public List<DefaultGhre_ExamPaperPreview> previewList { get; set; } = new List<DefaultGhre_ExamPaperPreview> { };
public List<DefaultGhre_ExamPaperPreview> questionList { get; set; } = new List<DefaultGhre_ExamPaperPreview> { };
public CommentData CommentData { get; set; }
}
public class DefaultGhre_ExamPaperBaseData : Ghre_ExamPaperBase
{
public long? CourseId { get; set; }
public long? CourseSceneId { get; set; }
}
public class CommentData
{
public string Comment { get; set; }
public string StaffNo { get; set; }
public string StaffName { get; set; }
public string DeptNo { get; set; }
public string DepteName { get; set; }
public string PhotoUrl { get; set; }
public string TitleName { get; set; }
public bool? IsFirstTime { get; set; } = false;
}
public class DefaultGhre_ExamPaperStyleInfo
{
public string coverImage { get; set; }

@ -4,6 +4,12 @@ public class Ghre_ExamRecordExtend : DefaultGhre_ExamPaperPageData
{
public Ghre_ExamRecordExtendComment commentData { get; set; }
public StaffInfo StaffInfo { get; set; }
public long? PreviousRecordId { get; set; }
public long? NextRecordId { get; set; }
}
public class Ghre_ExamRecordExtendComment
@ -16,3 +22,12 @@ public class Ghre_ExamRecordExtendComment
public string commentTitleName { get; set; }
public bool? isFirstTime { get; set; }
}
public class StaffInfo
{
public string StaffNo { get; set; }
public string StaffName { get; set; }
public string DeptNo { get; set; }
public string DepteName { get; set; }
public decimal StaffScore { get; set; }
}

@ -255,6 +255,51 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
extend.questionList = previews;
string sql = @$"SELECT StaffNo,
StaffName,
dbo.FO_DeptInfo (DeptID,
getdate (),
1,
'DeptNo') DeptNo,
dbo.FO_DeptInfo (DeptID,
getdate (),
1,
'DeptFullPateName') DepteName
FROM Ghra_Staff
WHERE StaffID = {record.StaffId}";
extend.StaffInfo = await Db.Ado.SqlQuerySingleAsync<StaffInfo>(sql);
sql = @$"SELECT A.StaffNo,
A.StaffName,
dbo.FO_DeptInfo (A.DeptID,
getdate (),
1,
'DeptNo') DeptNo,
dbo.FO_DeptInfo (A.DeptID,
getdate (),
1,
'DeptFullPateName') DepteName,
A.PhotoUrl,
B.TitleName
FROM Ghra_Staff A LEFT JOIN Ghra_Title B ON B.TitleID = A.TitleID
WHERE A.StaffID = {record.StaffId}";
extend.CommentData = await Db.Ado.SqlQuerySingleAsync<CommentData>(sql);
if (record.ScoreStatus == "NoScore")
extend.CommentData.IsFirstTime = true;
var body = new QueryBody();
body.pageNum = 1;
body.pageSize = 10000;
var records = await QueryFilterPage(body, $"ExamId='{record.ExamId}'");
var records1 = records.result.DT_TableDataT1;
int index = records1.FindIndex(x => x.Id == examRecordId);
extend.PreviousRecordId = index - 1 >= 0 && records1.Count > 1 ? records1[index - 1].Id : null;
extend.NextRecordId = records1.Count > index + 1 ? records1[index + 1].Id : null;
return ServiceResult<Ghre_ExamRecordExtend>.OprateSuccess("查询成功!", extend);
}
}
Loading…
Cancel
Save