SysMenuSeedData.cs 106 KB

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