修改 部分账号
This commit is contained in:
parent
eb0479552c
commit
43af37af88
|
|
@ -2,8 +2,10 @@
|
|||
using Learn.Archives.API.Expand;
|
||||
using Learn.Archives.Core.Common;
|
||||
using Learn.Archives.Core.Model;
|
||||
using Learn.Archives.Core.Model.Dto;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using System.Diagnostics;
|
||||
using System.Security.Claims;
|
||||
using UserCenter.Model;
|
||||
|
|
@ -18,5 +20,63 @@ namespace Learn.Archives.API.Controllers
|
|||
this.baseService = baseService;
|
||||
}
|
||||
|
||||
public class QueryPageDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 学校id
|
||||
/// </summary>
|
||||
public long SchoolId { get; set; }
|
||||
/// <summary>
|
||||
/// 年级
|
||||
/// </summary>
|
||||
public string? Grade { get; set; }
|
||||
/// <summary>
|
||||
/// 赴校人员名称
|
||||
/// </summary>
|
||||
public string? UserName { get; set; }
|
||||
/// <summary>
|
||||
/// 是否查询完结
|
||||
/// </summary>
|
||||
public bool SolutionEnd { get; set; }
|
||||
public DateTime? StartTime { get; set; }
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 页面索引
|
||||
/// </summary>
|
||||
public int PageIndex { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 页面数量
|
||||
/// </summary>
|
||||
public int PageSize { get; set; } = 20;
|
||||
|
||||
}
|
||||
|
||||
public override Task<bool> Edit([FromBody] SchoolBusiness model)
|
||||
{
|
||||
if (model.SolutionRecord != null && model.SolutionRecord.SolutionEnd == true)
|
||||
model.SolutionEnd = true;
|
||||
return base.Edit(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询 赴校列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageResult<SchoolBusiness>> QueryPageList(QueryPageDto dto)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
var resData = await baseService.AsQueryable()
|
||||
.WhereIF(dto.SchoolId != 0, s => s.SchoolId == dto.SchoolId)
|
||||
.WhereIF(!string.IsNullOrEmpty(dto.Grade), s => s.Grade == dto.Grade)
|
||||
.WhereIF(dto.SolutionEnd, s => s.SolutionEnd == dto.SolutionEnd)
|
||||
.WhereIF(dto.StartTime != null, s => s.StartTime >= dto.StartTime)
|
||||
.WhereIF(dto.EndTime != null, s => s.StartTime <= dto.EndTime)
|
||||
.WhereIF(!string.IsNullOrEmpty(dto.UserName), s => s.SchoolBusinessUser != null && SqlFunc.JsonLike(s.SchoolBusinessUser, dto.Grade))
|
||||
.OrderByDescending(s=>s.Id)
|
||||
.ToPageListAsync(dto.PageIndex, dto.PageSize, total);
|
||||
return new PageResult<SchoolBusiness>() { Data = resData, Total = total };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,11 @@ namespace Learn.Archives.Core.Model
|
|||
/// </summary>
|
||||
public string Grade { get; set; }
|
||||
/// <summary>
|
||||
/// 赴校人员 逗号分隔
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true, IsJson = true)]
|
||||
public string[]? SchoolBusinessUser { get; set; }
|
||||
/// <summary>
|
||||
/// 赴校时间
|
||||
/// </summary>
|
||||
public DateTime StartTime { get; set; } = DateTime.Now;
|
||||
|
|
@ -36,10 +41,6 @@ namespace Learn.Archives.Core.Model
|
|||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public string? Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 赴校问题已解决
|
||||
/// </summary>
|
||||
public long SolutionEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 反馈问题
|
||||
|
|
@ -54,6 +55,11 @@ namespace Learn.Archives.Core.Model
|
|||
[SugarColumn(IsNullable = true, IsJson = true, ColumnDataType = "text")]
|
||||
public SolutionRecordDto? SolutionRecord { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 赴校问题已解决
|
||||
/// </summary>
|
||||
public bool SolutionEnd { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 开展座谈
|
||||
|
|
|
|||
Loading…
Reference in New Issue