Commit 6c91c2f0 authored by 黄奎's avatar 黄奎

新增

parent 61697cef
......@@ -649,6 +649,7 @@ namespace Edu.Module.Course
Group_Id = UserInfo.Group_Id,
School_Id = UserInfo.School_Id,
});
UpdateClassEndDateModule(planModel.ClassId);
return class_PlanRepository.DeleteOne(new WhereHelper(nameof(RB_Class_Plan_ViewModel.ClassPlanId), ClassPlanId));
}
......
......@@ -20,7 +20,15 @@ namespace Edu.Repository.Course
public List<RB_Student_BackRecord_ViewModel> GetStudentBackRecordListRepository(RB_Student_BackRecord_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Student_BackRecord
WHERE 1=1
");
if (query != null)
{
}
return Get<RB_Student_BackRecord_ViewModel>(builder.ToString()).ToList();
}
}
......
......@@ -292,10 +292,7 @@ namespace Edu.WebApi.Controllers.Course
{
var ClassPlanId = base.ParmJObj.GetInt("ClassPlanId");
var flag = classModule.RemoveClassPlanModule(ClassPlanId, base.UserInfo);
if (flag)
{
classModule.UpdateClassEndDateModule(extModel.ClassId);
}
return flag ? ApiResult.Success() : ApiResult.Failed();
}
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Edu.Common.API;
using Edu.Common.Plugin;
using Edu.Model.ViewModel.Flow;
using Edu.Module.System;
using Edu.WebApi.Filter;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Edu.WebApi.Controllers.Public
{
/// <summary>
/// 流程设置相关接口
/// </summary>
[Route("api/[controller]/[action]")]
[ApiExceptionFilter]
[ApiController]
[EnableCors("AllowCors")]
public class FlowController : BaseController
{
/// <summary>
/// 流程设置处理类对象
/// </summary>
private readonly BasicFlowModule basicFlowModule = new BasicFlowModule();
/// <summary>
/// 获取退课流程
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetBackClassFlow()
{
var Id = base.ParmJObj.GetInt("Id");
var flowModel = basicFlowModule.GetFlowModule(Id);
return ApiResult.Success(data: flowModel);
}
/// <summary>
/// 新增修改退课流程
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetBackClassFlow()
{
var extModel = new RB_Flow_ViewModel()
{
FlowId = base.ParmJObj.GetInt("FlowId"),
FlowName = base.ParmJObj.GetStringValue("FlowName"),
Group_Id = base.UserInfo.Group_Id,
CreateBy = base.UserInfo.Id,
CreateTime = DateTime.Now,
Status = Common.Enum.DateStateEnum.Normal,
UpdateBy = base.UserInfo.Id,
UpdateTime = DateTime.Now,
};
if (!string.IsNullOrEmpty(base.ParmJObj.GetStringValue("FlowNodeList")))
{
try
{
extModel.FlowNodeList = Common.Plugin.JsonHelper.DeserializeObject<List<RB_Flow_Node_ViewModel>>(base.ParmJObj.GetStringValue("FlowNodeList"));
}
catch (Exception ex)
{
Common.Plugin.LogHelper.Write(ex, "SetBackClassFlow_FlowNodeList");
}
}
var flag = basicFlowModule.SetFlowModule(extModel);
return flag ? ApiResult.Success(data: extModel) : 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