SysMenuSeedData.cs 106 KB

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