Commit b550cb1f authored by 黄奎's avatar 黄奎

页面修改

parent 7af27cce
......@@ -104,5 +104,10 @@ namespace Edu.Model.ViewModel.Exam
/// 是否开发(1-私有,2-公开)
/// </summary>
public int IsOpen { get; set; }
/// <summary>
/// 审核备注
/// </summary>
public string ExamineRemark { get; set; }
}
}
......@@ -43,5 +43,10 @@ namespace Edu.Model.ViewModel.Exam
/// 学生id
/// </summary>
public int GuestId { get; set; }
/// <summary>
/// 是否是试卷管理员
/// </summary>
public int IsPaperManager { get; set; }
}
}
......@@ -138,6 +138,7 @@ namespace Edu.Module.Exam
ExamineStatus = item.ExamineStatus,
Reviewer = item.Reviewer,
IsOpen=item.IsOpen,
ExamineRemark=item.ExamineRemark,
ReviewerName = item.Reviewer > 0 ? (UserReidsCache.GetUserLoginInfo(item.Reviewer)?.AccountName ?? "") : ""
};
//model.ChildList = GetPaperChild(childList, detailsList, item.PaperId);
......
......@@ -43,10 +43,6 @@ WHERE 1=1
builder.AppendFormat(" AND A.{0} LIKE @PaperName ", nameof(RB_Examination_Paper_ViewModel.PaperName));
parameters.Add("PaperName", "%" + query.PaperName.Trim() + "%");
}
if (query.ParentId > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Examination_Paper_ViewModel.ParentId), query.ParentId);
}
if (query.PaperId > 0)
{
......@@ -56,13 +52,32 @@ WHERE 1=1
{
builder.AppendFormat(@" AND A.{0} IN({1}) ", nameof(RB_Examination_Paper_ViewModel.PaperId), query.QPaperIds);
}
if (query.CreateBy > 0)
//试卷管理员
if (query.IsPaperManager == 1)
{
builder.AppendFormat(@" AND (A.{0}={1} OR A.IsOpen=2) ", nameof(RB_Examination_Paper_ViewModel.CreateBy), query.CreateBy);
if (query.ParentId > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Examination_Paper_ViewModel.ParentId), query.ParentId);
}
else
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Examination_Paper_ViewModel.ParentId), 0);
}
}
else
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Examination_Paper_ViewModel.ParentId), 0);
if (query.CreateBy > 0)
{
builder.AppendFormat(@" AND (A.{0}={1} OR A.IsOpen=2) ", nameof(RB_Examination_Paper_ViewModel.CreateBy), query.CreateBy);
}
if (query.ParentId > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Examination_Paper_ViewModel.ParentId), query.ParentId);
}
//else
//{
// builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Examination_Paper_ViewModel.ParentId), 0);
//}
}
}
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Examination_Paper_ViewModel.PaperId));
......
......@@ -62,8 +62,12 @@ namespace Edu.WebApi.Controllers.Exam
//不是试卷管理员
if (!base.CheckUserActionAuth("Paper_Manager"))
{
query.IsPaperManager = 0;
query.CreateBy = base.UserInfo.Id;
}
else {
query.IsPaperManager = 1;
}
List<object> result = new List<object>();
List<object> navList = new List<object>();
if (query.ParentId > 0)
......@@ -90,7 +94,8 @@ namespace Edu.WebApi.Controllers.Exam
item.Reviewer,
item.IsOpen,
OpenStr = item.IsOpen == 1 ? "私有" : "公开",
ExamineStatusStr = item.PaperType == 2 ? EnumHelper.ToName(item.ExamineStatus) : ""
ExamineStatusStr = item.PaperType == 2 ? EnumHelper.ToName(item.ExamineStatus) : "",
item.ExamineRemark,
});
}
pageModel.Count = rowsCount;
......@@ -415,7 +420,7 @@ namespace Edu.WebApi.Controllers.Exam
{
PaperIds.Add(PaperId);
}
var tempList= Common.Plugin.JsonHelper.DeserializeObject<List<int>>(base.ParmJObj.GetStringValue("PaperIds"));
var tempList = Common.ConvertHelper.StringToList(base.ParmJObj.GetStringValue("PaperIds"));
if (tempList != null && tempList.Count > 0)
{
PaperIds.AddRange(tempList);
......@@ -443,7 +448,7 @@ namespace Edu.WebApi.Controllers.Exam
[HttpPost]
public ApiResult MovePaper()
{
var PaperIds = Common.Plugin.JsonHelper.DeserializeObject<List<int>>(base.ParmJObj.GetStringValue("PaperIds"));
var PaperIds = Common.ConvertHelper.StringToList(base.ParmJObj.GetStringValue("PaperIds"));
var ParentId = base.ParmJObj.GetInt("ParentId");
var flag = paperModule.MoveExamnationPaperModule(ParentId, PaperIds);
return flag ? ApiResult.Success() : ApiResult.Failed();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment