using APT.BaseData.Domain.Entities.FM; using APT.BaseData.Domain.Enums; using APT.BaseData.Domain.IServices.FM; using APT.Infrastructure.Core; using APT.Utility; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace APT.FM.WebApi.Controllers.Api { [Route("api/FM/FMNotic")] public partial class NoticController : AuthorizeApiController { /// /// 短信发送跑批 /// /// /// [HttpPost, Route("SendNote")] public JsonActionResult SendNote([FromBody] KeywordFilter entity) { return SafeExecute(() => { return true; }); } [HttpPost, Route("OrderPagedByNoticType")] public JsonActionResult> OrderPagedByNoticType([FromBody] KeywordFilter filter) { return SafeExecute>(() => { filter.SelectField.Add("USER_ID"); var notices = this.GetEntities(null, filter, "Nav_User"); BaseFilter baseFilter = new BaseFilter(filter.OrgId); var users = this.GetEntities< T_FM_USER >(null, baseFilter); foreach (var notice in notices) { //if (notice.Nav_Person ==null && notice.USER_ID != null) //{ // T_FM_PERSON person = new T_FM_PERSON() // { // ORG_ID = filter.OrgId, // NAME = users.FirstOrDefault(x=>x.ID == notice.USER_ID).NAME // }; // notice.Nav_Person = person; //} } return notices; }); } } }