SysMenuSeedData.cs 98 KB

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