SysMenuSeedData.cs 54 KB

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