生产管理-生产工单排产代码调整

This commit is contained in:
DEVICE8\12494
2023-04-23 13:41:40 +08:00
parent 67113fabf8
commit f0fde866c8
13 changed files with 1039 additions and 517 deletions

View File

@@ -31,4 +31,11 @@ public interface IDictionaryDataService
/// <param name="key"></param>
/// <returns></returns>
Task<Dictionary<string, object>> GetDicByKey(string key);
/// <summary>
/// 根据typeId获取字典
/// </summary>
/// <param name="typeId"></param>
/// <returns></returns>
Task<Dictionary<string, object>> GetDicByTypeId(string typeId);
}

View File

@@ -1,4 +1,5 @@
using JNPF.Common.Core.Manager;
using JNPF.ClayObject.Extensions;
using JNPF.Common.Core.Manager;
using JNPF.Common.Core.Manager.Files;
using JNPF.Common.Enums;
using JNPF.Common.Manager;
@@ -338,9 +339,15 @@ public class DictionaryDataService : IDictionaryDataService, IDynamicApiControll
return await _repository.AsSugarClient().Queryable<DictionaryDataEntity>()
.LeftJoin<DictionaryTypeEntity>((a, b) => a.DictionaryTypeId == b.Id)
.Where((a, b) => b.EnCode == key && b.DeleteMark == null)
.ToDictionaryAsync((it)=>it.EnCode,it=>it.FullName);
.ToDictionaryAsync((it) => it.EnCode, it => it.FullName);
}
public async Task<Dictionary<string, object>> GetDicByTypeId(string typeId) =>
await _repository.AsQueryable().Where(x => x.DictionaryTypeId == typeId).ToDictionaryAsync(x => x.EnCode, x => x.FullName);
#endregion
#region PrivateMethod