Commit 29aca383 sunke

20031菜单

1 个父辈 b6e276b1
......@@ -75,7 +75,7 @@ public class MenuInit {
* @param clientLabel 菜单标识
* @param menus 菜单列表
*/
public static void addMenu(String clientLabel, Menu... menus){
private static void addMenu(String clientLabel, Menu... menus){
for (Menu menu : menus) {
Menu existMenu = allMenuMap.get(menu.getPath());
if(existMenu != null){
......@@ -86,6 +86,21 @@ public class MenuInit {
}
}
/**
* 添加自定义菜单
* @param menuLabel
* @param menuSort
* @param parentMenu
* @param title
* @param path
* @param component
* @param icon
*/
public static void addMenu(String menuLabel, Menu parentMenu, int menuSort, String title, String path, String component, String icon){
Menu menu = Menu.createFunctionMenu(parentMenu, title, menuSort, path, component,icon);
MenuInit.addMenu(menuLabel,menu);
}
private Map<String, Menu> getAllMenuMap(){
//AGV看板
//addDefaultFunctionMenu(1,null,"AGV看板","agvkanban", "agv/agvkanban/index","agv");
......@@ -93,9 +108,6 @@ public class MenuInit {
//设备看板
addDefaultFunctionMenu(1,null,"设备看板","lockMaterial", "lockMaterial/material/index","kanban",DEFAULT_SHOW_MENU);
//20031锡膏料仓菜单
addDefaultFunctionMenu(1,null,"设备概览","spKanban", "neolight/spKanban/index","sKanban");
//物料管理:工单出库,查找出库(UID出库,PN出库),物料标签,料盒操作,出库策略,工单设置
Menu poutOut = Menu.CreatePMenu("物料管理", 1, "order", "workOrder", null);
......
package com.neotel.smfcore.custom.micron20031;
import com.neotel.smfcore.common.init.MenuInit;
import com.neotel.smfcore.core.api.SmfApi;
import com.neotel.smfcore.security.service.po.Menu;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
/**
* @author sunke
* @date 2022/12/14 4:01 PM
*/
@Component
public class Micron20031Menu {
@Autowired
MenuInit menuInit;
@Autowired
SmfApi smfApi;
@PostConstruct
public void init(){
String menuLabel = "20031";
//20031锡膏料仓菜单
MenuInit.addMenu(menuLabel,null, 1, "设备概览", "spKanban", "neolight/spKanban/index","sKanban");
MenuInit.addMenu(menuLabel,null, 2, "Inventory Report", "inventoryReport", "system/inventoryReport/index","inventoryReport");
MenuInit.addMenu(menuLabel,null, 3, "Movement Report", "movementReport", "system/movementReport/index","movementReport");
MenuInit.addMenu(menuLabel,null, 4, "Performance Report", "performanceReport", "system/performanceReport/index","performanceReport");
MenuInit.addMenu(menuLabel,null, 5, "Abnormality Report", "abnormReport", "system/abnormReport/index","abnormReport");
MenuInit.addMenu(menuLabel,null, 6, "Order", "order", "system/order/index","order");
MenuInit.addMenu(menuLabel,null, 7, "Deposit", "deposit", "system/deposit/index","deposit");
MenuInit.addMenu(menuLabel,null, 8, "Stabilization", "stabilization", "system/stabilization/index","stabilization");
MenuInit.addMenu(menuLabel,null, 9, "Withdraw", "withdraw", "system/withdraw/index","withdraw");
MenuInit.addMenu(menuLabel,null, 10, "Return", "returnPage", "system/returnPage/index","returnPage");
MenuInit.addMenu(menuLabel,null, 11, "Removal", "removal", "system/removal/index","removal");
String apiName = smfApi.getApiName();
if(Strings.isNotBlank(apiName) && apiName.equals(menuLabel)){
menuInit.showMenu(apiName);
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!