新增MES模块,包含供应商、客户、车辆和地磅数据记录管理功能,支持免密接口和数据同步。更新相关控制器、实体、服务和数据库配置,优化权限管理和数据字典支持,确保系统的灵活性和可扩展性。

This commit is contained in:
geht
2026-04-30 15:28:20 +08:00
parent 142a0bdaba
commit b03cbeff9b
121 changed files with 10540 additions and 424 deletions

View File

@@ -1,9 +1,6 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YY.Admin.Core;
using YY.Admin.Core.Const;
namespace YY.Admin.Services.Service.Config
{
@@ -31,5 +28,23 @@ namespace YY.Admin.Services.Service.Config
if (string.IsNullOrWhiteSpace(value)) return default;
return (T)Convert.ChangeType(value, typeof(T));
}
/// <inheritdoc />
public async Task<(bool ok, string message)> SetConfigValueAsync(string code, string value)
{
if (string.IsNullOrWhiteSpace(code))
return (false, "配置编码无效");
var n = await _dbContext.Updateable<SysConfig>()
.SetColumns(c => new SysConfig { Value = value, UpdateTime = DateTime.Now })
.Where(c => c.Code == code)
.ExecuteCommandAsync();
if (n <= 0)
return (false, "未找到对应配置项或无需更新");
_sysCacheService.Remove($"{CacheConst.KeyConfig}{code}");
return (true, "保存成功");
}
}
}