SysMenuSeedData.cs 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. // Ai-DOP 业务规划菜单种子(由 ai-dop-platform/tools/gen_aidop_menu.py 生成)
  2. namespace Admin.NET.Plugin.AiDOP;
  3. /// <summary>
  4. /// Ai-DOP 规划菜单;类名须为 SysMenuSeedData,以便租户默认菜单聚合所有程序集种子。
  5. /// </summary>
  6. [IncreSeed]
  7. public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
  8. {
  9. private const long AidopRootId = 1320990000101L;
  10. /// <inheritdoc />
  11. public IEnumerable<SysMenu> HasData()
  12. {
  13. var ct = DateTime.Parse("2022-02-10 00:00:00");
  14. var list = new List<SysMenu>
  15. {
  16. new()
  17. {
  18. Id = AidopRootId,
  19. Pid = 0,
  20. Title = "Ai-DOP",
  21. Path = "/aidop",
  22. Name = "aidopRoot",
  23. Component = "Layout",
  24. Icon = "ele-Grid",
  25. Type = MenuTypeEnum.Dir,
  26. CreateTime = ct,
  27. OrderNo = 250,
  28. Remark = "Ai-DOP 主菜单(规划项,叶子为占位页)"
  29. }
  30. };
  31. var dirSeq = 0;
  32. var menuSeq = 0;
  33. foreach (var mod in ModuleDefinitions)
  34. {
  35. dirSeq++;
  36. var dirId = 1321000000000L + dirSeq * 1000L;
  37. var modCode = mod.Code;
  38. var codeLower = mod.Code.ToLowerInvariant();
  39. list.Add(new SysMenu
  40. {
  41. Id = dirId,
  42. Pid = AidopRootId,
  43. Title = mod.L1,
  44. Path = $"/aidop/{codeLower}",
  45. Name = $"aidopDir{mod.Code}",
  46. Component = "Layout",
  47. Icon = "ele-Folder",
  48. Type = MenuTypeEnum.Dir,
  49. CreateTime = ct,
  50. OrderNo = 260 + dirSeq
  51. });
  52. var subOrder = 100;
  53. var idx = 0;
  54. foreach (var leaf in mod.Leaves)
  55. {
  56. menuSeq++;
  57. idx++;
  58. var isDir = DirOverrides.Contains((modCode, idx));
  59. var component = isDir ? "Layout" : ResolveComponent(modCode, idx);
  60. var menuType = isDir ? MenuTypeEnum.Dir : MenuTypeEnum.Menu;
  61. list.Add(new SysMenu
  62. {
  63. Id = 1322000000000L + menuSeq,
  64. Pid = dirId,
  65. Title = leaf.Title,
  66. Path = $"/aidop/{codeLower}/{idx:000}",
  67. Name = $"aidop{mod.Code}{idx:000}",
  68. Component = component,
  69. Type = menuType,
  70. CreateTime = ct,
  71. OrderNo = subOrder++,
  72. Icon = isDir ? "ele-Folder" : "ele-Document",
  73. Remark = BuildRemark(mod.Code, leaf)
  74. });
  75. }
  76. }
  77. foreach (var m in BuildAidopSmartOpsSeedMenus(ct))
  78. list.Add(m);
  79. foreach (var m in BuildS0SalesMenus(ct))
  80. list.Add(m);
  81. foreach (var m in BuildS0SupplyMenus(ct))
  82. list.Add(m);
  83. foreach (var m in BuildS0ManufacturingMenus(ct))
  84. list.Add(m);
  85. foreach (var m in BuildS0QualityMenus(ct))
  86. list.Add(m);
  87. foreach (var m in BuildS0WarehouseMenus(ct))
  88. list.Add(m);
  89. return list;
  90. }
  91. /// <summary>
  92. /// 智慧诊断 + 智慧运营看板(入库,便于平台「菜单管理」配置;勿在 Web aidopMenuDisplay 再注入整段菜单)。
  93. /// </summary>
  94. private static IEnumerable<SysMenu> BuildAidopSmartOpsSeedMenus(DateTime ct)
  95. {
  96. const long smartOpsDirId = 1320990000200L;
  97. yield return new SysMenu
  98. {
  99. Id = 1320990000201L,
  100. Pid = AidopRootId,
  101. Title = "智慧诊断",
  102. Path = "/aidop/smart-diagnosis",
  103. Name = "aidopSmartDiagnosis",
  104. Component = "/aidop/diagnosis/index",
  105. Icon = "ele-TrendCharts",
  106. Type = MenuTypeEnum.Menu,
  107. CreateTime = ct,
  108. OrderNo = 251,
  109. Remark = "Ai-DOP 智慧诊断"
  110. };
  111. yield return new SysMenu
  112. {
  113. Id = smartOpsDirId,
  114. Pid = AidopRootId,
  115. Title = "智慧运营看板",
  116. Path = "/aidop/smart-ops",
  117. Name = "aidopSmartOpsRoot",
  118. Component = "Layout",
  119. Icon = "ele-DataBoard",
  120. Type = MenuTypeEnum.Dir,
  121. CreateTime = ct,
  122. OrderNo = 252,
  123. Remark = "Ai-DOP 智慧运营看板分组"
  124. };
  125. // OrderNo:建模紧接九宫格之后,避免在侧栏最底部不易发现;已落库环境需在菜单管理调序或改库
  126. var children = new (long Id, string Path, string Name, string Title, string Component, int Order)[]
  127. {
  128. (1320990000301L, "/aidop/smart-ops/grid", "aidopSmartOpsGrid", "九宫格智慧运营看板", "/dashboard/home", 100),
  129. (1320990000311L, "/aidop/smart-ops/modeling", "aidopSmartOpsModeling", "运营指标建模", "/aidop/kanban/s0", 105),
  130. (1320990000312L, "/aidop/smart-ops/kpi-master", "aidopSmartOpsKpiMaster", "运营指标主数据", "/aidop/kanban/kpiMaster", 106),
  131. (1320990000302L, "/aidop/smart-ops/s1", "aidopSmartOpsS1", "S1产销协同看板", "/aidop/kanban/s1", 110),
  132. (1320990000303L, "/aidop/smart-ops/s2", "aidopSmartOpsS2", "S2制造协同看板", "/aidop/kanban/s2", 120),
  133. (1320990000304L, "/aidop/smart-ops/s3", "aidopSmartOpsS3", "S3供应协同看板", "/aidop/kanban/s3", 130),
  134. (1320990000305L, "/aidop/smart-ops/s4", "aidopSmartOpsS4", "S4采购执行看板", "/aidop/kanban/s4", 140),
  135. (1320990000306L, "/aidop/smart-ops/s5", "aidopSmartOpsS5", "S5物料仓储看板", "/aidop/kanban/s5", 150),
  136. (1320990000307L, "/aidop/smart-ops/s6", "aidopSmartOpsS6", "S6生产执行看板", "/aidop/kanban/s6", 160),
  137. (1320990000308L, "/aidop/smart-ops/s7", "aidopSmartOpsS7", "S7成品仓储看板", "/aidop/kanban/s7", 170),
  138. (1320990000309L, "/aidop/smart-ops/s8", "aidopSmartOpsS8", "S8异常监控看板", "/aidop/kanban/s8", 180),
  139. (1320990000310L, "/aidop/smart-ops/s9", "aidopSmartOpsS9", "S9运营指标看板", "/aidop/kanban/s9", 190),
  140. };
  141. foreach (var (id, path, name, title, component, order) in children)
  142. {
  143. yield return new SysMenu
  144. {
  145. Id = id,
  146. Pid = smartOpsDirId,
  147. Title = title,
  148. Path = path,
  149. Name = name,
  150. Component = component,
  151. Icon = "ele-DataAnalysis",
  152. Type = MenuTypeEnum.Menu,
  153. CreateTime = ct,
  154. OrderNo = order,
  155. Remark = title
  156. };
  157. }
  158. }
  159. private static string ResolveComponent(string modCode, int leafIndex) =>
  160. ComponentOverrides.TryGetValue((modCode, leafIndex), out var c) ? c : "/aidop/planning/index";
  161. private static readonly Dictionary<(string Mod, int Leaf), string> ComponentOverrides = new()
  162. {
  163. { ("S1", 1), "/aidop/business/orderList" },
  164. { ("S1", 2), "/aidop/business/planList" },
  165. { ("S1", 3), "/aidop/business/workOrderList" },
  166. { ("S1", 4), "/aidop/demo/cockpit" },
  167. };
  168. /// <summary>
  169. /// 需要从 Menu 提升为 Dir(目录)的叶子节点;用于承载子级菜单。
  170. /// </summary>
  171. private static readonly HashSet<(string Mod, int Leaf)> DirOverrides = new()
  172. {
  173. { ("S0", 1) }, // 数据建模 → 目录,产销建模挂在其下
  174. };
  175. private static string BuildRemark(string code, (string Title, string Desc, string Complexity, string Days, string Note) leaf)
  176. {
  177. var notePart = string.IsNullOrWhiteSpace(leaf.Note) ? "" : $" | {leaf.Note}";
  178. var s = $"[{code}|{leaf.Complexity}|{leaf.Days}人天] {leaf.Desc}{notePart}";
  179. return s.Length <= 256 ? s : s[..256];
  180. }
  181. private static IEnumerable<SysMenu> BuildS0SalesMenus(DateTime ct)
  182. {
  183. // 与 ModuleDefinitions 中 S0 首项「数据建模」的生成 Id 一致(全局 menuSeq=1 → 1322000000001)
  184. const long s0DataModelingMenuId = 1322000000001L;
  185. const long subDirId = 1329002000000L;
  186. yield return new SysMenu
  187. {
  188. Id = subDirId,
  189. Pid = s0DataModelingMenuId,
  190. Title = "产销建模",
  191. Path = "/aidop/s0/sales",
  192. Name = "aidopS0Sales",
  193. Component = "Layout",
  194. Icon = "ele-ShoppingCart",
  195. Type = MenuTypeEnum.Dir,
  196. CreateTime = ct,
  197. OrderNo = 20,
  198. Remark = "S0 产销建模"
  199. };
  200. yield return new SysMenu
  201. {
  202. Id = subDirId + 1,
  203. Pid = subDirId,
  204. Title = "客户管理",
  205. Path = "/aidop/s0/sales/customer",
  206. Name = "aidopS0SalesCustomer",
  207. Component = "/aidop/s0/sales/CustomerList",
  208. Icon = "ele-User",
  209. Type = MenuTypeEnum.Menu,
  210. CreateTime = ct,
  211. OrderNo = 1,
  212. Remark = "S0 客户管理"
  213. };
  214. yield return new SysMenu
  215. {
  216. Id = subDirId + 2,
  217. Pid = subDirId,
  218. Title = "物料管理",
  219. Path = "/aidop/s0/sales/material",
  220. Name = "aidopS0SalesMaterial",
  221. Component = "/aidop/s0/sales/MaterialList",
  222. Icon = "ele-Box",
  223. Type = MenuTypeEnum.Menu,
  224. CreateTime = ct,
  225. OrderNo = 2,
  226. Remark = "S0 物料管理"
  227. };
  228. yield return new SysMenu
  229. {
  230. Id = subDirId + 3,
  231. Pid = subDirId,
  232. Title = "订单优先规则",
  233. Path = "/aidop/s0/sales/order-priority-rule",
  234. Name = "aidopS0SalesOrderPriorityRule",
  235. Component = "/aidop/s0/sales/OrderPriorityRuleList",
  236. Icon = "ele-Sort",
  237. Type = MenuTypeEnum.Menu,
  238. CreateTime = ct,
  239. OrderNo = 3,
  240. Remark = "S0 订单优先规则"
  241. };
  242. }
  243. private static IEnumerable<SysMenu> BuildS0ManufacturingMenus(DateTime ct)
  244. {
  245. const long s0DataModelingMenuId = 1322000000001L;
  246. const long subDirId = 1329003000000L;
  247. yield return new SysMenu
  248. {
  249. Id = subDirId,
  250. Pid = s0DataModelingMenuId,
  251. Title = "制造建模",
  252. Path = "/aidop/s0/manufacturing",
  253. Name = "aidopS0Manufacturing",
  254. Component = "Layout",
  255. Icon = "ele-SetUp",
  256. Type = MenuTypeEnum.Dir,
  257. CreateTime = ct,
  258. OrderNo = 30,
  259. Remark = "S0 制造建模"
  260. };
  261. var leaves = new (long IdOff, string Path, string Name, string Title, string Component, int Order)[]
  262. {
  263. (1, "/aidop/s0/manufacturing/standard-bom", "aidopS0MfgStandardBom", "标准 BOM", "/aidop/s0/manufacturing/StandardBomManagement", 10),
  264. (2, "/aidop/s0/manufacturing/standard-operation", "aidopS0MfgStandardOperation", "标准工序", "/aidop/s0/manufacturing/StandardProcessList", 20),
  265. (3, "/aidop/s0/manufacturing/production-line", "aidopS0MfgProductionLine", "产线", "/aidop/s0/manufacturing/ProductionLineList", 30),
  266. (4, "/aidop/s0/manufacturing/routing", "aidopS0MfgRouting", "工艺路线", "/aidop/s0/manufacturing/RoutingList", 40),
  267. (5, "/aidop/s0/manufacturing/material-substitution", "aidopS0MfgMaterialSubstitution", "物料替代", "/aidop/s0/manufacturing/MaterialSubstitutionList", 50),
  268. (6, "/aidop/s0/manufacturing/work-order-control", "aidopS0MfgWorkOrderControl", "工单控制参数", "/aidop/s0/manufacturing/WorkOrderControlParams", 60),
  269. (7, "/aidop/s0/manufacturing/person-skill", "aidopS0MfgPersonSkill", "人员技能", "/aidop/s0/manufacturing/PersonnelSkillList", 70),
  270. (8, "/aidop/s0/manufacturing/person-skill-assignment", "aidopS0MfgPersonSkillAssignment", "人员技能维护", "/aidop/s0/manufacturing/PersonSkillAssignmentList", 80),
  271. (9, "/aidop/s0/manufacturing/line-post", "aidopS0MfgLinePost", "产线岗位维护", "/aidop/s0/manufacturing/LinePostList", 90),
  272. (10, "/aidop/s0/manufacturing/work-center", "aidopS0MfgWorkCenter", "工作中心", "/aidop/s0/manufacturing/WorkCenterList", 100),
  273. (11, "/aidop/s0/manufacturing/line-material", "aidopS0MfgLineMaterial", "线边物料", "/aidop/s0/manufacturing/LineMaterialList", 110),
  274. (12, "/aidop/s0/manufacturing/element-param-production", "aidopS0MfgElementParamProduction", "生产要素参数", "/aidop/s0/manufacturing/ProductionElementParamList", 120),
  275. (13, "/aidop/s0/manufacturing/material-process-element", "aidopS0MfgMaterialProcessElement", "物料工艺要素", "/aidop/s0/manufacturing/MaterialProcessElementList", 130),
  276. (14, "/aidop/s0/manufacturing/preprocess-element", "aidopS0MfgPreprocessElement", "前处理要素", "/aidop/s0/manufacturing/PreprocessElementList", 140),
  277. (15, "/aidop/s0/manufacturing/preprocess-element-param", "aidopS0MfgElementParamPreprocess", "前处理要素参数", "/aidop/s0/manufacturing/PreprocessElementParamList", 150),
  278. (16, "/aidop/s0/manufacturing/sop-file-type", "aidopS0MfgSopFileType", "SOP 文件类型", "/aidop/s0/manufacturing/SopFileTypeList", 160),
  279. (17, "/aidop/s0/manufacturing/sop-document", "aidopS0MfgSopDocument", "SOP 维护", "/aidop/s0/manufacturing/SopMaintenanceList", 170),
  280. };
  281. foreach (var (idOff, path, name, title, component, order) in leaves)
  282. {
  283. yield return new SysMenu
  284. {
  285. Id = subDirId + idOff,
  286. Pid = subDirId,
  287. Title = title,
  288. Path = path,
  289. Name = name,
  290. Component = component,
  291. Icon = "ele-Document",
  292. Type = MenuTypeEnum.Menu,
  293. CreateTime = ct,
  294. OrderNo = order,
  295. Remark = $"S0 {title}"
  296. };
  297. }
  298. yield return new SysMenu
  299. {
  300. Id = subDirId + 18,
  301. Pid = subDirId,
  302. Title = "选择替代方案",
  303. Path = "/aidop/s0/manufacturing/substitute-scheme-select",
  304. Name = "aidopS0MfgSubstituteSchemeSelect",
  305. Component = "/aidop/s0/manufacturing/SubstituteSchemeSelectList",
  306. Icon = "ele-List",
  307. Type = MenuTypeEnum.Menu,
  308. CreateTime = ct,
  309. OrderNo = 18,
  310. Remark = "S0 选择替代方案(只读查询)"
  311. };
  312. }
  313. private static IEnumerable<SysMenu> BuildS0SupplyMenus(DateTime ct)
  314. {
  315. const long s0DataModelingMenuId = 1322000000001L;
  316. const long subDirId = 1329004000000L;
  317. yield return new SysMenu
  318. {
  319. Id = subDirId,
  320. Pid = s0DataModelingMenuId,
  321. Title = "供应建模",
  322. Path = "/aidop/s0/supply",
  323. Name = "aidopS0Supply",
  324. Component = "Layout",
  325. Icon = "ele-Ship",
  326. Type = MenuTypeEnum.Dir,
  327. CreateTime = ct,
  328. OrderNo = 40,
  329. Remark = "S0 供应建模"
  330. };
  331. yield return new SysMenu
  332. {
  333. Id = subDirId + 1,
  334. Pid = subDirId,
  335. Title = "供应商维护",
  336. Path = "/aidop/s0/supply/supplier",
  337. Name = "aidopS0SupplySupplier",
  338. Component = "/aidop/s0/supply/SupplierList",
  339. Icon = "ele-UserFilled",
  340. Type = MenuTypeEnum.Menu,
  341. CreateTime = ct,
  342. OrderNo = 1,
  343. Remark = "S0 供应商维护"
  344. };
  345. yield return new SysMenu
  346. {
  347. Id = subDirId + 2,
  348. Pid = subDirId,
  349. Title = "货源清单",
  350. Path = "/aidop/s0/supply/sourcing-item",
  351. Name = "aidopS0SupplySourcingItem",
  352. Component = "/aidop/s0/supply/SourcingList",
  353. Icon = "ele-List",
  354. Type = MenuTypeEnum.Menu,
  355. CreateTime = ct,
  356. OrderNo = 2,
  357. Remark = "S0 货源清单(srm_purchase)"
  358. };
  359. }
  360. private static IEnumerable<SysMenu> BuildS0QualityMenus(DateTime ct)
  361. {
  362. const long s0DataModelingMenuId = 1322000000001L;
  363. const long subDirId = 1329004500000L;
  364. yield return new SysMenu
  365. {
  366. Id = subDirId,
  367. Pid = s0DataModelingMenuId,
  368. Title = "质量建模",
  369. Path = "/aidop/s0/quality",
  370. Name = "aidopS0Quality",
  371. Component = "Layout",
  372. Icon = "ele-DataAnalysis",
  373. Type = MenuTypeEnum.Dir,
  374. CreateTime = ct,
  375. OrderNo = 45,
  376. Remark = "S0 质量建模"
  377. };
  378. var leaves = new (long IdOff, string Path, string Name, string Title, string Component, int Order)[]
  379. {
  380. (1, "/aidop/s0/quality/dictionary", "aidopS0QlyDictionary", "质量字典", "/aidop/s0/quality/QualityDictionaryPage", 10),
  381. (2, "/aidop/s0/quality/raw-whitelist", "aidopS0QlyRawWhitelist", "原材料白名单", "/aidop/s0/quality/RawWhitelistList", 20),
  382. (3, "/aidop/s0/quality/sampling-scheme", "aidopS0QlySamplingScheme", "抽样方案", "/aidop/s0/quality/SamplingSchemeList", 30),
  383. (4, "/aidop/s0/quality/instrument", "aidopS0QlyInstrument", "检验仪器", "/aidop/s0/quality/InspectionInstrumentList", 40),
  384. (5, "/aidop/s0/quality/inspection-method", "aidopS0QlyInspectionMethod", "检验方法", "/aidop/s0/quality/InspectionMethodList", 50),
  385. (6, "/aidop/s0/quality/inspection-basis", "aidopS0QlyInspectionBasis", "检验依据", "/aidop/s0/quality/InspectionBasisList", 60),
  386. (7, "/aidop/s0/quality/inspection-standard", "aidopS0QlyInspectionStandard", "检验标准", "/aidop/s0/quality/InspectionStandardList", 70),
  387. (8, "/aidop/s0/quality/inspection-item", "aidopS0QlyInspectionItem", "检验项目", "/aidop/s0/quality/InspectionItemList", 80),
  388. (9, "/aidop/s0/quality/inspection-frequency", "aidopS0QlyInspectionFrequency", "检验频率", "/aidop/s0/quality/InspectionFrequencyList", 90),
  389. (10, "/aidop/s0/quality/inspection-plan", "aidopS0QlyInspectionPlan", "检验方案", "/aidop/s0/quality/InspectionPlanList", 100),
  390. (11, "/aidop/s0/quality/raw-inspection-spec", "aidopS0QlyRawInspectionSpec", "原材料检验规范", "/aidop/s0/quality/RawInspectionSpecList", 110),
  391. (12, "/aidop/s0/quality/process-inspection-spec", "aidopS0QlyProcessInspectionSpec", "过程检验规范", "/aidop/s0/quality/ProcessInspectionSpecList", 120),
  392. };
  393. foreach (var (idOff, path, name, title, component, order) in leaves)
  394. {
  395. yield return new SysMenu
  396. {
  397. Id = subDirId + idOff,
  398. Pid = subDirId,
  399. Title = title,
  400. Path = path,
  401. Name = name,
  402. Component = component,
  403. Icon = "ele-Document",
  404. Type = MenuTypeEnum.Menu,
  405. CreateTime = ct,
  406. OrderNo = order,
  407. Remark = $"S0 {title}"
  408. };
  409. }
  410. }
  411. private static IEnumerable<SysMenu> BuildS0WarehouseMenus(DateTime ct)
  412. {
  413. const long s0DataModelingMenuId = 1322000000001L;
  414. const long subDirId = 1329005000000L;
  415. yield return new SysMenu
  416. {
  417. Id = subDirId,
  418. Pid = s0DataModelingMenuId,
  419. Title = "仓储建模",
  420. Path = "/aidop/s0/warehouse",
  421. Name = "aidopS0Warehouse",
  422. Component = "Layout",
  423. Icon = "ele-OfficeBuilding",
  424. Type = MenuTypeEnum.Dir,
  425. CreateTime = ct,
  426. OrderNo = 50,
  427. Remark = "S0 仓储建模"
  428. };
  429. var leaves = new (long IdOff, string Path, string Name, string Title, string Component, int Order)[]
  430. {
  431. (1, "/aidop/s0/warehouse/department", "aidopS0WhDepartment", "部门维护", "/aidop/s0/warehouse/DepartmentList", 10),
  432. (2, "/aidop/s0/warehouse/employee", "aidopS0WhEmployee", "雇员列表", "/aidop/s0/warehouse/EmployeeList", 20),
  433. (3, "/aidop/s0/warehouse/cost-center", "aidopS0WhCostCenter", "成本中心", "/aidop/s0/warehouse/CostCenterList", 30),
  434. (4, "/aidop/s0/warehouse/location", "aidopS0WhLocation", "库位维护", "/aidop/s0/warehouse/LocationList", 40),
  435. (5, "/aidop/s0/warehouse/location-shelf", "aidopS0WhLocationShelf", "货架列表", "/aidop/s0/warehouse/LocationShelfList", 50),
  436. (6, "/aidop/s0/warehouse/barcode-rule", "aidopS0WhBarcodeRule", "条码规则", "/aidop/s0/warehouse/BarcodeRuleList", 60),
  437. (7, "/aidop/s0/warehouse/label-type", "aidopS0WhLabelType", "标签格式", "/aidop/s0/warehouse/LabelTypeList", 70),
  438. (8, "/aidop/s0/warehouse/nbr-type", "aidopS0WhNbrType", "单号类型", "/aidop/s0/warehouse/NbrTypeList", 80),
  439. (9, "/aidop/s0/warehouse/nbr-control", "aidopS0WhNbrControl", "单号规则维护", "/aidop/s0/warehouse/NbrControlList", 90),
  440. (10, "/aidop/s0/warehouse/item-pack", "aidopS0WhItemPack", "零件包装规格", "/aidop/s0/warehouse/ItemPackList", 100),
  441. (11, "/aidop/s0/warehouse/emp-work-duty", "aidopS0WhEmpWorkDuty", "物料职责维护", "/aidop/s0/warehouse/EmpWorkDutyList", 110),
  442. (12, "/aidop/s0/warehouse/task-assignment", "aidopS0WhTaskAssignment", "物料状态任务指派", "/aidop/s0/warehouse/TaskAssignmentList", 120),
  443. };
  444. foreach (var (idOff, path, name, title, component, order) in leaves)
  445. {
  446. yield return new SysMenu
  447. {
  448. Id = subDirId + idOff,
  449. Pid = subDirId,
  450. Title = title,
  451. Path = path,
  452. Name = name,
  453. Component = component,
  454. Icon = "ele-Document",
  455. Type = MenuTypeEnum.Menu,
  456. CreateTime = ct,
  457. OrderNo = order,
  458. Remark = $"S0 {title}"
  459. };
  460. }
  461. }
  462. private static readonly (string Code, string L1, (string Title, string Desc, string Complexity, string Days, string Note)[] Leaves)[] ModuleDefinitions =
  463. {
  464. ("S0", "S0 运营建模", new[]
  465. {
  466. ("数据建模", "支持数据库表结构设计与建模", "高", "5", "核心基础功能"),
  467. ("业务建模", "支持业务流程建模与配置", "高", "5", "核心基础功能"),
  468. }),
  469. ("S1", "S1 产销协同", new[]
  470. {
  471. ("订单管理", "销售订单录入、查询、编辑、删除", "中", "3", ""),
  472. ("计划管理", "生产计划制定与分解", "中", "3", ""),
  473. ("工单管理", "工单创建、分配、跟踪", "中", "3", ""),
  474. ("产销协同看板", "订单与生产协同数据可视化", "高", "5", "数据看板类"),
  475. }),
  476. ("S2", "S2 制造协同", new[]
  477. {
  478. ("生产排程", "生产任务排程与调度", "高", "5", ""),
  479. ("作业计划", "车间作业计划管理", "中", "3", ""),
  480. ("制造协同看板", "制造过程协同数据展示", "高", "5", "数据看板类"),
  481. }),
  482. ("S3", "S3 供应协同", new[]
  483. {
  484. ("物料计划", "物料需求计划(MRP)计算", "高", "7", "核心算法"),
  485. ("供应协同看板", "供应商协同数据可视化", "中", "4", "数据看板类"),
  486. }),
  487. ("S4", "S4 采购执行", new[]
  488. {
  489. ("采购管理", "采购申请、订单、合同管理", "中", "4", ""),
  490. ("交货管理", "供应商交货跟踪与验收", "中", "3", ""),
  491. ("退货管理", "采购退货流程处理", "低", "2", ""),
  492. ("采购执行看板", "采购执行数据可视化", "中", "4", "数据看板类"),
  493. }),
  494. ("S5", "S5 物料仓储", new[]
  495. {
  496. ("来料检验", "IQC来料质量检验", "中", "3", ""),
  497. ("仓储管理", "仓库入库、出库、调拨", "中", "4", ""),
  498. ("库存数据", "库存查询、盘点、调整", "中", "3", ""),
  499. ("物料仓储看板", "仓储数据可视化分析", "中", "4", "数据看板类"),
  500. }),
  501. ("S6", "S6 生产执行", new[]
  502. {
  503. ("生产记录管理", "生产过程数据记录", "中", "3", ""),
  504. ("过程质量管理", "IPQC过程质量检验", "中", "4", ""),
  505. ("设备工装管理", "设备台账、保养、维修", "中", "4", ""),
  506. ("生产执行看板", "生产执行数据可视化", "高", "5", "数据看板类"),
  507. }),
  508. ("S7", "S7 成品仓储", new[]
  509. {
  510. ("成品质量管理", "OQC成品质量检验", "中", "3", ""),
  511. ("生产入库管理", "成品入库流程", "低", "2", ""),
  512. ("成品出库管理", "成品出库发货流程", "低", "2", ""),
  513. ("成品库存管理", "成品库存查询与管理", "中", "3", ""),
  514. }),
  515. ("S8", "S8 异常监控", new[]
  516. {
  517. ("异常管理", "生产异常上报、处理、跟踪", "中", "4", ""),
  518. }),
  519. ("S9", "S9 运营指标", new[]
  520. {
  521. ("ERP同步", "与外部ERP系统数据同步", "高", "7", "接口集成"),
  522. ("日志查询", "系统操作日志查询", "低", "2", ""),
  523. ("ERP事务", "ERP相关事务处理", "中", "3", ""),
  524. }),
  525. ("M11", "系统管理", new[]
  526. {
  527. ("组织架构", "部门、岗位、人员管理", "中", "3", "与框架系统管理对应,后续可映射具体页"),
  528. ("菜单管理", "系统菜单权限配置", "中", "3", ""),
  529. }),
  530. ("M12", "流程平台", new[]
  531. {
  532. ("流程管理", "工作流流程定义与配置", "高", "7", "核心引擎"),
  533. ("表单管理", "流程表单设计与配置", "高", "5", ""),
  534. ("应用设计", "业务应用快速设计", "高", "5", ""),
  535. ("数据资源配置", "数据资源连接配置", "中", "4", ""),
  536. ("格式化JSON", "JSON数据格式化工具", "低", "1", "工具类"),
  537. ("模板管理", "流程模板管理", "中", "3", ""),
  538. ("系统按钮", "系统按钮权限配置", "低", "2", ""),
  539. ("流程按钮", "流程操作按钮配置", "低", "2", ""),
  540. ("应用程序", "外部应用集成管理", "中", "4", ""),
  541. ("接口系统", "API接口配置管理", "高", "5", ""),
  542. }),
  543. ("M13", "系统工具", new[]
  544. {
  545. ("数据字典", "系统字典数据管理", "低", "2", ""),
  546. ("数据连接", "数据库连接配置", "中", "3", ""),
  547. ("首页设置", "系统首页个性化配置", "低", "2", ""),
  548. ("日志查询", "系统运行日志查询", "低", "2", ""),
  549. ("流水号管理", "业务流水号规则配置", "低", "2", ""),
  550. ("工作日设置", "工作日历配置", "低", "1", ""),
  551. ("图标库", "系统图标资源管理", "低", "1", ""),
  552. ("在线用户", "在线用户监控", "低", "2", ""),
  553. ("周库存统计", "库存周期统计报表", "中", "3", "报表类"),
  554. ("数据导入", "批量数据导入工具", "中", "3", ""),
  555. }),
  556. ("M14", "流程中心", new[]
  557. {
  558. ("发起流程", "新建并发起工作流程", "中", "3", ""),
  559. ("待办事项", "个人待办任务处理", "中", "3", ""),
  560. ("待办批量处理", "待办任务批量操作", "中", "3", ""),
  561. ("已办事项", "已办任务查询", "低", "2", ""),
  562. ("我的流程", "我发起的流程跟踪", "中", "3", ""),
  563. ("已委托事项", "委托他人处理的事项", "低", "2", ""),
  564. ("流程委托", "流程任务委托配置", "低", "2", ""),
  565. ("流程意见", "流程审批意见管理", "低", "2", ""),
  566. }),
  567. ("M15", "个人设置", new[]
  568. {
  569. ("个人信息", "个人资料维护", "低", "1", ""),
  570. ("头像设置", "个人头像上传", "低", "1", ""),
  571. ("修改密码", "密码修改功能", "低", "1", ""),
  572. ("签章管理", "个人电子签章管理", "中", "3", ""),
  573. ("文件管理", "个人文件存储管理", "中", "3", ""),
  574. ("快捷菜单", "个人快捷方式配置", "低", "1", ""),
  575. }),
  576. ("M16", "系统首页", new[]
  577. {
  578. ("系统首页", "系统门户首页", "中", "3", "门户类"),
  579. ("发起流程(快捷)", "首页快捷发起流程", "低", "1", ""),
  580. ("我的流程(快捷)", "首页流程快捷入口", "低", "1", ""),
  581. ("待办事项(快捷)", "首页待办快捷入口", "低", "1", ""),
  582. }),
  583. };
  584. }