Commit a2f9036e authored by 黄奎's avatar 黄奎

页面修改

parent ce217226
...@@ -11,5 +11,9 @@ namespace Edu.Model.ViewModel.EduTask ...@@ -11,5 +11,9 @@ namespace Edu.Model.ViewModel.EduTask
/// </summary> /// </summary>
public class RB_Education_Relevance_ViewModel : RB_Education_Relevance public class RB_Education_Relevance_ViewModel : RB_Education_Relevance
{ {
/// <summary>
/// 多个单据查询【逗号分隔】
/// </summary>
public string QConditionIds { get; set; }
} }
} }
...@@ -78,6 +78,11 @@ namespace Edu.Module.EduTask ...@@ -78,6 +78,11 @@ namespace Edu.Module.EduTask
//调课申请 //调课申请
List<RB_Change_ClassPlan_ViewModel> changeClassList = new List<RB_Change_ClassPlan_ViewModel>(); List<RB_Change_ClassPlan_ViewModel> changeClassList = new List<RB_Change_ClassPlan_ViewModel>();
var groupList = list.GroupBy(qitem => new { qitem.ReceiptType }).Select(qitem => new { qitem.Key.ReceiptType }); var groupList = list.GroupBy(qitem => new { qitem.ReceiptType }).Select(qitem => new { qitem.Key.ReceiptType });
string Ids = string.Join(",", list.Select(qitem => qitem.Id));
var relevanceList = education_RelevanceRepository.GetEducationRelevanceListRepository(new RB_Education_Relevance_ViewModel()
{
QConditionIds = Ids
});
foreach (var subItem in groupList) foreach (var subItem in groupList)
{ {
if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.BackClass) if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.BackClass)
...@@ -109,7 +114,26 @@ namespace Edu.Module.EduTask ...@@ -109,7 +114,26 @@ namespace Edu.Module.EduTask
//调课 //调课
if (item.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ChangeClass) if (item.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ChangeClass)
{ {
DataObj = changeClassList.Where(qitem => qitem.Id == item.RelationId)?.FirstOrDefault(); var tempModel = changeClassList.Where(qitem => qitem.Id == item.RelationId)?.FirstOrDefault();
if (tempModel != null )
{
if (!string.IsNullOrEmpty(tempModel.SourceData))
{
tempModel.OldChangePlanItemList = Common.Plugin.JsonHelper.DeserializeObject<List<ChangePlanItem>>(tempModel.SourceData);
}
if (!string.IsNullOrEmpty(tempModel.TargetData))
{
if (tempModel.MoveType == 1)
{
tempModel.NewChangePlanItemList = Common.Plugin.JsonHelper.DeserializeObject<List<ChangePlanItem>>(tempModel.TargetData);
}
else if (tempModel.MoveType == 2)
{
tempModel.AllChangePlanModel = Common.Plugin.JsonHelper.DeserializeObject<AllChangePlanItem>(tempModel.TargetData);
}
}
}
DataObj = tempModel;
} }
var obj = new var obj = new
{ {
...@@ -147,7 +171,11 @@ namespace Edu.Module.EduTask ...@@ -147,7 +171,11 @@ namespace Edu.Module.EduTask
var backModel = student_BackClassRepository.GetEntity(receipt.RelationId); var backModel = student_BackClassRepository.GetEntity(receipt.RelationId);
ApplyReason = backModel?.ApplyReason ?? ""; ApplyReason = backModel?.ApplyReason ?? "";
} }
else if (receipt.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ChangeClass)
{
var changeClassModel = change_ClassPlanRepository.GetEntity<RB_Change_ClassPlan_ViewModel>(receipt.RelationId);
ApplyReason = changeClassModel?.ChangeTypeStr + " " + changeClassModel?.MoveTypeStr;
}
//获取审核记录 //获取审核记录
var aurList = education_RecordRepository.GetEducationRecordListRepository(new RB_Education_Record_ViewModel() var aurList = education_RecordRepository.GetEducationRecordListRepository(new RB_Education_Record_ViewModel()
{ {
...@@ -651,7 +679,10 @@ namespace Edu.Module.EduTask ...@@ -651,7 +679,10 @@ namespace Edu.Module.EduTask
} }
if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ChangeClass) if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ChangeClass)
{ {
if (auditModel.AuditStatus == 2)
{
flag = change_ClassPlanRepository.UpdateChangeClassPlan(receiptModel.RelationId);
}
} }
return flag; return flag;
} }
......
...@@ -33,6 +33,10 @@ WHERE 1=1 ...@@ -33,6 +33,10 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Education_Relevance_ViewModel.ConditionId), query.ConditionId); builder.AppendFormat(" AND {0}={1} ", nameof(RB_Education_Relevance_ViewModel.ConditionId), query.ConditionId);
} }
if (!string.IsNullOrEmpty(query.QConditionIds))
{
builder.AppendFormat(" AND {0} IN({1}) ", nameof(RB_Education_Relevance_ViewModel.ConditionId), query.QConditionIds);
}
} }
builder.AppendFormat(" ORDER BY Sort ASC "); builder.AppendFormat(" ORDER BY Sort ASC ");
return Get<RB_Education_Relevance_ViewModel>(builder.ToString()).ToList(); return Get<RB_Education_Relevance_ViewModel>(builder.ToString()).ToList();
......
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