From b5bc0d6eb2d2e55ea830a1b286252b9754cbf8e9 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期三, 21 八月 2024 11:21:04 +0800 Subject: [PATCH] 更新主从表添加、修改、删除时对从表的对应操作 --- WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs b/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs index 17a1fc2..cbf757b 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs @@ -1,10 +1,14 @@ -锘縰sing System; +锘縰sing Newtonsoft.Json; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEAWCS_Core.BaseRepository; using WIDESEAWCS_Core.BaseServices; +using WIDESEAWCS_Core.DB; +using WIDESEAWCS_Core.Helper; +using WIDESEAWCS_DTO.System; using WIDESEAWCS_ISystemRepository; using WIDESEAWCS_ISystemServices; using WIDESEAWCS_Model.Models; @@ -19,9 +23,9 @@ _unitOfWorkManage = unitOfWorkManage; } - public object GetVueDictionary(string[] dicNos) + public List<VueDictionaryDTO> GetVueDictionary(string[] dicNos) { - if (dicNos == null || dicNos.Count() == 0) return new string[] { }; + if (dicNos == null || dicNos.Count() == 0) return new List<VueDictionaryDTO>(); var dicConfig = BaseDal.GetDictionaries(dicNos, false).Select(s => new { @@ -35,15 +39,15 @@ { if (string.IsNullOrEmpty(dbSql)) { - return data as object; + return data; } return BaseDal.QueryObjectDataBySql(dbSql, null); } - return dicConfig.Select(item => new + return dicConfig.Select(item => new VueDictionaryDTO { - item.dicNo, - item.config, - data = GetSourceData(item.dicNo, item.dbSql, item.list) + DicNo = item.dicNo, + Config = item.config, + Data = GetSourceData(item.dicNo, item.dbSql, item.list) }).ToList(); } } -- Gitblit v1.9.3