@@ -1,12 +1,13 @@
|
|||||||
|
using Microsoft.AspNetCore.Cors;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
|
||||||
using Microsoft.AspNetCore.Cors;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Yh.Platform.Abstractions;
|
using Yh.Platform.Abstractions;
|
||||||
|
using Yh.SchClass.OpenApi;
|
||||||
using YhCore.Common;
|
using YhCore.Common;
|
||||||
using YhCore.Common.Config;
|
using YhCore.Common.Config;
|
||||||
using YhCore.Common.UserContext;
|
using YhCore.Common.UserContext;
|
||||||
@@ -28,6 +29,7 @@ namespace YhCore.WebApi.Controllers.Api.Common
|
|||||||
{
|
{
|
||||||
private readonly IDictionaryService _dict;
|
private readonly IDictionaryService _dict;
|
||||||
private readonly IFileService _file;
|
private readonly IFileService _file;
|
||||||
|
private readonly SchClassOpenApi _sch;
|
||||||
|
|
||||||
public CommonController(IDictionaryService dict, IFileService file)
|
public CommonController(IDictionaryService dict, IFileService file)
|
||||||
{
|
{
|
||||||
@@ -35,6 +37,16 @@ namespace YhCore.WebApi.Controllers.Api.Common
|
|||||||
_file = file;
|
_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>
|
/// <summary>获取指定字典数据(Type 1~10)。</summary>
|
||||||
[HttpGet("GetSysDic")]
|
[HttpGet("GetSysDic")]
|
||||||
public async Task<List<DicOption>> GetSysDic([FromQuery] int type = 0)
|
public async Task<List<DicOption>> GetSysDic([FromQuery] int type = 0)
|
||||||
|
|||||||
@@ -100,9 +100,8 @@ namespace YhCore.WebApi.Controllers.Api.DocPrint
|
|||||||
[HttpPost("EditDictionaryType")]
|
[HttpPost("EditDictionaryType")]
|
||||||
public async Task EditDictionaryType([FromForm] Common_Dictionary model)
|
public async Task EditDictionaryType([FromForm] Common_Dictionary model)
|
||||||
{
|
{
|
||||||
if (model == null || model.SerID <= 0 || string.IsNullOrWhiteSpace(model.typeID)
|
if (model == null || model.SerID <= 0 || string.IsNullOrWhiteSpace(model.Name))
|
||||||
|| string.IsNullOrWhiteSpace(model.typeName) || string.IsNullOrWhiteSpace(model.Name))
|
throw new DException("参数错误:SerID、Name 均不能为空(注意表单字段名拼写,TypeId≠TypelD)");
|
||||||
throw new DException("参数错误:SerID、typeID、typeName、Name 均不能为空(注意表单字段名拼写,TypeId≠TypelD)");
|
|
||||||
model.Schserid = SchSerID();
|
model.Schserid = SchSerID();
|
||||||
await _dict.EditDicAsync(model);
|
await _dict.EditDicAsync(model);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user