内部码打印问题

pro
anthonywj 2 years ago
parent c2c7b0b339
commit 7c6b5b1da3

@ -186,7 +186,7 @@ public class InvInnerOrderPrintController {
} else { } else {
Map<String, Object> data = new HashMap<String, Object>(); Map<String, Object> data = new HashMap<String, Object>();
data.put("data", printEntities); data.put("data", printEntities);
JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf"); JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/" + FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf");
} }

@ -153,6 +153,7 @@ public class IoOrderServiceImpl implements IoOrderService {
orderEntity.setRelKey(UUID.fastUUID().toString(true)); orderEntity.setRelKey(UUID.fastUUID().toString(true));
} }
orderEntity.setExportStatus(0); //上传状态:未上传 orderEntity.setExportStatus(0); //上传状态:未上传
orderEntity.setInCodeStatus(0);
return orderDao.insert(orderEntity); return orderDao.insert(orderEntity);
} }

@ -1,5 +1,7 @@
package com.glxp.api.util; package com.glxp.api.util;
import cn.hutool.core.util.StrUtil;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.File; import java.io.File;
@ -529,6 +531,16 @@ public class FileUtils {
} }
} }
public static String getLastFileName(String fileName) {
String fileNameNow = fileName.substring(fileName.lastIndexOf("/") + 1);
if (StrUtil.isEmpty(fileNameNow))
return fileName;
else
return fileNameNow;
}
/** /**
* *
* *
@ -538,6 +550,7 @@ public class FileUtils {
* @return * @return
* @since 1.0 * @since 1.0
*/ */
public static String getSubpath(String pathName, String fileName) { public static String getSubpath(String pathName, String fileName) {
int index = fileName.indexOf(pathName); int index = fileName.indexOf(pathName);
if (index != -1) { if (index != -1) {

Loading…
Cancel
Save