SysMenuSeedData.cs 75 KB

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