RevenueConfEnum.java 5.93 KB
Newer Older
frank.xa.zhang's avatar
frank.xa.zhang committed
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
package pwc.taxtech.atms.constant.enums;

import java.util.HashMap;
import java.util.Map;

public class RevenueConfEnum {

    /**
     * 账载收入类型
     */
    public enum AccountType {
        Zero(0, "0值"),
        Account(1, "科目"),
        Manual(2, "手工录入");
        private Integer code;
        private String name;
        public static final Map<Integer, String> MAPPING = new HashMap<>();
        public static final Map<String, Integer> REVERSAL_MAPPING = new HashMap<>();
        AccountType(Integer code, String name) {
            this.code = code;
            this.name = name;
        }

        public Integer getCode() {
            return code;
        }

        public String getName() {
            return name;
        }

        static {
            for (RevenueConfEnum.AccountType accountType : RevenueConfEnum.AccountType.values()) {
                MAPPING.put(accountType.getCode(), accountType.getName());
                REVERSAL_MAPPING.put(accountType.getName(),accountType.getCode());
            }
        }
    }

    /**
     * 账载收入类型
     */
    public enum TaxBase {
        Account(1, "账载收入"),
        Invoice(2, "开票收入"),
        Manual(3, "手工录入"),
        Period_Dr(4, "借方发生额"),
        Period_Cr(5, "贷方发生额");
        private Integer code;
        private String name;
        public static final Map<Integer, String> MAPPING = new HashMap<>();
        public static final Map<String, Integer> REVERSAL_MAPPING = new HashMap<>();
        TaxBase(Integer code, String name) {
            this.code = code;
            this.name = name;
        }

        public Integer getCode() {
            return code;
        }

        public String getName() {
            return name;
        }

        static {
            for (RevenueConfEnum.TaxBase taxBase : RevenueConfEnum.TaxBase.values()) {
                MAPPING.put(taxBase.getCode(), taxBase.getName());
                REVERSAL_MAPPING.put(taxBase.getName(),taxBase.getCode());
            }
        }
    }

    /**
     * 计税方法
     */
    public enum TaxType {
        Common(0, "一般计税"),
        Simple(1, "简易计税"),
        Tax_Exemption(2, "免抵退税"),
        Free(3, "免税");
        private Integer code;
        private String name;
        public static final Map<Integer, String> MAPPING = new HashMap<>();
        public static final Map<String, Integer> REVERSAL_MAPPING = new HashMap<>();
        TaxType(Integer code, String name) {
            this.code = code;
            this.name = name;
        }

        public Integer getCode() {
            return code;
        }

        public String getName() {
            return name;
        }

        static {
            for (RevenueConfEnum.TaxType taxType : RevenueConfEnum.TaxType.values()) {
                MAPPING.put(taxType.getCode(), taxType.getName());
                REVERSAL_MAPPING.put(taxType.getName(),taxType.getCode());
            }
        }
    }

    /**
     * 收入类型
     */
    public enum RevenueType {
        Service(0, "货物及加工修理修配劳务"),
        Assets(1, "服务、不动产和无形资产");
        private Integer code;
        private String name;
        public static final Map<Integer, String> MAPPING = new HashMap<>();
        public static final Map<String, Integer> REVERSAL_MAPPING = new HashMap<>();
        RevenueType(Integer code, String name) {
            this.code = code;
            this.name = name;
        }

        public Integer getCode() {
            return code;
        }

        public String getName() {
            return name;
        }

        static {
            for (RevenueConfEnum.RevenueType revenueType : RevenueConfEnum.RevenueType.values()) {
                MAPPING.put(revenueType.getCode(), revenueType.getName());
                REVERSAL_MAPPING.put(revenueType.getName(),revenueType.getCode());
            }
        }
    }

    /**
     * 状态
     */
    public enum Status {
        Enable(0, "启用"),
        Disable(1, "停用");
        private Integer code;
        private String name;
        public static final Map<Integer, String> MAPPING = new HashMap<>();
        public static final Map<String, Integer> REVERSAL_MAPPING = new HashMap<>();
        Status(Integer code, String name) {
            this.code = code;
            this.name = name;
        }

        public Integer getCode() {
            return code;
        }

        public String getName() {
            return name;
        }

        static {
            for (RevenueConfEnum.Status status : RevenueConfEnum.Status.values()) {
                MAPPING.put(status.getCode(), status.getName());
                REVERSAL_MAPPING.put(status.getName(),status.getCode());
            }
        }
    }

    public enum EXECLColumn {
        Column_1(0, "收入类型名称"),
        Column_2(1, "适用公司"),
        Column_3(2, "账载收入"),
        Column_4(3, "科目代码"),
        Column_5(4, "利润中心代码"),
        Column_6(5, "产品代码"),
        Column_7(6, "税率"),
        Column_8(7, "计税收入"),
        Column_9(8, "计税收入科目代码"),
        Column_10(9, "收入类型"),
        Column_11(10, "计税方法"),
        Column_12(11, "状态"),
        Column_13(12, "起始日期"),
        Column_14(13, "终止日期")
        ;
        private Integer index;
        private String name;
        public static final Map<Integer, String> MAPPING = new HashMap<>();

        EXECLColumn(Integer index, String name) {
            this.index = index;
            this.name = name;
        }

        public Integer getIndex() {
            return index;
        }

        public String getName() {
            return name;
        }

        static {
            for (TaxesCalculateReportEnum.Column accountType : TaxesCalculateReportEnum.Column.values()) {
                MAPPING.put(accountType.getIndex(), accountType.getName());
            }
        }
    }
}