yangys
2024-10-30 25db770e621f1259b8d5b7fd514207f7481c2d0f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.qianwen.smartman.common.enums;
 
import java.util.Arrays;
import com.qianwen.smartman.modules.dnc.entity.TransferDirectoryFile;
import com.qianwen.smartman.modules.dnc.entity.TransferDirectoryGroup;
 
public enum LongTableNameEnum {
    DEVICE_TYPE_CHECK_PROJECT("blade_device_type_check_project", "device_type_check_project"),
    DNC_ARCHIVE_DIRECTORY_FILE("blade_dnc_archive_directory_file", "dnc_archive_directory_file"),
    TRANSFER_DIRECTORY_FILE(TransferDirectoryFile.TABLE_NAME, "dnc_transfer_dir_file"),
    TRANSFER_DIRECTORY_GROUP(TransferDirectoryGroup.TABLE_NAME, "dnc_transfer_dir_group"),
    PRODUCTION_CALENDAR_DAYTIME("blade_production_calendar_daytime", "prod_calendar_daytime"),
    PRODUCTION_CAPACITY_GROUP("blade_production_capacity_group", "prod_capacity_group"),
    PRODUCTION_CRAFT_PROCESS("blade_production_craft_process", "prod_craft_process"),
    PRODUCTION_CRAFT_PROCESS_FILE("blade_production_craft_process_file", "prod_craft_process_file"),
    PRODUCTION_CRAFT_PROCESS_RELATED_FIXTURE("blade_production_craft_process_related_fixture", "prod_craft_process_ref_fixture"),
    PRODUCTION_CRAFT_PROCESS_RELATED_TOOL("blade_production_craft_process_related_tool", "prod_craft_process_ref_tool"),
    PRODUCTION_CRAFT_VERSION("blade_production_craft_version", "prod_craft_version"),
    TRACE_RELATED_WORKSTATION("blade_trace_related_workstation", "trace_ref_workstation"),
    WAREHOUSE_AREA_OF("blade_warehouse_area_of_material_type", "wh_area_of_material_type"),
    WORKSTATION_OF_WORKSTATION("blade_workstation_of_workstation_group", "ws_of_workstation_group"),
    FMS_ORDER_PROCESS_FIXTURE("blade_fms_order_process_fixture", "fms_order_process_fixture"),
    DEFAULT("", "");
    
    private final String longTableName;
    private final String shortTableName;
 
    LongTableNameEnum(final String longTableName, final String shortTableName) {
        this.longTableName = longTableName;
        this.shortTableName = shortTableName;
    }
 
    public String getLongTableName() {
        return this.longTableName;
    }
 
    public String getShortTableName() {
        return this.shortTableName;
    }
 
    public static LongTableNameEnum getByRealTableName(String longTableName) {
        return (LongTableNameEnum) Arrays.stream(values()).filter(t -> {
            return t.longTableName.equalsIgnoreCase(longTableName);
        }).findFirst().orElse(DEFAULT);
    }
}