package com.joe.print.mvp.print;

import com.gingersoft.gsa.cloud.common.core.print.PrintDataMaker;
import com.gingersoft.gsa.cloud.common.core.print.PrinterWriter;
import com.gingersoft.gsa.cloud.common.core.print.PrinterWriterExecutor;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Wyh on 2020/1/9.
 * ip打印類
 */
public class OpenCashBoxMaker implements PrintDataMaker {

    @Override
    public List<byte[]> getPrintData() {
        ArrayList<byte[]> data = new ArrayList<>();
        try {
            PrinterWriter printer;
            printer = new PrinterWriterExecutor(255, 0);
            printer.openCashBox();
            data.add(printer.getDataAndClose());
            return data;
        } catch (Exception e) {
            return new ArrayList<>();
        }
    }

    @Override
    public String getPrjIds() {
        return null;
    }
}
