fix:小票打印机纸张校验增加501错误码,直接返回错误信息

This commit is contained in:
石崇礼 2025-03-13 09:58:23 +08:00
parent 0601dbf25a
commit 3f0d3e5026
1 changed files with 2 additions and 2 deletions

View File

@ -72,11 +72,11 @@ public class RegisterServiceImpl implements PrintService {
// 获取打印机纸张
String stPaperEx = ms439.getStPaperEx();
if (stPaperEx == null || stPaperEx.equals("")) {
throw new RRException("获取打印机纸张状态出问题");
throw new RRException(501, "获取打印机纸张状态出问题");
}
String[] papers = stPaperEx.split("\\|");
if ( papers.length < 1) {
throw new RRException("打印机纸盒数量不对");
throw new RRException(501, "打印机纸盒数量不对");
}
String paperStatus = papers[0];
if ( !(paperStatus.equals(MS439PaperStatusEnum.PAPERFULL.getPrintCode()) || paperStatus.equals(MS439PaperStatusEnum.PAPERLOW.getPrintCode()))){