SysMenuSeedData.cs 72 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717
  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. var path = PathOverrides.TryGetValue((modCode, idx), out var pathOv) ? pathOv : $"/aidop/{codeLower}/{idx:000}";
  62. var routeName = NameOverrides.TryGetValue((modCode, idx), out var nameOv) ? nameOv : $"aidop{mod.Code}{idx:000}";
  63. list.Add(new SysMenu
  64. {
  65. Id = 1322000000000L + menuSeq,
  66. Pid = dirId,
  67. Title = leaf.Title,
  68. Path = path,
  69. Name = routeName,
  70. Component = component,
  71. Type = menuType,
  72. CreateTime = ct,
  73. OrderNo = subOrder++,
  74. Icon = isDir ? "ele-Folder" : "ele-Document",
  75. Remark = BuildRemark(mod.Code, leaf)
  76. });
  77. }
  78. }
  79. foreach (var m in BuildAidopSmartOpsSeedMenus(ct))
  80. list.Add(m);
  81. foreach (var m in BuildS0SalesMenus(ct))
  82. list.Add(m);
  83. foreach (var m in BuildS0SupplyMenus(ct))
  84. list.Add(m);
  85. foreach (var m in BuildS0ManufacturingMenus(ct))
  86. list.Add(m);
  87. foreach (var m in BuildS0QualityMenus(ct))
  88. list.Add(m);
  89. foreach (var m in BuildS0WarehouseMenus(ct))
  90. list.Add(m);
  91. foreach (var m in BuildS1OrderWorkOrderMenus(ct))
  92. list.Add(m);
  93. foreach (var m in BuildS2ManufacturingCollaborationMenus(ct))
  94. list.Add(m);
  95. foreach (var m in BuildS3SupplyMenus(ct))
  96. list.Add(m);
  97. foreach (var m in BuildS4DeliveryMenus(ct))
  98. list.Add(m);
  99. foreach (var m in BuildS4ReturnMenus(ct))
  100. list.Add(m);
  101. foreach (var m in BuildS4ExecutionKanbanMenus(ct))
  102. list.Add(m);
  103. foreach (var m in BuildS1SalesKanbanMenus(ct))
  104. list.Add(m);
  105. foreach (var m in BuildS8CollaborationMenus(ct))
  106. list.Add(m);
  107. // 产销协同看板改为目录后,访问 /aidop/s1/SalesKanBan 默认进入指标看板子页
  108. var salesKanBanDir = list.FirstOrDefault(x => x.Id == 1322000000005L);
  109. if (salesKanBanDir != null)
  110. salesKanBanDir.Redirect = "/aidop/s1/SalesKanBan/kanban";
  111. // S2:生产排程 / 作业计划 / 制造协同看板 为目录,默认进入各自首子页
  112. var s2ProdSched = list.FirstOrDefault(x => x.Id == 1322000000006L);
  113. if (s2ProdSched != null)
  114. s2ProdSched.Redirect = "/aidop/s2/production-scheduling/work-order-scheduling";
  115. var s2OpPlan = list.FirstOrDefault(x => x.Id == 1322000000007L);
  116. if (s2OpPlan != null)
  117. s2OpPlan.Redirect = "/aidop/s2/operation-plan/executable-daily-plan";
  118. var s2MfgKanban = list.FirstOrDefault(x => x.Id == 1322000000008L);
  119. if (s2MfgKanban != null)
  120. s2MfgKanban.Redirect = "/aidop/s2/collaboration-kanban/work-order-progress";
  121. var s3MaterialPlan = list.FirstOrDefault(x => x.Id == 1322000000009L);
  122. if (s3MaterialPlan != null)
  123. s3MaterialPlan.Redirect = "/aidop/s3/material-plan/demand-schedule";
  124. var s3Procurement = list.FirstOrDefault(x => x.Id == 1322000000010L);
  125. if (s3Procurement != null)
  126. {
  127. s3Procurement.Title = "采购管理";
  128. s3Procurement.Path = "/aidop/s3/procurement";
  129. s3Procurement.Name = "aidopS3Procurement";
  130. s3Procurement.Component = "Layout";
  131. s3Procurement.Icon = "ele-Folder";
  132. s3Procurement.Type = MenuTypeEnum.Dir;
  133. s3Procurement.Redirect = "/aidop/s3/procurement/purchase-request";
  134. s3Procurement.Remark = "S3 采购管理";
  135. }
  136. var s4Delivery = list.FirstOrDefault(x => x.Id == 1322000000012L);
  137. if (s4Delivery != null)
  138. s4Delivery.Redirect = "/aidop/s4/delivery/supplier-delivery-management";
  139. var s4Return = list.FirstOrDefault(x => x.Id == 1322000000013L);
  140. if (s4Return != null)
  141. {
  142. s4Return.Title = "退货管理";
  143. s4Return.Path = "/aidop/s4/return-mgmt";
  144. s4Return.Name = "aidopS4ReturnMgmt";
  145. s4Return.Component = "Layout";
  146. s4Return.Icon = "ele-Folder";
  147. s4Return.Type = MenuTypeEnum.Dir;
  148. s4Return.Redirect = "/aidop/s4/return-mgmt/purchase-return-order";
  149. s4Return.Remark = "S4 退货管理";
  150. }
  151. // S4 规划项「采购管理」与子模块 S3「采购管理」重叠,不在侧栏展示(仍保留种子 Id 兼容历史)
  152. var s4ProcMgmt = list.FirstOrDefault(x => x.Id == 1322000000011L);
  153. if (s4ProcMgmt != null)
  154. {
  155. s4ProcMgmt.IsHide = true;
  156. s4ProcMgmt.Remark = $"{s4ProcMgmt.Remark}|侧栏隐藏:采购业务入口以 S3 采购管理为准";
  157. }
  158. // S4 采购执行看板 → 列表页路由与组件对齐看板 Vue
  159. var s4Kanban = list.FirstOrDefault(x => x.Id == 1322000000014L);
  160. if (s4Kanban != null)
  161. {
  162. s4Kanban.Path = "/aidop/s4/execution-kanban";
  163. s4Kanban.Name = "aidopS4ExecutionKanban";
  164. s4Kanban.Component = "Layout";
  165. s4Kanban.Icon = "ele-Folder";
  166. s4Kanban.Title = "采购执行看板";
  167. s4Kanban.Type = MenuTypeEnum.Dir;
  168. s4Kanban.Redirect = "/aidop/s4/execution-kanban/dashboard";
  169. s4Kanban.Remark = "S4 采购执行看板目录(含主页 + 供应商欠料看板)";
  170. }
  171. // S8:复用自动生成的首项菜单位,直接作为「异常监控看板」页,避免再出现中间层「异常管理」目录
  172. var s8Dashboard = list.FirstOrDefault(x => x.Id == 1322000000027L);
  173. if (s8Dashboard != null)
  174. {
  175. s8Dashboard.Title = "异常监控看板";
  176. s8Dashboard.Path = "/aidop/s8/dashboard";
  177. s8Dashboard.Name = "aidopS8Dashboard";
  178. s8Dashboard.Component = "/aidop/s8/dashboard/S8DashboardPage";
  179. s8Dashboard.Icon = "ele-DataBoard";
  180. s8Dashboard.Type = MenuTypeEnum.Menu;
  181. s8Dashboard.Redirect = null;
  182. s8Dashboard.Remark = "S8 异常监控看板";
  183. }
  184. return list;
  185. }
  186. /// <summary>
  187. /// 智慧诊断 + 智慧运营看板(入库,便于平台「菜单管理」配置;勿在 Web aidopMenuDisplay 再注入整段菜单)。
  188. /// </summary>
  189. private static IEnumerable<SysMenu> BuildAidopSmartOpsSeedMenus(DateTime ct)
  190. {
  191. const long smartOpsDirId = 1320990000200L;
  192. yield return new SysMenu
  193. {
  194. Id = 1320990000201L,
  195. Pid = AidopRootId,
  196. Title = "智慧诊断",
  197. Path = "/aidop/smart-diagnosis",
  198. Name = "aidopSmartDiagnosis",
  199. Component = "/aidop/diagnosis/index",
  200. Icon = "ele-TrendCharts",
  201. Type = MenuTypeEnum.Menu,
  202. CreateTime = ct,
  203. OrderNo = 251,
  204. Remark = "Ai-DOP 智慧诊断"
  205. };
  206. yield return new SysMenu
  207. {
  208. Id = smartOpsDirId,
  209. Pid = AidopRootId,
  210. Title = "智慧运营看板",
  211. Path = "/aidop/smart-ops",
  212. Name = "aidopSmartOpsRoot",
  213. Component = "Layout",
  214. Icon = "ele-DataBoard",
  215. Type = MenuTypeEnum.Dir,
  216. CreateTime = ct,
  217. OrderNo = 252,
  218. Remark = "Ai-DOP 智慧运营看板分组"
  219. };
  220. // OrderNo:建模紧接九宫格之后,避免在侧栏最底部不易发现;已落库环境需在菜单管理调序或改库
  221. var children = new (long Id, string Path, string Name, string Title, string Component, int Order)[]
  222. {
  223. (1320990000301L, "/aidop/smart-ops/grid", "aidopSmartOpsGrid", "九宫格智慧运营看板", "/dashboard/home", 100),
  224. (1320990000311L, "/aidop/smart-ops/modeling", "aidopSmartOpsModeling", "运营指标建模", "/aidop/kanban/s0", 105),
  225. (1320990000312L, "/aidop/smart-ops/kpi-master", "aidopSmartOpsKpiMaster", "运营指标主数据", "/aidop/kanban/kpiMaster", 106),
  226. (1320990000313L, "/aidop/smart-ops/business-fact", "aidopSmartOpsBusinessFact", "业务事实字典", "/aidop/kanban/businessFact", 107),
  227. (1320990000302L, "/aidop/smart-ops/s1", "aidopSmartOpsS1", "S1产销协同看板", "/aidop/kanban/s1", 110),
  228. (1320990000303L, "/aidop/smart-ops/s2", "aidopSmartOpsS2", "S2制造协同看板", "/aidop/kanban/s2", 120),
  229. (1320990000304L, "/aidop/smart-ops/s3", "aidopSmartOpsS3", "S3供应协同看板", "/aidop/kanban/s3", 130),
  230. (1320990000305L, "/aidop/smart-ops/s4", "aidopSmartOpsS4", "S4采购执行看板", "/aidop/kanban/s4", 140),
  231. (1320990000306L, "/aidop/smart-ops/s5", "aidopSmartOpsS5", "S5物料仓储看板", "/aidop/kanban/s5", 150),
  232. (1320990000307L, "/aidop/smart-ops/s6", "aidopSmartOpsS6", "S6生产执行看板", "/aidop/kanban/s6", 160),
  233. (1320990000308L, "/aidop/smart-ops/s7", "aidopSmartOpsS7", "S7成品仓储看板", "/aidop/kanban/s7", 170),
  234. (1320990000309L, "/aidop/smart-ops/s8", "aidopSmartOpsS8", "S8异常监控看板", "/aidop/kanban/s8", 180),
  235. (1320990000310L, "/aidop/smart-ops/s9", "aidopSmartOpsS9", "S9运营指标看板", "/aidop/kanban/s9", 190),
  236. };
  237. foreach (var (id, path, name, title, component, order) in children)
  238. {
  239. yield return new SysMenu
  240. {
  241. Id = id,
  242. Pid = smartOpsDirId,
  243. Title = title,
  244. Path = path,
  245. Name = name,
  246. Component = component,
  247. Icon = "ele-DataAnalysis",
  248. Type = MenuTypeEnum.Menu,
  249. CreateTime = ct,
  250. OrderNo = order,
  251. Remark = title
  252. };
  253. }
  254. }
  255. private static string ResolveComponent(string modCode, int leafIndex) =>
  256. ComponentOverrides.TryGetValue((modCode, leafIndex), out var c) ? c : "/aidop/planning/index";
  257. private static readonly Dictionary<(string Mod, int Leaf), string> ComponentOverrides = new()
  258. {
  259. { ("S1", 3), "/aidop/kanban/s1" },
  260. { ("S4", 4), "/aidop/kanban/s4" },
  261. };
  262. /// <summary>S1 等模块下叶子菜单 path 覆盖(目录化后使用语义路径)。</summary>
  263. private static readonly Dictionary<(string Mod, int Leaf), string> PathOverrides = new()
  264. {
  265. { ("S1", 1), "/aidop/s1/order-mgmt" },
  266. { ("S1", 2), "/aidop/s1/workorder-mgmt" },
  267. { ("S1", 3), "/aidop/s1/SalesKanBan" },
  268. { ("S2", 1), "/aidop/s2/production-scheduling" },
  269. { ("S2", 2), "/aidop/s2/operation-plan" },
  270. { ("S2", 3), "/aidop/s2/collaboration-kanban" },
  271. { ("S3", 1), "/aidop/s3/material-plan" },
  272. { ("S4", 2), "/aidop/s4/delivery" },
  273. { ("S4", 3), "/aidop/s4/return-mgmt" },
  274. { ("S4", 4), "/aidop/s4/execution-kanban" },
  275. };
  276. /// <summary>S1 等模块下叶子菜单 route name 覆盖。</summary>
  277. private static readonly Dictionary<(string Mod, int Leaf), string> NameOverrides = new()
  278. {
  279. { ("S1", 1), "aidopS1OrderMgmt" },
  280. { ("S1", 2), "aidopS1WorkOrderMgmt" },
  281. { ("S2", 1), "aidopS2ProductionScheduling" },
  282. { ("S2", 2), "aidopS2OperationPlan" },
  283. { ("S2", 3), "aidopS2CollaborationKanban" },
  284. { ("S3", 1), "aidopS3MaterialPlan" },
  285. { ("S4", 2), "aidopS4Delivery" },
  286. { ("S4", 3), "aidopS4ReturnMgmt" },
  287. { ("S4", 4), "aidopS4ExecutionKanban" },
  288. };
  289. /// <summary>
  290. /// 需要从 Menu 提升为 Dir(目录)的叶子节点;用于承载子级菜单。
  291. /// </summary>
  292. private static readonly HashSet<(string Mod, int Leaf)> DirOverrides = new()
  293. {
  294. { ("S0", 1) }, // 数据建模 → 目录,产销建模挂在其下
  295. { ("S1", 1) }, // 订单管理 → 目录(销售订单、合同评审)
  296. { ("S1", 2) }, // 工单管理 → 目录(工单列表、工单下达)
  297. { ("S1", 3) }, // 产销协同看板 → 目录(指标看板、需求明细核验)
  298. { ("S2", 1) }, // 生产排程 → 目录(工单工序排程、排产异常记录)
  299. { ("S2", 2) }, // 作业计划 → 目录(可执行日计划、产线日历等)
  300. { ("S2", 3) }, // 制造协同看板 → 目录(工单执行进度看板)
  301. { ("S3", 1) }, // 物料计划 → 目录(物料需求计划)
  302. { ("S4", 2) }, // 交货管理 → 目录(供应商交货管理、供应商发货单)
  303. { ("S4", 3) }, // 退货管理 → 目录(采购退货单)
  304. };
  305. private static IEnumerable<SysMenu> BuildS4DeliveryMenus(DateTime ct)
  306. {
  307. const long deliveryDirId = 1322000000012L;
  308. const long baseId = 1329004100000L;
  309. yield return new SysMenu
  310. {
  311. Id = baseId + 1,
  312. Pid = deliveryDirId,
  313. Title = "供应商交货管理",
  314. Path = "/aidop/s4/delivery/supplier-delivery-management",
  315. Name = "aidopS4SupplierDeliveryManagement",
  316. Component = "/aidop/s4/delivery/supplierDeliveryManagementList",
  317. Icon = "ele-Document",
  318. Type = MenuTypeEnum.Menu,
  319. CreateTime = ct,
  320. OrderNo = 10,
  321. Remark = "S4 供应商交货管理"
  322. };
  323. yield return new SysMenu
  324. {
  325. Id = baseId + 2,
  326. Pid = deliveryDirId,
  327. Title = "供应商发货单",
  328. Path = "/aidop/s4/delivery/supplier-shipment",
  329. Name = "aidopS4SupplierShipment",
  330. Component = "/aidop/s4/delivery/supplierShipmentList",
  331. Icon = "ele-Tickets",
  332. Type = MenuTypeEnum.Menu,
  333. CreateTime = ct,
  334. OrderNo = 20,
  335. Remark = "S4 供应商发货单"
  336. };
  337. // 隐藏路由:用于「生成发货单 / 编辑 / 查看」跳转
  338. yield return new SysMenu
  339. {
  340. Id = baseId + 3,
  341. Pid = deliveryDirId,
  342. Title = "发货单表单",
  343. Path = "/aidop/s4/delivery/supplier-shipment-form",
  344. Name = "aidopS4SupplierShipmentForm",
  345. Component = "/aidop/s4/delivery/supplierShipmentForm",
  346. Icon = "ele-Document",
  347. Type = MenuTypeEnum.Menu,
  348. CreateTime = ct,
  349. OrderNo = 90,
  350. IsHide = true,
  351. Remark = "S4 发货单新增/编辑/查看表单"
  352. };
  353. }
  354. private static IEnumerable<SysMenu> BuildS4ReturnMenus(DateTime ct)
  355. {
  356. const long returnDirId = 1322000000013L;
  357. const long baseId = 1329004200000L;
  358. yield return new SysMenu
  359. {
  360. Id = baseId + 1,
  361. Pid = returnDirId,
  362. Title = "采购退货单",
  363. Path = "/aidop/s4/return-mgmt/purchase-return-order",
  364. Name = "aidopS4PurchaseReturnOrder",
  365. Component = "/aidop/s4/return/purchaseReturnOrderList",
  366. Icon = "ele-Document",
  367. Type = MenuTypeEnum.Menu,
  368. CreateTime = ct,
  369. OrderNo = 10,
  370. Remark = "S4 采购退货单"
  371. };
  372. yield return new SysMenu
  373. {
  374. Id = baseId + 2,
  375. Pid = returnDirId,
  376. Title = "采购退货单表单",
  377. Path = "/aidop/s4/return-mgmt/purchase-return-order-form",
  378. Name = "aidopS4PurchaseReturnOrderForm",
  379. Component = "/aidop/s4/return/purchaseReturnOrderForm",
  380. Icon = "ele-Document",
  381. Type = MenuTypeEnum.Menu,
  382. CreateTime = ct,
  383. OrderNo = 90,
  384. IsHide = true,
  385. Remark = "S4 采购退货单表单(新增/编辑/查看)"
  386. };
  387. yield return new SysMenu
  388. {
  389. Id = baseId + 3,
  390. Pid = returnDirId,
  391. Title = "IQC 退货查询",
  392. Path = "/aidop/s4/return-mgmt/iqc-return-query",
  393. Name = "aidopS4IqcReturnQuery",
  394. Component = "/aidop/s4/return/iqcReturnQueryList",
  395. Icon = "ele-Search",
  396. Type = MenuTypeEnum.Menu,
  397. CreateTime = ct,
  398. OrderNo = 20,
  399. Remark = "S4 IQC 退货查询(只读列表)"
  400. };
  401. }
  402. private static IEnumerable<SysMenu> BuildS4ExecutionKanbanMenus(DateTime ct)
  403. {
  404. const long kanbanDirId = 1322000000014L;
  405. const long baseId = 1329004300000L;
  406. yield return new SysMenu
  407. {
  408. Id = baseId + 1,
  409. Pid = kanbanDirId,
  410. Title = "采购执行看板主页",
  411. Path = "/aidop/s4/execution-kanban/dashboard",
  412. Name = "aidopS4ExecutionKanbanDashboard",
  413. Component = "/aidop/kanban/s4",
  414. Icon = "ele-DataBoard",
  415. Type = MenuTypeEnum.Menu,
  416. CreateTime = ct,
  417. OrderNo = 10,
  418. Remark = "S4 采购执行看板主页(/aidop/kanban/s4)"
  419. };
  420. yield return new SysMenu
  421. {
  422. Id = baseId + 2,
  423. Pid = kanbanDirId,
  424. Title = "供应商欠料看板",
  425. Path = "/aidop/s4/execution-kanban/supplier-shortage-kanban",
  426. Name = "aidopS4SupplierShortageKanban",
  427. Component = "/aidop/s4/execution-kanban/supplierShortageKanbanList",
  428. Icon = "ele-List",
  429. Type = MenuTypeEnum.Menu,
  430. CreateTime = ct,
  431. OrderNo = 20,
  432. Remark = "S4 供应商欠料看板(WorkOrdDetailTotalKB)"
  433. };
  434. }
  435. private static string BuildRemark(string code, (string Title, string Desc, string Complexity, string Days, string Note) leaf)
  436. {
  437. var notePart = string.IsNullOrWhiteSpace(leaf.Note) ? "" : $" | {leaf.Note}";
  438. var s = $"[{code}|{leaf.Complexity}|{leaf.Days}人天] {leaf.Desc}{notePart}";
  439. return s.Length <= 256 ? s : s[..256];
  440. }
  441. private static IEnumerable<SysMenu> BuildS0SalesMenus(DateTime ct)
  442. {
  443. // 与 ModuleDefinitions 中 S0 首项「数据建模」的生成 Id 一致(全局 menuSeq=1 → 1322000000001)
  444. const long s0DataModelingMenuId = 1322000000001L;
  445. const long subDirId = 1329002000000L;
  446. yield return new SysMenu
  447. {
  448. Id = subDirId,
  449. Pid = s0DataModelingMenuId,
  450. Title = "产销建模",
  451. Path = "/aidop/s0/sales",
  452. Name = "aidopS0Sales",
  453. Component = "Layout",
  454. Icon = "ele-ShoppingCart",
  455. Type = MenuTypeEnum.Dir,
  456. CreateTime = ct,
  457. OrderNo = 20,
  458. Remark = "S0 产销建模"
  459. };
  460. yield return new SysMenu
  461. {
  462. Id = subDirId + 1,
  463. Pid = subDirId,
  464. Title = "客户管理",
  465. Path = "/aidop/s0/sales/customer",
  466. Name = "aidopS0SalesCustomer",
  467. Component = "/aidop/s0/sales/CustomerList",
  468. Icon = "ele-User",
  469. Type = MenuTypeEnum.Menu,
  470. CreateTime = ct,
  471. OrderNo = 1,
  472. Remark = "S0 客户管理"
  473. };
  474. yield return new SysMenu
  475. {
  476. Id = subDirId + 2,
  477. Pid = subDirId,
  478. Title = "物料管理",
  479. Path = "/aidop/s0/sales/material",
  480. Name = "aidopS0SalesMaterial",
  481. Component = "/aidop/s0/sales/MaterialList",
  482. Icon = "ele-Box",
  483. Type = MenuTypeEnum.Menu,
  484. CreateTime = ct,
  485. OrderNo = 2,
  486. Remark = "S0 物料管理"
  487. };
  488. yield return new SysMenu
  489. {
  490. Id = subDirId + 3,
  491. Pid = subDirId,
  492. Title = "订单优先规则",
  493. Path = "/aidop/s0/sales/order-priority-rule",
  494. Name = "aidopS0SalesOrderPriorityRule",
  495. Component = "/aidop/s0/sales/OrderPriorityRuleList",
  496. Icon = "ele-Sort",
  497. Type = MenuTypeEnum.Menu,
  498. CreateTime = ct,
  499. OrderNo = 3,
  500. Remark = "S0 订单优先规则"
  501. };
  502. yield return new SysMenu
  503. {
  504. Id = subDirId + 4,
  505. Pid = subDirId,
  506. Title = "合同评审周期",
  507. Path = "/aidop/s0/sales/contract-review-cycle",
  508. Name = "aidopS0SalesContractReviewCycle",
  509. Component = "/aidop/s0/sales/ContractReviewCycleList",
  510. Icon = "ele-Clock",
  511. Type = MenuTypeEnum.Menu,
  512. CreateTime = ct,
  513. OrderNo = 4,
  514. Remark = "S0 合同评审周期标准配置"
  515. };
  516. yield return new SysMenu
  517. {
  518. Id = subDirId + 5,
  519. Pid = subDirId,
  520. Title = "产品设计周期",
  521. Path = "/aidop/s0/sales/product-design-cycle",
  522. Name = "aidopS0SalesProductDesignCycle",
  523. Component = "/aidop/s0/sales/ProductDesignCycleList",
  524. Icon = "ele-Timer",
  525. Type = MenuTypeEnum.Menu,
  526. CreateTime = ct,
  527. OrderNo = 5,
  528. Remark = "S0 产品设计周期标准配置"
  529. };
  530. yield return new SysMenu
  531. {
  532. Id = subDirId + 6,
  533. Pid = subDirId,
  534. Title = "订单评审周期",
  535. Path = "/aidop/s0/sales/order-review-cycle",
  536. Name = "aidopS0SalesOrderReviewCycle",
  537. Component = "/aidop/s0/sales/OrderReviewCycleList",
  538. Icon = "ele-AlarmClock",
  539. Type = MenuTypeEnum.Menu,
  540. CreateTime = ct,
  541. OrderNo = 6,
  542. Remark = "S0 订单评审周期标准配置"
  543. };
  544. }
  545. private static IEnumerable<SysMenu> BuildS0ManufacturingMenus(DateTime ct)
  546. {
  547. const long s0DataModelingMenuId = 1322000000001L;
  548. const long subDirId = 1329003000000L;
  549. yield return new SysMenu
  550. {
  551. Id = subDirId,
  552. Pid = s0DataModelingMenuId,
  553. Title = "制造建模",
  554. Path = "/aidop/s0/manufacturing",
  555. Name = "aidopS0Manufacturing",
  556. Component = "Layout",
  557. Icon = "ele-SetUp",
  558. Type = MenuTypeEnum.Dir,
  559. CreateTime = ct,
  560. OrderNo = 30,
  561. Remark = "S0 制造建模"
  562. };
  563. var leaves = new (long IdOff, string Path, string Name, string Title, string Component, int Order)[]
  564. {
  565. (1, "/aidop/s0/manufacturing/standard-bom", "aidopS0MfgStandardBom", "标准 BOM", "/aidop/s0/manufacturing/StandardBomManagement", 10),
  566. (2, "/aidop/s0/manufacturing/standard-operation", "aidopS0MfgStandardOperation", "标准工序", "/aidop/s0/manufacturing/StandardProcessList", 20),
  567. (3, "/aidop/s0/manufacturing/production-line", "aidopS0MfgProductionLine", "产线", "/aidop/s0/manufacturing/ProductionLineList", 30),
  568. (4, "/aidop/s0/manufacturing/routing", "aidopS0MfgRouting", "工艺路线", "/aidop/s0/manufacturing/RoutingList", 40),
  569. (5, "/aidop/s0/manufacturing/material-substitution", "aidopS0MfgMaterialSubstitution", "物料替代", "/aidop/s0/manufacturing/MaterialSubstitutionList", 50),
  570. (6, "/aidop/s0/manufacturing/work-order-control", "aidopS0MfgWorkOrderControl", "工单控制参数", "/aidop/s0/manufacturing/WorkOrderControlParams", 60),
  571. (7, "/aidop/s0/manufacturing/person-skill", "aidopS0MfgPersonSkill", "人员技能", "/aidop/s0/manufacturing/PersonnelSkillList", 70),
  572. (8, "/aidop/s0/manufacturing/person-skill-assignment", "aidopS0MfgPersonSkillAssignment", "人员技能维护", "/aidop/s0/manufacturing/PersonSkillAssignmentList", 80),
  573. (9, "/aidop/s0/manufacturing/line-post", "aidopS0MfgLinePost", "产线岗位维护", "/aidop/s0/manufacturing/LinePostList", 90),
  574. (10, "/aidop/s0/manufacturing/work-center", "aidopS0MfgWorkCenter", "工作中心", "/aidop/s0/manufacturing/WorkCenterList", 100),
  575. (11, "/aidop/s0/manufacturing/line-material", "aidopS0MfgLineMaterial", "线边物料", "/aidop/s0/manufacturing/LineMaterialList", 110),
  576. (12, "/aidop/s0/manufacturing/element-param-production", "aidopS0MfgElementParamProduction", "生产要素参数", "/aidop/s0/manufacturing/ProductionElementParamList", 120),
  577. (13, "/aidop/s0/manufacturing/material-process-element", "aidopS0MfgMaterialProcessElement", "物料工艺要素", "/aidop/s0/manufacturing/MaterialProcessElementList", 130),
  578. (14, "/aidop/s0/manufacturing/preprocess-element", "aidopS0MfgPreprocessElement", "前处理要素", "/aidop/s0/manufacturing/PreprocessElementList", 140),
  579. (15, "/aidop/s0/manufacturing/preprocess-element-param", "aidopS0MfgElementParamPreprocess", "前处理要素参数", "/aidop/s0/manufacturing/PreprocessElementParamList", 150),
  580. (16, "/aidop/s0/manufacturing/sop-file-type", "aidopS0MfgSopFileType", "SOP 文件类型", "/aidop/s0/manufacturing/SopFileTypeList", 160),
  581. (17, "/aidop/s0/manufacturing/sop-document", "aidopS0MfgSopDocument", "SOP 维护", "/aidop/s0/manufacturing/SopMaintenanceList", 170),
  582. };
  583. foreach (var (idOff, path, name, title, component, order) in leaves)
  584. {
  585. yield return new SysMenu
  586. {
  587. Id = subDirId + idOff,
  588. Pid = subDirId,
  589. Title = title,
  590. Path = path,
  591. Name = name,
  592. Component = component,
  593. Icon = "ele-Document",
  594. Type = MenuTypeEnum.Menu,
  595. CreateTime = ct,
  596. OrderNo = order,
  597. Remark = $"S0 {title}"
  598. };
  599. }
  600. yield return new SysMenu
  601. {
  602. Id = subDirId + 18,
  603. Pid = subDirId,
  604. Title = "选择替代方案",
  605. Path = "/aidop/s0/manufacturing/substitute-scheme-select",
  606. Name = "aidopS0MfgSubstituteSchemeSelect",
  607. Component = "/aidop/s0/manufacturing/SubstituteSchemeSelectList",
  608. Icon = "ele-List",
  609. Type = MenuTypeEnum.Menu,
  610. CreateTime = ct,
  611. OrderNo = 18,
  612. Remark = "S0 选择替代方案(只读查询)"
  613. };
  614. yield return new SysMenu
  615. {
  616. Id = subDirId + 19,
  617. Pid = subDirId,
  618. Title = "工序流转卡",
  619. Path = "/aidop/s0/manufacturing/process-flow-card",
  620. Name = "aidopS0MfgProcessFlowCard",
  621. Component = "/aidop/s0/manufacturing/ProcessFlowCardList",
  622. Icon = "ele-Tickets",
  623. Type = MenuTypeEnum.Menu,
  624. CreateTime = ct,
  625. OrderNo = 180,
  626. Remark = "S0 工序流转卡主数据"
  627. };
  628. yield return new SysMenu
  629. {
  630. Id = subDirId + 20,
  631. Pid = subDirId,
  632. Title = "订单排程周期",
  633. Path = "/aidop/s0/manufacturing/order-schedule-cycle",
  634. Name = "aidopS0MfgOrderScheduleCycle",
  635. Component = "/aidop/s0/manufacturing/OrderScheduleCycleList",
  636. Icon = "ele-Calendar",
  637. Type = MenuTypeEnum.Menu,
  638. CreateTime = ct,
  639. OrderNo = 190,
  640. Remark = "S0 订单排程周期标准"
  641. };
  642. }
  643. private static IEnumerable<SysMenu> BuildS0SupplyMenus(DateTime ct)
  644. {
  645. const long s0DataModelingMenuId = 1322000000001L;
  646. const long subDirId = 1329004000000L;
  647. yield return new SysMenu
  648. {
  649. Id = subDirId,
  650. Pid = s0DataModelingMenuId,
  651. Title = "供应建模",
  652. Path = "/aidop/s0/supply",
  653. Name = "aidopS0Supply",
  654. Component = "Layout",
  655. Icon = "ele-Ship",
  656. Type = MenuTypeEnum.Dir,
  657. CreateTime = ct,
  658. OrderNo = 40,
  659. Remark = "S0 供应建模"
  660. };
  661. yield return new SysMenu
  662. {
  663. Id = subDirId + 1,
  664. Pid = subDirId,
  665. Title = "供应商维护",
  666. Path = "/aidop/s0/supply/supplier",
  667. Name = "aidopS0SupplySupplier",
  668. Component = "/aidop/s0/supply/SupplierList",
  669. Icon = "ele-UserFilled",
  670. Type = MenuTypeEnum.Menu,
  671. CreateTime = ct,
  672. OrderNo = 1,
  673. Remark = "S0 供应商维护"
  674. };
  675. yield return new SysMenu
  676. {
  677. Id = subDirId + 2,
  678. Pid = subDirId,
  679. Title = "货源清单",
  680. Path = "/aidop/s0/supply/sourcing-item",
  681. Name = "aidopS0SupplySourcingItem",
  682. Component = "/aidop/s0/supply/SourcingList",
  683. Icon = "ele-List",
  684. Type = MenuTypeEnum.Menu,
  685. CreateTime = ct,
  686. OrderNo = 2,
  687. Remark = "S0 货源清单(srm_purchase)"
  688. };
  689. yield return new SysMenu
  690. {
  691. Id = subDirId + 3,
  692. Pid = subDirId,
  693. Title = "品类采购前置期",
  694. Path = "/aidop/s0/supply/category-lead-time",
  695. Name = "aidopS0SupplyCategoryLeadTime",
  696. Component = "/aidop/s0/supply/CategoryLeadTimeList",
  697. Icon = "ele-Clock",
  698. Type = MenuTypeEnum.Menu,
  699. CreateTime = ct,
  700. OrderNo = 3,
  701. Remark = "S0 品类采购前置期主数据"
  702. };
  703. yield return new SysMenu
  704. {
  705. Id = subDirId + 4,
  706. Pid = subDirId,
  707. Title = "物料计划周期",
  708. Path = "/aidop/s0/supply/material-plan-cycle",
  709. Name = "aidopS0SupplyMaterialPlanCycle",
  710. Component = "/aidop/s0/supply/MaterialPlanCycleList",
  711. Icon = "ele-Timer",
  712. Type = MenuTypeEnum.Menu,
  713. CreateTime = ct,
  714. OrderNo = 4,
  715. Remark = "S0 物料计划周期标准(小时),与 S3 指标对比需约定换算"
  716. };
  717. }
  718. private static IEnumerable<SysMenu> BuildS0QualityMenus(DateTime ct)
  719. {
  720. const long s0DataModelingMenuId = 1322000000001L;
  721. const long subDirId = 1329004500000L;
  722. yield return new SysMenu
  723. {
  724. Id = subDirId,
  725. Pid = s0DataModelingMenuId,
  726. Title = "质量建模",
  727. Path = "/aidop/s0/quality",
  728. Name = "aidopS0Quality",
  729. Component = "Layout",
  730. Icon = "ele-DataAnalysis",
  731. Type = MenuTypeEnum.Dir,
  732. CreateTime = ct,
  733. OrderNo = 45,
  734. Remark = "S0 质量建模"
  735. };
  736. var leaves = new (long IdOff, string Path, string Name, string Title, string Component, int Order)[]
  737. {
  738. (1, "/aidop/s0/quality/dictionary", "aidopS0QlyDictionary", "质量基础", "/aidop/s0/quality/QualityDictionaryPage", 10),
  739. (2, "/aidop/s0/quality/raw-whitelist", "aidopS0QlyRawWhitelist", "原材料白名单", "/aidop/s0/quality/RawWhitelistList", 20),
  740. (3, "/aidop/s0/quality/sampling-scheme", "aidopS0QlySamplingScheme", "抽样方案", "/aidop/s0/quality/SamplingSchemeList", 30),
  741. (4, "/aidop/s0/quality/instrument", "aidopS0QlyInstrument", "检验仪器", "/aidop/s0/quality/InspectionInstrumentList", 40),
  742. (13, "/aidop/s0/quality/gauge-instrument", "aidopS0QlyGaugeInstrument", "计量器具", "/aidop/s0/quality/InspectionInstrumentList", 45),
  743. (5, "/aidop/s0/quality/inspection-method", "aidopS0QlyInspectionMethod", "检验方法", "/aidop/s0/quality/InspectionMethodList", 50),
  744. (6, "/aidop/s0/quality/inspection-basis", "aidopS0QlyInspectionBasis", "检验依据", "/aidop/s0/quality/InspectionBasisList", 60),
  745. (7, "/aidop/s0/quality/inspection-standard", "aidopS0QlyInspectionStandard", "检验标准", "/aidop/s0/quality/InspectionStandardList", 70),
  746. (8, "/aidop/s0/quality/inspection-item", "aidopS0QlyInspectionItem", "检验项目", "/aidop/s0/quality/InspectionItemList", 80),
  747. (9, "/aidop/s0/quality/inspection-frequency", "aidopS0QlyInspectionFrequency", "检验频率", "/aidop/s0/quality/InspectionFrequencyList", 90),
  748. (10, "/aidop/s0/quality/inspection-plan", "aidopS0QlyInspectionPlan", "检验方案", "/aidop/s0/quality/InspectionPlanList", 100),
  749. (11, "/aidop/s0/quality/raw-inspection-spec", "aidopS0QlyRawInspectionSpec", "原材料检验规范", "/aidop/s0/quality/RawInspectionSpecList", 110),
  750. (12, "/aidop/s0/quality/process-inspection-spec", "aidopS0QlyProcessInspectionSpec", "过程检验规范", "/aidop/s0/quality/ProcessInspectionSpecList", 120),
  751. (14, "/aidop/s0/quality/fqc-inspection-spec", "aidopS0QlyFqcInspectionSpec", "FQC检验规范", "/aidop/s0/quality/FqcInspectionSpecList", 130),
  752. (15, "/aidop/s0/quality/oqc-inspection-spec", "aidopS0QlyOqcInspectionSpec", "OQC检验规范", "/aidop/s0/quality/OqcInspectionSpecList", 140),
  753. };
  754. foreach (var (idOff, path, name, title, component, order) in leaves)
  755. {
  756. yield return new SysMenu
  757. {
  758. Id = subDirId + idOff,
  759. Pid = subDirId,
  760. Title = title,
  761. Path = path,
  762. Name = name,
  763. Component = component,
  764. Icon = "ele-Document",
  765. Type = MenuTypeEnum.Menu,
  766. CreateTime = ct,
  767. OrderNo = order,
  768. Remark = $"S0 {title}"
  769. };
  770. }
  771. }
  772. /// <summary>
  773. /// S8 异常协同:直接挂在「S8 异常监控」目录下,不再经过中间层「异常管理」。
  774. /// </summary>
  775. private static IEnumerable<SysMenu> BuildS8CollaborationMenus(DateTime ct)
  776. {
  777. const long s8DirId = 1321000009000L;
  778. const long baseId = 1329008000000L;
  779. const long s8MonitoringDirId = 1329008000020L;
  780. // 异常监控子模块(专题大屏占位,后续接业务数据)
  781. yield return new SysMenu
  782. {
  783. Id = s8MonitoringDirId,
  784. Pid = s8DirId,
  785. Title = "异常监控",
  786. Path = "/aidop/s8/monitoring",
  787. Name = "aidopS8MonitoringDir",
  788. Component = "Layout",
  789. Redirect = "/aidop/s8/monitoring/overview",
  790. Icon = "ele-Monitor",
  791. Type = MenuTypeEnum.Dir,
  792. CreateTime = ct,
  793. OrderNo = 8,
  794. Remark = "S8 异常监控子模块"
  795. };
  796. yield return new SysMenu
  797. {
  798. Id = s8MonitoringDirId + 1,
  799. Pid = s8MonitoringDirId,
  800. Title = "异常监控大屏",
  801. Path = "/aidop/s8/monitoring/overview",
  802. Name = "aidopS8MonitoringOverview",
  803. Component = "/aidop/s8/monitoring/S8MonitoringOverviewPage",
  804. Icon = "ele-DataBoard",
  805. Type = MenuTypeEnum.Menu,
  806. CreateTime = ct,
  807. OrderNo = 10,
  808. Remark = "S8 异常监控大屏(占位)"
  809. };
  810. yield return new SysMenu
  811. {
  812. Id = s8MonitoringDirId + 2,
  813. Pid = s8MonitoringDirId,
  814. Title = "交付异常大屏",
  815. Path = "/aidop/s8/monitoring/delivery",
  816. Name = "aidopS8MonitoringDelivery",
  817. Component = "/aidop/s8/monitoring/S8MonitoringDeliveryPage",
  818. Icon = "ele-Position",
  819. Type = MenuTypeEnum.Menu,
  820. CreateTime = ct,
  821. OrderNo = 11,
  822. Remark = "S8 交付异常大屏(占位)"
  823. };
  824. yield return new SysMenu
  825. {
  826. Id = s8MonitoringDirId + 3,
  827. Pid = s8MonitoringDirId,
  828. Title = "生产异常大屏",
  829. Path = "/aidop/s8/monitoring/production",
  830. Name = "aidopS8MonitoringProduction",
  831. Component = "/aidop/s8/monitoring/S8MonitoringProductionPage",
  832. Icon = "ele-Cpu",
  833. Type = MenuTypeEnum.Menu,
  834. CreateTime = ct,
  835. OrderNo = 12,
  836. Remark = "S8 生产异常大屏(占位)"
  837. };
  838. yield return new SysMenu
  839. {
  840. Id = s8MonitoringDirId + 4,
  841. Pid = s8MonitoringDirId,
  842. Title = "供应异常大屏",
  843. Path = "/aidop/s8/monitoring/supply",
  844. Name = "aidopS8MonitoringSupply",
  845. Component = "/aidop/s8/monitoring/S8MonitoringSupplyPage",
  846. Icon = "ele-Box",
  847. Type = MenuTypeEnum.Menu,
  848. CreateTime = ct,
  849. OrderNo = 13,
  850. Remark = "S8 供应异常大屏(占位)"
  851. };
  852. // ORDER-FLOW-OVERVIEW-SHELL-1:SO 订单执行档案总览页壳(fixture/store 演示,未接后端)。
  853. yield return new SysMenu
  854. {
  855. Id = s8MonitoringDirId + 5,
  856. Pid = s8MonitoringDirId,
  857. Title = "订单执行档案",
  858. Path = "/aidop/s8/monitoring/order-execution",
  859. Name = "aidopS8OrderExecution",
  860. Component = "/aidop/s8/monitoring/SoOrderExecutionDashboardPage",
  861. Icon = "ele-Tickets",
  862. Type = MenuTypeEnum.Menu,
  863. CreateTime = ct,
  864. OrderNo = 14,
  865. Remark = "SO 订单执行档案总览(fixture 演示)"
  866. };
  867. // ORDER-FLOW-CHAIN-SHELL-1:链路全景隐藏路由(侧栏不显示,由总览页订单卡跳转进入)。
  868. yield return new SysMenu
  869. {
  870. Id = s8MonitoringDirId + 6,
  871. Pid = s8MonitoringDirId,
  872. Title = "订单链路全景",
  873. Path = "/aidop/s8/monitoring/order-execution/chain",
  874. Name = "aidopS8OrderExecutionChain",
  875. Component = "/aidop/s8/monitoring/OrderChainOverviewPage",
  876. Icon = "ele-Connection",
  877. Type = MenuTypeEnum.Menu,
  878. CreateTime = ct,
  879. OrderNo = 15,
  880. IsHide = true,
  881. Remark = "SO 订单链路全景(隐藏路由,由总览页跳转进入)"
  882. };
  883. // 可见业务页(「异常监控看板」复用自动生成的 1322000000027 菜单位)
  884. yield return new SysMenu
  885. {
  886. Id = baseId + 2,
  887. Pid = s8DirId,
  888. Title = "异常列表",
  889. Path = "/aidop/s8/exceptions",
  890. Name = "aidopS8ExceptionList",
  891. Component = "/aidop/s8/exceptions/S8ExceptionListPage",
  892. Icon = "ele-List",
  893. Type = MenuTypeEnum.Menu,
  894. CreateTime = ct,
  895. OrderNo = 20,
  896. Remark = "S8 异常列表"
  897. };
  898. yield return new SysMenu
  899. {
  900. Id = baseId + 3,
  901. Pid = s8DirId,
  902. Title = "主动提报",
  903. Path = "/aidop/s8/report",
  904. Name = "aidopS8ManualReport",
  905. Component = "/aidop/s8/report/S8ManualReportPage",
  906. Icon = "ele-EditPen",
  907. Type = MenuTypeEnum.Menu,
  908. CreateTime = ct,
  909. OrderNo = 30,
  910. Remark = "S8 主动提报"
  911. };
  912. yield return new SysMenu
  913. {
  914. Id = baseId + 4,
  915. Pid = s8DirId,
  916. Title = "配置中心",
  917. Path = "/aidop/s8/config",
  918. Name = "aidopS8ConfigHub",
  919. Component = "/aidop/s8/config/S8ConfigHubPage",
  920. Icon = "ele-Setting",
  921. Type = MenuTypeEnum.Menu,
  922. CreateTime = ct,
  923. OrderNo = 40,
  924. Remark = "S8 配置中心"
  925. };
  926. // 隐藏路由(不出侧栏,需参与动态路由注册)
  927. yield return new SysMenu
  928. {
  929. Id = baseId + 10,
  930. Pid = s8DirId,
  931. Title = "任务详情",
  932. Path = "/aidop/s8/exceptions/:id",
  933. Name = "aidopS8TaskDetail",
  934. Component = "/aidop/s8/exceptions/S8TaskDetailPage",
  935. Icon = "ele-Document",
  936. Type = MenuTypeEnum.Menu,
  937. CreateTime = ct,
  938. OrderNo = 90,
  939. IsHide = true,
  940. Remark = "S8 任务详情"
  941. };
  942. var cfg = new (long Off, string Path, string Name, string Title, string Component)[]
  943. {
  944. (11, "/aidop/s8/config/scenes", "aidopS8ScenarioConfig", "场景基础配置", "/aidop/s8/config/S8ScenarioConfigPage"),
  945. (12, "/aidop/s8/config/notifications", "aidopS8NotificationLayerConfig", "通知分层配置", "/aidop/s8/config/S8NotificationLayerPage"),
  946. (13, "/aidop/s8/config/roles", "aidopS8RolePermissionConfig", "角色权限配置", "/aidop/s8/config/S8RolePermissionConfigPage"),
  947. (14, "/aidop/s8/config/alert-rules", "aidopS8AlertRulesConfig", "报警规则配置", "/aidop/s8/config/S8AlertRulesPage"),
  948. (15, "/aidop/s8/config/data-sources", "aidopS8DataSourceConfig", "数据源配置", "/aidop/s8/config/S8DataSourceConfigPage"),
  949. (16, "/aidop/s8/config/watch-rules", "aidopS8WatchRuleConfig", "监视规则配置", "/aidop/s8/config/S8WatchRuleConfigPage"),
  950. (17, "/aidop/s8/config/exception-types", "aidopS8ExceptionTypeConfig", "异常类型配置", "/aidop/s8/config/S8ExceptionTypeConfigPage"),
  951. (18, "/aidop/s8/config/dashboard-cells", "aidopS8DashboardCellConfig", "大屏卡片配置", "/aidop/s8/config/S8DashboardCellConfigPage"),
  952. };
  953. foreach (var (off, path, name, title, component) in cfg)
  954. {
  955. yield return new SysMenu
  956. {
  957. Id = baseId + off,
  958. Pid = s8DirId,
  959. Title = title,
  960. Path = path,
  961. Name = name,
  962. Component = component,
  963. Icon = "ele-Document",
  964. Type = MenuTypeEnum.Menu,
  965. CreateTime = ct,
  966. OrderNo = 100 + (int)off,
  967. IsHide = true,
  968. Remark = $"S8 {title}"
  969. };
  970. }
  971. // ── S8 权限点(Btn):与 S8PermissionCatalog 同源,命名 s8:<resource>:<action>
  972. // Btn ID 段:baseId + 100..114(不与现有 Dir/Menu 冲突)。
  973. const long s8DashboardId = 1322000000027L; // 见上文「S8:复用自动生成的首项菜单位…」
  974. const long btnIdBase = baseId + 100;
  975. const string btnNamePrefix = "aidopS8Btn";
  976. var btns = new (long IdOff, long Pid, string Permission, string Title, int Order)[]
  977. {
  978. // 异常列表 / 任务详情
  979. (0, baseId + 2, "s8:exception:read", "查看异常", 10),
  980. (1, baseId + 3, "s8:exception:create", "主动提报", 20),
  981. (2, baseId + 10, "s8:exception:assign", "分派异常", 30),
  982. (3, baseId + 10, "s8:exception:claim", "认领异常", 40),
  983. (4, baseId + 10, "s8:exception:start", "开始处理", 50),
  984. (5, baseId + 10, "s8:exception:reject", "驳回异常", 60),
  985. (6, baseId + 10, "s8:exception:upgrade", "升级异常", 70),
  986. (7, baseId + 10, "s8:exception:close", "关闭异常", 80),
  987. (8, baseId + 10, "s8:verification:submit", "提交复检", 110),
  988. (9, baseId + 10, "s8:verification:approve", "检验通过", 120),
  989. (10, baseId + 10, "s8:verification:reject", "检验退回", 130),
  990. // 配置中心
  991. (11, baseId + 4, "s8:config:read", "查看配置", 210),
  992. (12, baseId + 13, "s8:config:operator:bind", "维护操作员绑定", 220),
  993. (13, baseId + 13, "s8:config:role:write", "维护角色权限", 230),
  994. // 看板
  995. (14, s8DashboardId, "s8:dashboard:read", "查看看板", 310),
  996. };
  997. foreach (var (off, pid, perm, title, order) in btns)
  998. {
  999. yield return new SysMenu
  1000. {
  1001. Id = btnIdBase + off,
  1002. Pid = pid,
  1003. Title = title,
  1004. Permission = perm,
  1005. Name = $"{btnNamePrefix}{off:00}",
  1006. Type = MenuTypeEnum.Btn,
  1007. CreateTime = ct,
  1008. OrderNo = order,
  1009. Remark = $"S8 权限点 {perm}"
  1010. };
  1011. }
  1012. }
  1013. private static IEnumerable<SysMenu> BuildS0WarehouseMenus(DateTime ct)
  1014. {
  1015. const long s0DataModelingMenuId = 1322000000001L;
  1016. const long subDirId = 1329005000000L;
  1017. yield return new SysMenu
  1018. {
  1019. Id = subDirId,
  1020. Pid = s0DataModelingMenuId,
  1021. Title = "仓储建模",
  1022. Path = "/aidop/s0/warehouse",
  1023. Name = "aidopS0Warehouse",
  1024. Component = "Layout",
  1025. Icon = "ele-OfficeBuilding",
  1026. Type = MenuTypeEnum.Dir,
  1027. CreateTime = ct,
  1028. OrderNo = 50,
  1029. Remark = "S0 仓储建模"
  1030. };
  1031. var leaves = new (long IdOff, string Path, string Name, string Title, string Component, int Order)[]
  1032. {
  1033. (1, "/aidop/s0/warehouse/department", "aidopS0WhDepartment", "部门维护", "/aidop/s0/warehouse/DepartmentList", 10),
  1034. (2, "/aidop/s0/warehouse/employee", "aidopS0WhEmployee", "雇员列表", "/aidop/s0/warehouse/EmployeeList", 20),
  1035. (3, "/aidop/s0/warehouse/cost-center", "aidopS0WhCostCenter", "成本中心", "/aidop/s0/warehouse/CostCenterList", 30),
  1036. (4, "/aidop/s0/warehouse/location", "aidopS0WhLocation", "库位维护", "/aidop/s0/warehouse/LocationList", 40),
  1037. (5, "/aidop/s0/warehouse/location-shelf", "aidopS0WhLocationShelf", "货架列表", "/aidop/s0/warehouse/LocationShelfList", 50),
  1038. (6, "/aidop/s0/warehouse/barcode-rule", "aidopS0WhBarcodeRule", "条码规则", "/aidop/s0/warehouse/BarcodeRuleList", 60),
  1039. (7, "/aidop/s0/warehouse/label-type", "aidopS0WhLabelType", "标签格式", "/aidop/s0/warehouse/LabelTypeList", 70),
  1040. (8, "/aidop/s0/warehouse/nbr-type", "aidopS0WhNbrType", "单号类型", "/aidop/s0/warehouse/NbrTypeList", 80),
  1041. (9, "/aidop/s0/warehouse/nbr-control", "aidopS0WhNbrControl", "单号规则维护", "/aidop/s0/warehouse/NbrControlList", 90),
  1042. (10, "/aidop/s0/warehouse/item-pack", "aidopS0WhItemPack", "零件包装规格", "/aidop/s0/warehouse/ItemPackList", 100),
  1043. (11, "/aidop/s0/warehouse/emp-work-duty", "aidopS0WhEmpWorkDuty", "物料职责维护", "/aidop/s0/warehouse/EmpWorkDutyList", 110),
  1044. (12, "/aidop/s0/warehouse/task-assignment", "aidopS0WhTaskAssignment", "物料状态任务指派", "/aidop/s0/warehouse/TaskAssignmentList", 120),
  1045. };
  1046. foreach (var (idOff, path, name, title, component, order) in leaves)
  1047. {
  1048. yield return new SysMenu
  1049. {
  1050. Id = subDirId + idOff,
  1051. Pid = subDirId,
  1052. Title = title,
  1053. Path = path,
  1054. Name = name,
  1055. Component = component,
  1056. Icon = "ele-Document",
  1057. Type = MenuTypeEnum.Menu,
  1058. CreateTime = ct,
  1059. OrderNo = order,
  1060. Remark = $"S0 {title}"
  1061. };
  1062. }
  1063. }
  1064. /// <summary>
  1065. /// S1「产销协同看板」目录(Id=1322000000005)下的子菜单:指标看板、需求明细核验、计划联动看板。
  1066. /// </summary>
  1067. private static IEnumerable<SysMenu> BuildS1SalesKanbanMenus(DateTime ct)
  1068. {
  1069. const long salesKanBanDirId = 1322000000005L;
  1070. yield return new SysMenu
  1071. {
  1072. Id = 1322000000201L,
  1073. Pid = salesKanBanDirId,
  1074. Title = "产销协同指标看板",
  1075. Path = "/aidop/s1/SalesKanBan/kanban",
  1076. Name = "aidopS1SalesKanBanKanban",
  1077. Component = "/aidop/kanban/s1",
  1078. Icon = "ele-DataAnalysis",
  1079. Type = MenuTypeEnum.Menu,
  1080. CreateTime = ct,
  1081. OrderNo = 10,
  1082. Remark = "S1 产销协同看板(指标)"
  1083. };
  1084. yield return new SysMenu
  1085. {
  1086. Id = 1322000000202L,
  1087. Pid = salesKanBanDirId,
  1088. Title = "需求明细核验",
  1089. Path = "/aidop/s1/SalesKanBan/requirement-examine-detail",
  1090. Name = "aidopS1RequirementExamineDetail",
  1091. Component = "/aidop/s1/sales-kanban/RequirementExamineDetailList",
  1092. Icon = "ele-List",
  1093. Type = MenuTypeEnum.Menu,
  1094. CreateTime = ct,
  1095. OrderNo = 20,
  1096. Remark = "S1 需求明细核验"
  1097. };
  1098. yield return new SysMenu
  1099. {
  1100. Id = 1322000000107L,
  1101. Pid = salesKanBanDirId,
  1102. Title = "计划联动看板",
  1103. Path = "/aidop/s1/SalesKanBan/linkage-plan",
  1104. Name = "aidopS1LinkagePlan",
  1105. Component = "/aidop/business/linkagePlanList",
  1106. Icon = "ele-DataBoard",
  1107. Type = MenuTypeEnum.Menu,
  1108. CreateTime = ct,
  1109. OrderNo = 30,
  1110. Remark = "S1 计划联动看板(LinkagePlan)"
  1111. };
  1112. }
  1113. /// <summary>
  1114. /// S1「订单管理」「工单管理」目录化后的子菜单:销售订单、合同评审、产品设计、工单下达等。
  1115. /// 父级 Id:订单管理=1322000000003,工单管理=1322000000004(menuSeq 与 ModuleDefinitions 中 S1 叶子顺序一致)。
  1116. /// 产销协同看板=1322000000005,路径 /aidop/s1/SalesKanBan(勿与工单管理目录混淆)。
  1117. /// 订单管理下扩展子菜单 Id:1322000000101~0105;计划联动看板 Id=1322000000107 挂在产销协同看板目录下。
  1118. /// </summary>
  1119. private static IEnumerable<SysMenu> BuildS1OrderWorkOrderMenus(DateTime ct)
  1120. {
  1121. const long orderMgmtDirId = 1322000000003L;
  1122. const long workOrderMgmtDirId = 1322000000004L;
  1123. yield return new SysMenu
  1124. {
  1125. Id = 1322000000101L,
  1126. Pid = orderMgmtDirId,
  1127. Title = "合同评审",
  1128. Path = "/aidop/s1/order-mgmt/contract-review",
  1129. Name = "aidopS1ContractReview",
  1130. Component = "/aidop/business/contractReviewList",
  1131. Icon = "ele-Edit",
  1132. Type = MenuTypeEnum.Menu,
  1133. CreateTime = ct,
  1134. OrderNo = 10,
  1135. Remark = "S1 合同评审"
  1136. };
  1137. yield return new SysMenu
  1138. {
  1139. Id = 1322000000102L,
  1140. Pid = orderMgmtDirId,
  1141. Title = "产品设计",
  1142. Path = "/aidop/s1/order-mgmt/product-design",
  1143. Name = "aidopS1ProductDesign",
  1144. Component = "/aidop/business/productDesignList",
  1145. Icon = "ele-Edit",
  1146. Type = MenuTypeEnum.Menu,
  1147. CreateTime = ct,
  1148. OrderNo = 20,
  1149. Remark = "S1 产品设计"
  1150. };
  1151. yield return new SysMenu
  1152. {
  1153. Id = 1322000000103L,
  1154. Pid = orderMgmtDirId,
  1155. Title = "订单评审",
  1156. Path = "/aidop/s1/order-mgmt/order",
  1157. Name = "aidopS1SalesOrder",
  1158. Component = "/aidop/business/orderList",
  1159. Icon = "ele-Document",
  1160. Type = MenuTypeEnum.Menu,
  1161. CreateTime = ct,
  1162. OrderNo = 30,
  1163. Remark = "S1 销售订单(原订单管理入口)"
  1164. };
  1165. yield return new SysMenu
  1166. {
  1167. Id = 1322000000104L,
  1168. Pid = orderMgmtDirId,
  1169. Title = "订单交付",
  1170. Path = "/aidop/s1/order-mgmt/orderDelivery",
  1171. Name = "aidopS1OrderDelivery",
  1172. Component = "/aidop/business/orderDeliveryList",
  1173. Icon = "ele-Document",
  1174. Type = MenuTypeEnum.Menu,
  1175. CreateTime = ct,
  1176. OrderNo = 40,
  1177. Remark = "S1 订单交付"
  1178. };
  1179. yield return new SysMenu
  1180. {
  1181. Id = 1322000000105L,
  1182. Pid = orderMgmtDirId,
  1183. Title = "订单发货",
  1184. Path = "/aidop/s1/order-mgmt/asnShipper",
  1185. Name = "aidopS1AsnShipper",
  1186. Component = "/aidop/business/asnShipperList",
  1187. Icon = "ele-Document",
  1188. Type = MenuTypeEnum.Menu,
  1189. CreateTime = ct,
  1190. OrderNo = 50,
  1191. Remark = "S1 订单发货"
  1192. };
  1193. yield return new SysMenu
  1194. {
  1195. Id = 1322000000106L,
  1196. Pid = workOrderMgmtDirId,
  1197. Title = "工单下达",
  1198. Path = "/aidop/s1/workorder-mgmt/dispatch",
  1199. Name = "aidopS1WorkOrderDispatch",
  1200. Component = "/aidop/business/workOrderDispatchList",
  1201. Icon = "ele-Position",
  1202. Type = MenuTypeEnum.Menu,
  1203. CreateTime = ct,
  1204. OrderNo = 10,
  1205. Remark = "S1 工单池下达"
  1206. };
  1207. }
  1208. /// <summary>
  1209. /// S2「制造协同」三级结构:生产排程 / 作业计划 / 制造协同看板 为目录(与 ModuleDefinitions 中 S2 三项 Id 一致:0006~0008)。
  1210. /// 「工单工序排程」Id=1322000000108 自 S1 迁入「生产排程」下;其余子页占位。
  1211. /// </summary>
  1212. private static IEnumerable<SysMenu> BuildS2ManufacturingCollaborationMenus(DateTime ct)
  1213. {
  1214. const long s2ProductionSchedulingDirId = 1322000000006L;
  1215. const long s2OperationPlanDirId = 1322000000007L;
  1216. const long s2CollaborationKanbanDirId = 1322000000008L;
  1217. // ── 生产排程 ──
  1218. yield return new SysMenu
  1219. {
  1220. Id = 1322000000108L,
  1221. Pid = s2ProductionSchedulingDirId,
  1222. Title = "工单工序排程",
  1223. Path = "/aidop/s2/production-scheduling/work-order-scheduling",
  1224. Name = "aidopS2WorkOrderScheduling",
  1225. Component = "/aidop/production/workOrderSchedulingList",
  1226. Icon = "ele-Operation",
  1227. Type = MenuTypeEnum.Menu,
  1228. CreateTime = ct,
  1229. OrderNo = 10,
  1230. Remark = "S2 工单工序排程"
  1231. };
  1232. yield return new SysMenu
  1233. {
  1234. Id = 1329002100001L,
  1235. Pid = s2ProductionSchedulingDirId,
  1236. Title = "排产异常记录",
  1237. Path = "/aidop/s2/production-scheduling/scheduling-exception",
  1238. Name = "aidopS2SchedulingException",
  1239. Component = "/aidop/production/scheduleExceptionList",
  1240. Icon = "ele-Warning",
  1241. Type = MenuTypeEnum.Menu,
  1242. CreateTime = ct,
  1243. OrderNo = 20,
  1244. Remark = "S2 排产异常记录"
  1245. };
  1246. // ── 作业计划 ──
  1247. yield return new SysMenu
  1248. {
  1249. Id = 1329002100011L,
  1250. Pid = s2OperationPlanDirId,
  1251. Title = "可执行日计划",
  1252. Path = "/aidop/s2/operation-plan/executable-daily-plan",
  1253. Name = "aidopS2ExecutableDailyPlan",
  1254. Component = "/aidop/production/executableDailyPlanList",
  1255. Icon = "ele-Calendar",
  1256. Type = MenuTypeEnum.Menu,
  1257. CreateTime = ct,
  1258. OrderNo = 10,
  1259. Remark = "S2 可执行生产日计划"
  1260. };
  1261. yield return new SysMenu
  1262. {
  1263. Id = 1329002100012L,
  1264. Pid = s2OperationPlanDirId,
  1265. Title = "产线工作日历管理",
  1266. Path = "/aidop/s2/operation-plan/line-work-calendar",
  1267. Name = "aidopS2LineWorkCalendar",
  1268. Component = "/aidop/production/shopCalendarWorkCtrList",
  1269. Icon = "ele-Notebook",
  1270. Type = MenuTypeEnum.Menu,
  1271. CreateTime = ct,
  1272. OrderNo = 20,
  1273. Remark = "S2 产线工作日历"
  1274. };
  1275. yield return new SysMenu
  1276. {
  1277. Id = 1329002100013L,
  1278. Pid = s2OperationPlanDirId,
  1279. Title = "产线休息时间管理",
  1280. Path = "/aidop/s2/operation-plan/line-rest-time",
  1281. Name = "aidopS2LineRestTime",
  1282. Component = "/aidop/production/qualityLineRestDetailList",
  1283. Icon = "ele-CoffeeCup",
  1284. Type = MenuTypeEnum.Menu,
  1285. CreateTime = ct,
  1286. OrderNo = 30,
  1287. Remark = "S2 产线休息时间"
  1288. };
  1289. yield return new SysMenu
  1290. {
  1291. Id = 1329002100014L,
  1292. Pid = s2OperationPlanDirId,
  1293. Title = "产线节假日管理",
  1294. Path = "/aidop/s2/operation-plan/line-holiday",
  1295. Name = "aidopS2LineHoliday",
  1296. Component = "/aidop/production/holidayMasterList",
  1297. Icon = "ele-Flag",
  1298. Type = MenuTypeEnum.Menu,
  1299. CreateTime = ct,
  1300. OrderNo = 40,
  1301. Remark = "S2 产线节假日"
  1302. };
  1303. yield return new SysMenu
  1304. {
  1305. Id = 1329002100015L,
  1306. Pid = s2OperationPlanDirId,
  1307. Title = "产线加班管理",
  1308. Path = "/aidop/s2/operation-plan/line-overtime",
  1309. Name = "aidopS2LineOvertime",
  1310. Component = "/aidop/production/lineOvertimeList",
  1311. Icon = "ele-Timer",
  1312. Type = MenuTypeEnum.Menu,
  1313. CreateTime = ct,
  1314. OrderNo = 50,
  1315. Remark = "S2 产线加班"
  1316. };
  1317. // ── 制造协同看板 ──
  1318. yield return new SysMenu
  1319. {
  1320. Id = 1329002100021L,
  1321. Pid = s2CollaborationKanbanDirId,
  1322. Title = "工单执行进度看板",
  1323. Path = "/aidop/s2/collaboration-kanban/work-order-progress",
  1324. Name = "aidopS2WorkOrderProgressKanban",
  1325. Component = "/aidop/production/workOrderProgressDashboardList",
  1326. Icon = "ele-DataBoard",
  1327. Type = MenuTypeEnum.Menu,
  1328. CreateTime = ct,
  1329. OrderNo = 10,
  1330. Remark = "S2 工单执行进度看板(列表)"
  1331. };
  1332. }
  1333. /// <summary>
  1334. /// S3「物料计划」三级结构:将自动生成的 S3 首项(Id=1322000000009)目录化,挂载「物料需求计划」。
  1335. /// </summary>
  1336. private static IEnumerable<SysMenu> BuildS3SupplyMenus(DateTime ct)
  1337. {
  1338. const long s3MaterialPlanDirId = 1322000000009L;
  1339. const long s3ProcurementDirId = 1322000000010L;
  1340. const long s3RootDirId = 1321000004000L;
  1341. yield return new SysMenu
  1342. {
  1343. Id = 1329003100001L,
  1344. Pid = s3MaterialPlanDirId,
  1345. Title = "物料需求计划",
  1346. Path = "/aidop/s3/material-plan/demand-schedule",
  1347. Name = "aidopS3DemandSchedule",
  1348. Component = "/aidop/s3/supply/demandScheduleList",
  1349. Icon = "ele-Calendar",
  1350. Type = MenuTypeEnum.Menu,
  1351. CreateTime = ct,
  1352. OrderNo = 10,
  1353. Remark = "S3 物料需求计划(ic_demandschedule)"
  1354. };
  1355. yield return new SysMenu
  1356. {
  1357. Id = 1329003100002L,
  1358. Pid = s3MaterialPlanDirId,
  1359. Title = "物料交货计划",
  1360. Path = "/aidop/s3/material-plan/delivery-schedule",
  1361. Name = "aidopS3DeliverySchedule",
  1362. Component = "/aidop/s3/supply/deliveryScheduleList",
  1363. Icon = "ele-Document",
  1364. Type = MenuTypeEnum.Menu,
  1365. CreateTime = ct,
  1366. OrderNo = 20,
  1367. Remark = "S3 物料交货计划(srm_polist_ds)"
  1368. };
  1369. yield return new SysMenu
  1370. {
  1371. Id = 1329003100003L,
  1372. Pid = s3MaterialPlanDirId,
  1373. Title = "交货单异常记录",
  1374. Path = "/aidop/s3/material-plan/delivery-exception",
  1375. Name = "aidopS3DeliveryException",
  1376. Component = "/aidop/s3/supply/deliveryExceptionList",
  1377. Icon = "ele-Warning",
  1378. Type = MenuTypeEnum.Menu,
  1379. CreateTime = ct,
  1380. OrderNo = 30,
  1381. Remark = "S3 交货单异常记录(DeliveryExceptionMaster)"
  1382. };
  1383. yield return new SysMenu
  1384. {
  1385. Id = 1329003100011L,
  1386. Pid = s3ProcurementDirId,
  1387. Title = "物料采购申请",
  1388. Path = "/aidop/s3/procurement/purchase-request",
  1389. Name = "aidopS3PurchaseRequest",
  1390. Component = "/aidop/s3/supply/purchaseRequestList",
  1391. Icon = "ele-Document",
  1392. Type = MenuTypeEnum.Menu,
  1393. CreateTime = ct,
  1394. OrderNo = 10,
  1395. Remark = "S3 物料采购申请(srm_pr_main)"
  1396. };
  1397. yield return new SysMenu
  1398. {
  1399. Id = 1329003100012L,
  1400. Pid = s3ProcurementDirId,
  1401. Title = "物料采购订单",
  1402. Path = "/aidop/s3/procurement/purchase-order",
  1403. Name = "aidopS3PurchaseOrder",
  1404. Component = "/aidop/s3/supply/purchaseOrderList",
  1405. Icon = "ele-Tickets",
  1406. Type = MenuTypeEnum.Menu,
  1407. CreateTime = ct,
  1408. OrderNo = 20,
  1409. Remark = "S3 物料采购订单(vscm_jhjh)"
  1410. };
  1411. yield return new SysMenu
  1412. {
  1413. Id = 1329003100013L,
  1414. Pid = s3ProcurementDirId,
  1415. Title = "委外加工订单",
  1416. Path = "/aidop/s3/procurement/outsource-order",
  1417. Name = "aidopS3OutsourceOrder",
  1418. Component = "/aidop/s3/supply/outsourceOrderList",
  1419. Icon = "ele-List",
  1420. Type = MenuTypeEnum.Menu,
  1421. CreateTime = ct,
  1422. OrderNo = 30,
  1423. Remark = "S3 委外加工订单(PurOrdMaster/PW)"
  1424. };
  1425. yield return new SysMenu
  1426. {
  1427. Id = 1329003100014L,
  1428. Pid = s3ProcurementDirId,
  1429. Title = "工序外协订单",
  1430. Path = "/aidop/s3/procurement/process-outsource-order",
  1431. Name = "aidopS3ProcessOutsourceOrder",
  1432. Component = "/aidop/s3/supply/processOutsourceOrderList",
  1433. Icon = "ele-List",
  1434. Type = MenuTypeEnum.Menu,
  1435. CreateTime = ct,
  1436. OrderNo = 40,
  1437. Remark = "S3 工序外协订单(PurOrdMaster/PW)"
  1438. };
  1439. yield return new SysMenu
  1440. {
  1441. Id = 1329003100010L,
  1442. Pid = s3RootDirId,
  1443. Title = "供应协同看板",
  1444. Path = "/aidop/s3/supply-kanban",
  1445. Name = "aidopS3SupplyKanbanDir",
  1446. Component = "Layout",
  1447. Icon = "ele-Folder",
  1448. Type = MenuTypeEnum.Dir,
  1449. CreateTime = ct,
  1450. OrderNo = 102,
  1451. Redirect = "/aidop/s3/supply-kanban/dashboard",
  1452. Remark = "S3 供应协同看板目录"
  1453. };
  1454. yield return new SysMenu
  1455. {
  1456. Id = 1329003100015L,
  1457. Pid = 1329003100010L,
  1458. Title = "供应协同看板",
  1459. Path = "/aidop/s3/supply-kanban/dashboard",
  1460. Name = "aidopS3SupplyKanban",
  1461. Component = "/aidop/kanban/s3",
  1462. Icon = "ele-DataBoard",
  1463. Type = MenuTypeEnum.Menu,
  1464. CreateTime = ct,
  1465. OrderNo = 10,
  1466. Remark = "S3 供应协同看板"
  1467. };
  1468. yield return new SysMenu
  1469. {
  1470. Id = 1329003100016L,
  1471. Pid = 1329003100010L,
  1472. Title = "工单物料齐套上线看板",
  1473. Path = "/aidop/s3/supply-kanban/work-order-material-readiness",
  1474. Name = "aidopS3WorkOrderMaterialReadiness",
  1475. Component = "/aidop/s3/supply/workOrderMaterialReadinessKanban",
  1476. Icon = "ele-List",
  1477. Type = MenuTypeEnum.Menu,
  1478. CreateTime = ct,
  1479. OrderNo = 20,
  1480. Remark = "S3 工单物料齐套上线看板"
  1481. };
  1482. yield return new SysMenu
  1483. {
  1484. Id = 1329003100017L,
  1485. Pid = 1329003100010L,
  1486. Title = "MDP运行监控",
  1487. Path = "/aidop/s3/supply-kanban/mdp-monitor",
  1488. Name = "aidopS3MdpMonitor",
  1489. Component = "/aidop/s3/supply/mdpMonitorList",
  1490. Icon = "ele-Monitor",
  1491. Type = MenuTypeEnum.Menu,
  1492. CreateTime = ct,
  1493. OrderNo = 30,
  1494. Remark = "S3 MDP 同步与转换运行监控"
  1495. };
  1496. }
  1497. private static readonly (string Code, string L1, (string Title, string Desc, string Complexity, string Days, string Note)[] Leaves)[] ModuleDefinitions =
  1498. {
  1499. ("S0", "S0 运营建模", new[]
  1500. {
  1501. ("数据建模", "支持数据库表结构设计与建模", "高", "5", "核心基础功能"),
  1502. ("业务建模", "支持业务流程建模与配置", "高", "5", "核心基础功能"),
  1503. }),
  1504. ("S1", "S1 产销协同", new[]
  1505. {
  1506. ("订单管理", "销售订单录入、查询、编辑、删除", "中", "3", ""),
  1507. ("工单管理", "工单创建、分配、跟踪", "中", "3", ""),
  1508. ("产销协同看板", "订单与生产协同数据可视化", "高", "5", "数据看板类"),
  1509. }),
  1510. ("S2", "S2 制造协同", new[]
  1511. {
  1512. ("生产排程", "生产任务排程与调度", "高", "5", ""),
  1513. ("作业计划", "车间作业计划管理", "中", "3", ""),
  1514. ("制造协同看板", "制造过程协同数据展示", "高", "5", "数据看板类"),
  1515. }),
  1516. ("S3", "S3 供应协同", new[]
  1517. {
  1518. ("物料计划", "物料需求计划(MRP)计算", "高", "7", "核心算法"),
  1519. ("供应协同看板", "供应商协同数据可视化", "中", "4", "数据看板类"),
  1520. }),
  1521. ("S4", "S4 采购执行", new[]
  1522. {
  1523. ("采购管理", "采购申请、订单、合同管理", "中", "4", ""),
  1524. ("交货管理", "供应商交货跟踪与验收", "中", "3", ""),
  1525. ("退货管理", "采购退货流程处理", "低", "2", ""),
  1526. ("采购执行看板", "采购执行数据可视化", "中", "4", "数据看板类"),
  1527. }),
  1528. ("S5", "S5 物料仓储", new[]
  1529. {
  1530. ("来料检验", "IQC来料质量检验", "中", "3", ""),
  1531. ("仓储管理", "仓库入库、出库、调拨", "中", "4", ""),
  1532. ("库存数据", "库存查询、盘点、调整", "中", "3", ""),
  1533. ("物料仓储看板", "仓储数据可视化分析", "中", "4", "数据看板类"),
  1534. }),
  1535. ("S6", "S6 生产执行", new[]
  1536. {
  1537. ("生产记录管理", "生产过程数据记录", "中", "3", ""),
  1538. ("过程质量管理", "IPQC过程质量检验", "中", "4", ""),
  1539. ("设备工装管理", "设备台账、保养、维修", "中", "4", ""),
  1540. ("生产执行看板", "生产执行数据可视化", "高", "5", "数据看板类"),
  1541. }),
  1542. ("S7", "S7 成品仓储", new[]
  1543. {
  1544. ("成品质量管理", "OQC成品质量检验", "中", "3", ""),
  1545. ("生产入库管理", "成品入库流程", "低", "2", ""),
  1546. ("成品出库管理", "成品出库发货流程", "低", "2", ""),
  1547. ("成品库存管理", "成品库存查询与管理", "中", "3", ""),
  1548. }),
  1549. ("S8", "S8 异常监控", new[]
  1550. {
  1551. ("异常监控看板", "生产异常监控、处理、跟踪", "中", "4", ""),
  1552. }),
  1553. ("S9", "S9 运营指标", new[]
  1554. {
  1555. ("ERP同步", "与外部ERP系统数据同步", "高", "7", "接口集成"),
  1556. ("日志查询", "系统操作日志查询", "低", "2", ""),
  1557. ("ERP事务", "ERP相关事务处理", "中", "3", ""),
  1558. }),
  1559. ("M11", "系统管理", new[]
  1560. {
  1561. ("组织架构", "部门、岗位、人员管理", "中", "3", "与框架系统管理对应,后续可映射具体页"),
  1562. ("菜单管理", "系统菜单权限配置", "中", "3", ""),
  1563. }),
  1564. ("M12", "流程平台", new[]
  1565. {
  1566. ("流程管理", "工作流流程定义与配置", "高", "7", "核心引擎"),
  1567. ("表单管理", "流程表单设计与配置", "高", "5", ""),
  1568. ("应用设计", "业务应用快速设计", "高", "5", ""),
  1569. ("数据资源配置", "数据资源连接配置", "中", "4", ""),
  1570. ("格式化JSON", "JSON数据格式化工具", "低", "1", "工具类"),
  1571. ("模板管理", "流程模板管理", "中", "3", ""),
  1572. ("系统按钮", "系统按钮权限配置", "低", "2", ""),
  1573. ("流程按钮", "流程操作按钮配置", "低", "2", ""),
  1574. ("应用程序", "外部应用集成管理", "中", "4", ""),
  1575. ("接口系统", "API接口配置管理", "高", "5", ""),
  1576. }),
  1577. ("M13", "系统工具", new[]
  1578. {
  1579. ("数据字典", "系统字典数据管理", "低", "2", ""),
  1580. ("数据连接", "数据库连接配置", "中", "3", ""),
  1581. ("首页设置", "系统首页个性化配置", "低", "2", ""),
  1582. ("日志查询", "系统运行日志查询", "低", "2", ""),
  1583. ("流水号管理", "业务流水号规则配置", "低", "2", ""),
  1584. ("工作日设置", "工作日历配置", "低", "1", ""),
  1585. ("图标库", "系统图标资源管理", "低", "1", ""),
  1586. ("在线用户", "在线用户监控", "低", "2", ""),
  1587. ("周库存统计", "库存周期统计报表", "中", "3", "报表类"),
  1588. ("数据导入", "批量数据导入工具", "中", "3", ""),
  1589. }),
  1590. ("M14", "流程中心", new[]
  1591. {
  1592. ("发起流程", "新建并发起工作流程", "中", "3", ""),
  1593. ("待办事项", "个人待办任务处理", "中", "3", ""),
  1594. ("待办批量处理", "待办任务批量操作", "中", "3", ""),
  1595. ("已办事项", "已办任务查询", "低", "2", ""),
  1596. ("我的流程", "我发起的流程跟踪", "中", "3", ""),
  1597. ("已委托事项", "委托他人处理的事项", "低", "2", ""),
  1598. ("流程委托", "流程任务委托配置", "低", "2", ""),
  1599. ("流程意见", "流程审批意见管理", "低", "2", ""),
  1600. }),
  1601. ("M15", "个人设置", new[]
  1602. {
  1603. ("个人信息", "个人资料维护", "低", "1", ""),
  1604. ("头像设置", "个人头像上传", "低", "1", ""),
  1605. ("修改密码", "密码修改功能", "低", "1", ""),
  1606. ("签章管理", "个人电子签章管理", "中", "3", ""),
  1607. ("文件管理", "个人文件存储管理", "中", "3", ""),
  1608. ("快捷菜单", "个人快捷方式配置", "低", "1", ""),
  1609. }),
  1610. ("M16", "系统首页", new[]
  1611. {
  1612. ("系统首页", "系统门户首页", "中", "3", "门户类"),
  1613. ("发起流程(快捷)", "首页快捷发起流程", "低", "1", ""),
  1614. ("我的流程(快捷)", "首页流程快捷入口", "低", "1", ""),
  1615. ("待办事项(快捷)", "首页待办快捷入口", "低", "1", ""),
  1616. }),
  1617. };
  1618. }