using Autofac.Core; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyModel; using Newtonsoft.Json; using System.Reflection; using WIDESEAWCS_Core.BaseController; using WIDESEAWCS_Core.Helper; using WIDESEAWCS_ISystemServices; using WIDESEAWCS_Model.Models; using System.IO; using WIDESEAWCS_QuartzJob.DeviceBase; using WIDESEAWCS_DTO.System; using System.ComponentModel; using System.Collections.Generic; using WIDESEAWCS_Communicator; using Quartz; using WIDESEAWCS_QuartzJob; using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime; namespace WIDESEAWCS_WCSServer.Controllers.System { [Route("api/Sys_Dictionary")] [ApiController] public class Sys_DictionaryController : ApiBaseController { private readonly IHttpContextAccessor _httpContextAccessor; public Sys_DictionaryController(ISys_DictionaryService service, IHttpContextAccessor httpContextAccessor) : base(service) { _httpContextAccessor = httpContextAccessor; } [HttpPost, Route("GetVueDictionary"), AllowAnonymous] public IActionResult GetVueDictionary([FromBody] string[] dicNos) { List vueDictionaryDTOs = Service.GetVueDictionary(dicNos); #region try { List dicList = dicNos.ToList(); string str = AppSettings.Configuration["dics"]; if (!string.IsNullOrEmpty(str)) { string st = vueDictionaryDTOs[0].Data.Serialize(); List cusDics = new List(); List dics = str.Split(",").ToList(); foreach (var item in dics) { dicList.Remove(item); cusDics.Add(item); } foreach (var item in cusDics) { string dic = QuartzJobCommonMethod.GetVueDictionary(item.Trim()); if (!string.IsNullOrEmpty(dic)) { VueDictionaryDTO vueDictionaryDTO = JsonConvert.DeserializeObject(dic); vueDictionaryDTOs.Add(vueDictionaryDTO); } } } } catch (Exception ex) { } #endregion return Json(vueDictionaryDTOs); } } }