SysMenuSeedData.cs 74 KB

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