| | |
| | | import cn.hutool.core.io.IoUtil; |
| | | import cn.hutool.core.lang.Assert; |
| | | import cn.hutool.core.util.IdUtil; |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void exportPrintExcelByWordId(@Nullable Long orderId) { |
| | | public byte[] exportPrintExcelByWordId(@Nullable Long orderId) { |
| | | ProductionPrintOrderDto printOrderDto = this.getByProductWordId(orderId); |
| | | List<MaterialInfoDto> materialInfo = printOrderDto.getMaterialInfo(); |
| | | Assert.isTrue(CollUtil.isNotEmpty(materialInfo),"未有材料信息,请添加改信息!"); |
| | |
| | | byte[] bytes = FileUtil.readBytes(exportProductionPrintOrderDto.getCuttingFileVo().getFileUrl()); |
| | | exportProductionPrintOrderDto.setCuttingImage(bytes); |
| | | } |
| | | // cutNum 为小盒数量+中盒数量 |
| | | exportProductionPrintOrderDto.setCutNum(String.valueOf(NumberUtil.add(exportProductionPrintOrderDto.getSmallBoxQty(),exportProductionPrintOrderDto.getMediumBoxQty()))); |
| | | |
| | | productionPrintOrderExcel.createPrintOrderTemplate(exportProductionPrintOrderDto, IoUtil.toStream(new File("/Users/ONEX/Downloads/printOrderTemp.xlsx"))); |
| | | |
| | | |
| | | byte[] printOrderTemplate = productionPrintOrderExcel.createPrintOrderTemplate(exportProductionPrintOrderDto, this.getClass().getResourceAsStream("/static/printOrderTemp.xlsx")); |
| | | return printOrderTemplate; |
| | | } |
| | | |
| | | |