SysMenuSeedData.cs 96 KB

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