feat:ms439打印机相关接口,增加小票打印机获取接口
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
package com.dpkj.modules.print.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 盖章机状态枚举
|
||||
*
|
||||
* @author <a href="https://gitee.com/shi-chongli">石头人</a>
|
||||
* @version 1.0
|
||||
* @since 2025-03-06 15:13:58
|
||||
*/
|
||||
@Getter
|
||||
public enum MS439StampStatusEnum {
|
||||
|
||||
/**
|
||||
* 盖章机正常
|
||||
*/
|
||||
HEALTHY(439200, "正常", "HEALTHY"),
|
||||
|
||||
/**
|
||||
* 盖章机忙碌,请稍后
|
||||
*/
|
||||
BUSY(439201, "盖章机忙碌,请稍后", "BUSY"),
|
||||
|
||||
/**
|
||||
* 盖章机发生故障
|
||||
*/
|
||||
FATAL(439500, "盖章机发生故障", "FATAL"),
|
||||
|
||||
/**
|
||||
* 未发现盖章机
|
||||
*/
|
||||
NODEVICE(439501, "未发现盖章机", "NODEVICE"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
private final Integer code;
|
||||
|
||||
private final String msg;
|
||||
|
||||
private final String printCode;
|
||||
|
||||
|
||||
MS439StampStatusEnum(Integer code, String msg, String printCode) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.printCode = printCode;
|
||||
}
|
||||
|
||||
public static String getMessage(String printCode){
|
||||
for (MS439StampStatusEnum value : MS439StampStatusEnum.values()) {
|
||||
if ( value.getPrintCode().equals(printCode)){
|
||||
return value.msg;
|
||||
}
|
||||
}
|
||||
return "盖章机未知的错误";
|
||||
}
|
||||
|
||||
public static int getPCode(String printCode){
|
||||
for (MS439StampStatusEnum value : MS439StampStatusEnum.values()) {
|
||||
if ( value.getPrintCode().equals(printCode)){
|
||||
return value.code;
|
||||
}
|
||||
}
|
||||
return 500;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user