编辑
build / build-push (push) Successful in 28s

This commit is contained in:
wanghu
2026-09-08 16:55:39 +08:00
parent 04e708c4fe
commit 10c791d034
2 changed files with 17 additions and 6 deletions
@@ -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;
}
/// <summary>获取指定字典数据(Type 1~10)。</summary>
//[HttpGet("GetSchoolAll")]
//public async Task<List<DicOption>> GetSchoolAll([FromQuery] int type = 0)
//{
// return await _sch.S.GetSchTeaInfoAsync(SchSerID(), null);
//}
/// <summary>获取指定字典数据(Type 1~10)。</summary>
[HttpGet("GetSysDic")]
public async Task<List<DicOption>> GetSysDic([FromQuery] int type = 0)
@@ -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);
}