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