diff --git a/Tnb.BasicData/ProcessManageService.cs b/Tnb.BasicData/ProcessManageService.cs
index 5ffc8b97..80f8b7ed 100644
--- a/Tnb.BasicData/ProcessManageService.cs
+++ b/Tnb.BasicData/ProcessManageService.cs
@@ -22,6 +22,7 @@ namespace Tnb.BasicData
///
/// MOM基础数据-工艺管理
///
+
[ApiDescriptionSettings(Tag = "BasicData", Name = "ProcessManage", Order = 700)]
[Route("api/basic/[controller]")]
public class ProcessManageService : IDynamicApiController, ITransient
@@ -29,6 +30,7 @@ namespace Tnb.BasicData
private readonly ISqlSugarRepository _repository;
private readonly DataBaseManager _dbManager;
private readonly IDictionaryDataService _dictionaryDataService;
+ private readonly string _dictionaryTypeId;
public ProcessManageService(
IDictionaryDataService dictionaryDataService,
@@ -38,16 +40,47 @@ namespace Tnb.BasicData
_dictionaryDataService = dictionaryDataService;
_repository = repository;
_dbManager = dbManager;
+ _dictionaryTypeId = "24950639717653";
}
///
/// 获取工艺路线树形结构
///
/// 工艺路线模版树形结构
+ ///
+ ///
[{
+ ///
"RouteType": 工艺路线类型,
+ ///
"Name": 工艺路线类型名称,
+ ///
"RouteName": 工艺路线名称,
+ ///
"RouteCode": 工艺路线代码,
+ ///
"Version": 工艺路线版本,
+ ///
"id": "25325800913429",
+ ///
"parentId": null,
+ ///
"hasChildren": true,
+ ///
"children": [{
+ ///
"RouteType": 工艺路线类型,
+ ///
"Name": 工艺路线名称|工艺路线版本,
+ ///
"RouteName": "显示器集成",
+ ///
"RouteCode": 工艺路线代码,
+ ///
"Version": 工艺路线版本,
+ ///
"id": 当前节点Id,不用可以忽略,
+ ///
"parentId": "父节点Id,不用可以忽略",
+ ///
"hasChildren": 是否包含子节点,true/false,
+ ///
"children": [{
+ ///
"Version": 工艺路线版本,
+ ///
}
+ ///
],
+ ///
"num": 子节点数量,不用可以忽略,
+ ///
"isLeaf": 是否页节点,不用可以忽略 true/false
+ ///
}
+ ///
]
+ ///
}
+ ///
]
+ ///
[HttpGet("route-tree")]
public async Task GetRouteTreeList()
{
var result = new List();
- var dictaryDataList = await _dictionaryDataService.GetList("24950639717653");
+ var dictaryDataList = await _dictionaryDataService.GetList(_dictionaryTypeId);
var dictaryData = dictaryDataList.ToDictionary(x => x.EnCode, x => x.FullName);
SqlSugarScope sugarClient = null!;
var momDbLink = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.FullName == "tnb_mom");
@@ -91,8 +124,9 @@ namespace Tnb.BasicData
{
id = SnowflakeIdHelper.NextId(),
parentId = dic2[$"{item.Key.RouteName}|{item.Key.RouteCode}"],
+ Name = x.Version,
Version = x.Version,
- })) ;
+ }));
}
}
}