From 10c791d034772fdad4b36bb5655346289aa9cd60 Mon Sep 17 00:00:00 2001 From: wanghu Date: Tue, 8 Sep 2026 16:55:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Api/Common/CommonController.cs | 18 +++++++++++++++--- .../Api/DocPrint/WY_listController.cs | 5 ++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/YhCore.WebApi/Controllers/Api/Common/CommonController.cs b/src/YhCore.WebApi/Controllers/Api/Common/CommonController.cs index 7ae60a4..282fb0c 100644 --- a/src/YhCore.WebApi/Controllers/Api/Common/CommonController.cs +++ b/src/YhCore.WebApi/Controllers/Api/Common/CommonController.cs @@ -1,12 +1,13 @@ +using Microsoft.AspNetCore.Cors; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Cors; -using Microsoft.AspNetCore.Mvc; using Yh.Platform.Abstractions; +using Yh.SchClass.OpenApi; using YhCore.Common; using YhCore.Common.Config; using YhCore.Common.UserContext; @@ -28,6 +29,7 @@ namespace YhCore.WebApi.Controllers.Api.Common { private readonly IDictionaryService _dict; private readonly IFileService _file; + private readonly SchClassOpenApi _sch; public CommonController(IDictionaryService dict, IFileService file) { @@ -35,6 +37,16 @@ namespace YhCore.WebApi.Controllers.Api.Common _file = file; } + + /// 获取指定字典数据(Type 1~10)。 + //[HttpGet("GetSchoolAll")] + //public async Task> GetSchoolAll([FromQuery] int type = 0) + //{ + // return await _sch.S.GetSchTeaInfoAsync(SchSerID(), null); + //} + + + /// 获取指定字典数据(Type 1~10)。 [HttpGet("GetSysDic")] public async Task> GetSysDic([FromQuery] int type = 0) diff --git a/src/YhCore.WebApi/Controllers/Api/DocPrint/WY_listController.cs b/src/YhCore.WebApi/Controllers/Api/DocPrint/WY_listController.cs index e2b5894..94afbf5 100644 --- a/src/YhCore.WebApi/Controllers/Api/DocPrint/WY_listController.cs +++ b/src/YhCore.WebApi/Controllers/Api/DocPrint/WY_listController.cs @@ -100,9 +100,8 @@ namespace YhCore.WebApi.Controllers.Api.DocPrint [HttpPost("EditDictionaryType")] public async Task EditDictionaryType([FromForm] Common_Dictionary model) { - if (model == null || model.SerID <= 0 || string.IsNullOrWhiteSpace(model.typeID) - || string.IsNullOrWhiteSpace(model.typeName) || string.IsNullOrWhiteSpace(model.Name)) - throw new DException("参数错误:SerID、typeID、typeName、Name 均不能为空(注意表单字段名拼写,TypeId≠TypelD)"); + if (model == null || model.SerID <= 0 || string.IsNullOrWhiteSpace(model.Name)) + throw new DException("参数错误:SerID、Name 均不能为空(注意表单字段名拼写,TypeId≠TypelD)"); model.Schserid = SchSerID(); await _dict.EditDicAsync(model); }