Initial_commit_SecMPS_v2

This commit is contained in:
2026-05-15 23:22:48 +08:00
commit 23ea4fe05f
13830 changed files with 298675 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
//using VolPro.Core.Dapper;
//using VolPro.Core.DBManager;
//using VolPro.Core.EFDbContext;
//using VolPro.Core.Extensions;
//using VolPro.Entity.DomainModels;
//using Microsoft.AspNetCore.Mvc;
//using Microsoft.EntityFrameworkCore;
//using Newtonsoft.Json;
//using System;
//using System.Data;
//using System.Data.SqlClient;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;
//namespace VolPro.Core.BaseProvider.DictionaryComponent
//{
// /// <summary>
// /// 组件视图参照https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-components?view=aspnetcore-2.1
// /// 与Controller命名一样必须以ViewComponent结尾
// /// </summary>
// public class DictionaryViewComponent : ViewComponent
// {
// public async Task<IViewComponentResult> InvokeAsync(string dropDownIds)
// {
// if (string.IsNullOrEmpty(dropDownIds))
// return null;
// string[] dicNos = dropDownIds.Split(',');
// StringBuilder stringBuilder = new StringBuilder();
// SysDbContext context = DBServerProvider.GetEFDbContext();
// var dicData = await context.Queryable<Sys_Dictionary>()
// .LeftJoin<Sys_DictionaryList>((o, cus) => o.Dic_ID == cus.Dic_ID)
// .Where(d => dicNos.Contains(d.DicNo))
// .Select((d, list) => new { list.DicValue, list.DicName, d.Config, d.DbSql, list.OrderNo, d.DicNo })
// .ToListAsync();
// foreach (var item in dicData.GroupBy(x => x.DicNo))
// {
// stringBuilder.AppendLine($" var optionConfig{item.Key} = {item.Select(x => x.Config).FirstOrDefault()}");
// string dbSql = item.Select(s => s.DbSql).FirstOrDefault();
// stringBuilder.AppendLine($@" var dataSource{item.Key} = {
// (!string.IsNullOrEmpty(dbSql)
// ? DBServerProvider.GetSqlDapper().QueryList<object>(dbSql, null).Serialize()
// : item.OrderByDescending(o => o.OrderNo).
// Select(s => new { s.DicName, s.DicValue }).ToList()
// .Serialize())
// }.convertToValueText(optionConfig{item.Key})");
// stringBuilder.AppendLine($" optionConfig{item.Key}.data = dataSource{item.Key};");
// }
// ViewBag.Dic = stringBuilder.ToString();
// return View("~/Views/Shared/Dictionary.cshtml");
// }
// }
//}