fix:小票打印机纸张校验增加501错误码,直接返回错误信息
This commit is contained in:
parent
0601dbf25a
commit
3f0d3e5026
|
@ -72,11 +72,11 @@ public class RegisterServiceImpl implements PrintService {
|
||||||
// 获取打印机纸张
|
// 获取打印机纸张
|
||||||
String stPaperEx = ms439.getStPaperEx();
|
String stPaperEx = ms439.getStPaperEx();
|
||||||
if (stPaperEx == null || stPaperEx.equals("")) {
|
if (stPaperEx == null || stPaperEx.equals("")) {
|
||||||
throw new RRException("获取打印机纸张状态出问题");
|
throw new RRException(501, "获取打印机纸张状态出问题");
|
||||||
}
|
}
|
||||||
String[] papers = stPaperEx.split("\\|");
|
String[] papers = stPaperEx.split("\\|");
|
||||||
if ( papers.length < 1) {
|
if ( papers.length < 1) {
|
||||||
throw new RRException("打印机纸盒数量不对");
|
throw new RRException(501, "打印机纸盒数量不对");
|
||||||
}
|
}
|
||||||
String paperStatus = papers[0];
|
String paperStatus = papers[0];
|
||||||
if ( !(paperStatus.equals(MS439PaperStatusEnum.PAPERFULL.getPrintCode()) || paperStatus.equals(MS439PaperStatusEnum.PAPERLOW.getPrintCode()))){
|
if ( !(paperStatus.equals(MS439PaperStatusEnum.PAPERFULL.getPrintCode()) || paperStatus.equals(MS439PaperStatusEnum.PAPERLOW.getPrintCode()))){
|
||||||
|
|
Loading…
Reference in New Issue