|
|
|
@ -65,14 +65,15 @@ public class PrinterServiceImpl implements IPrinterService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 打印条码接口
|
|
|
|
|
* 打印原材料条码接口
|
|
|
|
|
*
|
|
|
|
|
* @param printContents
|
|
|
|
|
* @param ipAddress 客户端IP地址
|
|
|
|
|
* @return
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void printBarcodes(List<List<PrintContentVo>> printContents) throws Exception {
|
|
|
|
|
public void printBarcodes(List<List<PrintContentVo>> printContents,String ipAddress) throws Exception {
|
|
|
|
|
// HashMap<String, String> params = new HashMap<>();
|
|
|
|
|
// params.put("localPrintPath", localPrintPath);
|
|
|
|
|
// params.put("pdfTemplatePath", pdfTemplatePath);
|
|
|
|
@ -81,20 +82,43 @@ public class PrinterServiceImpl implements IPrinterService {
|
|
|
|
|
// params.put("batchCode", barcodeInfo.getBatchCode());
|
|
|
|
|
// params.put("materialName", barcodeInfo.getMaterialName());
|
|
|
|
|
// params.put("date", DateUtils.getDate());
|
|
|
|
|
HwPrintUtil.printBarcodes(localPrintPath, pdfTemplatePath,
|
|
|
|
|
HwPrintUtil.printBarcodes(ipAddress, pdfTemplatePath,
|
|
|
|
|
generatePath, printContents);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 打印成品条码接口
|
|
|
|
|
*
|
|
|
|
|
* @param printContents
|
|
|
|
|
* @param ipAddress 客户端IP地址
|
|
|
|
|
* @return
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void printProductBarcodes(List<List<PrintContentVo>> printContents,String ipAddress) throws Exception {
|
|
|
|
|
// HashMap<String, String> params = new HashMap<>();
|
|
|
|
|
// params.put("localPrintPath", localPrintPath);
|
|
|
|
|
// params.put("pdfTemplatePath", pdfTemplatePath);
|
|
|
|
|
// params.put("generatePath", generatePath);
|
|
|
|
|
// params.put("barcodeInfo", barcodeInfo.getBarcodeInfo());
|
|
|
|
|
// params.put("batchCode", barcodeInfo.getBatchCode());
|
|
|
|
|
// params.put("materialName", barcodeInfo.getMaterialName());
|
|
|
|
|
// params.put("date", DateUtils.getDate());
|
|
|
|
|
HwPrintUtil.printBarcodes(ipAddress, productLabelTemplatePath,
|
|
|
|
|
generateProductLabelPath, printContents);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 打印库位条码接口
|
|
|
|
|
*
|
|
|
|
|
* @param params
|
|
|
|
|
* @param ipAddress 客户端IP地址
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void printLocationLabel(HashMap<String, String> params) throws IOException {
|
|
|
|
|
HwPrintUtil.printLocationQRCode(localPrintPath, locationLabelTemplatePath,
|
|
|
|
|
public void printLocationLabel(HashMap<String, String> params,String ipAddress) throws IOException {
|
|
|
|
|
HwPrintUtil.printLocationQRCode(ipAddress, locationLabelTemplatePath,
|
|
|
|
|
generateLocationLabelPath, params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|