新增物料类型处理逻辑,确保在保存和编辑称重记录时自动设置默认物料类型。更新前端表单以支持密炼物料的选择和显示,优化用户体验。添加分类字典和数据字典的事件广播功能,增强系统的实时数据同步能力。

This commit is contained in:
geht
2026-05-07 17:53:48 +08:00
parent ce9dc8efd8
commit f60a4fb203
55 changed files with 2968 additions and 375 deletions

View File

@@ -26,7 +26,7 @@ public class JeecgDictSyncService : IJeecgDictSyncService, ISingletonDependency
{
var statusFilter = input.Status.HasValue ? (int?)input.Status.Value : null;
var query = _dbContext.Queryable<JeecgSysDictItem>().ClearFilter()
.WhereIF(!string.IsNullOrWhiteSpace(input.DictCode), x => x.DictCode != null && x.DictCode.Contains(input.DictCode))
.WhereIF(!string.IsNullOrWhiteSpace(input.DictCode), x => x.DictCode != null && x.DictCode == input.DictCode)
.WhereIF(!string.IsNullOrWhiteSpace(input.DictName), x => x.DictName != null && x.DictName.Contains(input.DictName))
.WhereIF(!string.IsNullOrWhiteSpace(input.ItemText), x => x.ItemText != null && x.ItemText.Contains(input.ItemText))
.WhereIF(!string.IsNullOrWhiteSpace(input.ItemValue), x => x.ItemValue != null && x.ItemValue.Contains(input.ItemValue));
@@ -164,6 +164,22 @@ public class JeecgDictSyncService : IJeecgDictSyncService, ISingletonDependency
return synced;
}
public async Task<List<KeyValuePair<string, string>>> GetDictGroupsAsync()
{
var rows = await _dbContext.Queryable<JeecgSysDictItem>()
.ClearFilter()
.Where(x => x.DictCode != null)
.OrderBy(x => x.DictCode)
.Select(x => new JeecgSysDictItem { DictCode = x.DictCode, DictName = x.DictName })
.ToListAsync();
return rows
.Where(x => !string.IsNullOrWhiteSpace(x.DictCode))
.DistinctBy(x => x.DictCode)
.Select(x => new KeyValuePair<string, string>(x.DictCode!, x.DictName ?? x.DictCode!))
.ToList();
}
public async Task<List<KeyValuePair<string, string>>> GetDictOptionsAsync(string dictCode, bool includeAll = false)
{
var result = new List<KeyValuePair<string, string>>();