前后端联调
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
import com.ruoyi.common.interfaces.EnumsInterface;
|
||||
|
||||
/**
|
||||
* @Classname AnnexTypeEnum
|
||||
* @Description 附件类型枚举
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/1/12 17:50
|
||||
* @Created wangqiong
|
||||
*/
|
||||
public enum AnnexTypeEnum implements EnumsInterface {
|
||||
APPLICATION(1, "仲裁申请书"),
|
||||
APPLICATION_EVIDENCE(2, "申请人证据"),
|
||||
MEDIATION_APPLICATION(3, "调解申请书"),
|
||||
PAYMENT_RECEIPT(4, "缴费单"),
|
||||
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
AnnexTypeEnum(Integer code, String text)
|
||||
{
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public Integer getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getText()
|
||||
{
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取text
|
||||
* @param codeNo
|
||||
* @return
|
||||
*/
|
||||
public static String getTextByCode(Integer codeNo){
|
||||
for (AnnexTypeEnum value : AnnexTypeEnum.values()) {
|
||||
if (value.getCode().equals(codeNo)){
|
||||
return value.getText();
|
||||
}
|
||||
}
|
||||
return codeNo.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据text获取code
|
||||
* @param textStr
|
||||
* @return
|
||||
*/
|
||||
public static String getCodeByText(String textStr){
|
||||
for (AnnexTypeEnum value : AnnexTypeEnum.values()) {
|
||||
if (value.getText().equals(textStr)){
|
||||
return value.getText();
|
||||
}
|
||||
}
|
||||
return textStr;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
import com.ruoyi.common.interfaces.EnumsInterface;
|
||||
|
||||
/**
|
||||
* @Classname PaymentStatusEnum
|
||||
* @Description 支付状态枚举
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/1/12 18:07
|
||||
* @Created wangqiong
|
||||
*/
|
||||
public enum PaymentStatusEnum implements EnumsInterface {
|
||||
UNPAID(0, "未支付"),
|
||||
PAID(1, "已支付"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
PaymentStatusEnum(Integer code, String text)
|
||||
{
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public Integer getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getText()
|
||||
{
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取text
|
||||
* @param codeNo
|
||||
* @return
|
||||
*/
|
||||
public static String getTextByCode(Integer codeNo){
|
||||
for (PaymentStatusEnum value : PaymentStatusEnum.values()) {
|
||||
if (value.getCode().equals(codeNo)){
|
||||
return value.getText();
|
||||
}
|
||||
}
|
||||
return codeNo.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据text获取code
|
||||
* @param textStr
|
||||
* @return
|
||||
*/
|
||||
public static String getCodeByText(String textStr){
|
||||
for (PaymentStatusEnum value : PaymentStatusEnum.values()) {
|
||||
if (value.getText().equals(textStr)){
|
||||
return value.getText();
|
||||
}
|
||||
}
|
||||
return textStr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user