63 lines
1.8 KiB
C#
63 lines
1.8 KiB
C#
using New_College.IServices;
|
|
using New_College.Model;
|
|
using New_College.Model.Models;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System;
|
|
using System.Linq.Expressions;
|
|
using System.Threading.Tasks;
|
|
using New_College.Model.ViewModels;
|
|
using System.Linq;
|
|
|
|
namespace New_College.Api.Controllers
|
|
{
|
|
[Route("api/[controller]/[action]")]
|
|
[ApiController]
|
|
[Authorize]
|
|
public class D_PlanMajorDescController : ControllerBase
|
|
{
|
|
/// <summary>
|
|
/// 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
|
|
/// </summary>
|
|
private readonly ID_PlanMajorDescServices _d_PlanMajorDescServices;
|
|
|
|
public D_PlanMajorDescController(ID_PlanMajorDescServices D_PlanMajorDescServices)
|
|
{
|
|
_d_PlanMajorDescServices = D_PlanMajorDescServices;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 一键填报
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<MessageModel<PageModel<OneSubmitGoResponse>>> OneSubmitGo([FromQuery] OneSubmitGoRequest request)
|
|
{
|
|
|
|
var response = await _d_PlanMajorDescServices.GetPlanMajorList(request);
|
|
if (response.data==null||!response.data.Any() || response.dataCount <= 0)
|
|
{
|
|
return new MessageModel<PageModel<OneSubmitGoResponse>>()
|
|
{
|
|
msg = "获取失败",
|
|
success = false,
|
|
response = response
|
|
};
|
|
}
|
|
|
|
return new MessageModel<PageModel<OneSubmitGoResponse>>()
|
|
{
|
|
msg = "获取成功",
|
|
success = true,
|
|
response = response
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
} |