|
|
@ -889,7 +889,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A |
|
|
|
|
|
|
|
// 3.创建模板工作簿 并指定储存路径
|
|
|
|
String path = jsonStor.getString("path"); |
|
|
|
String pathName = "D:\\work\\"+jsonStor.getString("name")+ jsonStor.getString("storage_id") + ".xlsx"; |
|
|
|
String pathName = whereJson.getString("url"); |
|
|
|
ExcelWriter workBook = EasyExcel.write(pathName).withTemplate(path).build(); |
|
|
|
// 获取第一个sheet
|
|
|
|
WriteSheet sheet = EasyExcel.writerSheet().build(); |
|
|
@ -919,8 +919,8 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A |
|
|
|
PageFormat pageFormat = printerJob.defaultPage(); |
|
|
|
//设置相关打印选项
|
|
|
|
Paper paper = pageFormat.getPaper(); |
|
|
|
paper.setSize(1240,1754); |
|
|
|
paper.setImageableArea(0, 0, 1240, 1754); |
|
|
|
paper.setSize(whereJson.getInteger("page_length"),whereJson.getInteger("page_height")); |
|
|
|
paper.setImageableArea(0, 0, whereJson.getInteger("page_length"),whereJson.getInteger("page_height")); |
|
|
|
pageFormat.setPaper(paper); |
|
|
|
printerJob.setCopies(1); |
|
|
|
printerJob.setPrintable(workbook, pageFormat); |
|
|
|