SysMenuSeedData.cs 66 KB

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