内部码打印问题

pro
anthonywj 2 years ago
parent c2c7b0b339
commit 7c6b5b1da3

@ -186,34 +186,34 @@ public class InvInnerOrderPrintController {
} else {
Map<String, Object> data = new HashMap<String, Object>();
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");
}
String orderId="";
String orderId = "";
for (InnerOrderPrintResponse InnerOrderPrintResponse : mStockPrintEntities) {
InvInnerOrderPrintEntity innerOrderPrintEntity = new InvInnerOrderPrintEntity();
innerOrderPrintEntity.setStatus(1);
innerOrderPrintEntity.setId(InnerOrderPrintResponse.getId());
invInnerOrderPrintService.updateOrder(innerOrderPrintEntity);
orderId=InnerOrderPrintResponse.getId()+"";
orderId = InnerOrderPrintResponse.getId() + "";
}
//查询订单id
InvInnerOrderPrintEntity innerOrderPrintEntity=invInnerOrderPrintService.selectById(orderId);
InvInnerOrderPrintEntity innerOrderPrintEntity = invInnerOrderPrintService.selectById(orderId);
//更新内部码状态
InnerOrderEntity innerOrderEntity=innerOrderService.findByRecordKey(innerOrderPrintEntity.getOrderIdFk());
if(innerOrderEntity!=null){
InnerOrderEntity innerOrderEntity = innerOrderService.findByRecordKey(innerOrderPrintEntity.getOrderIdFk());
if (innerOrderEntity != null) {
innerOrderEntity.setGenStatus(2);
innerOrderEntity.setId(innerOrderEntity.getId());
innerOrderService.update(innerOrderEntity);
}
IoOrderEntity ioOrderEntity=new IoOrderEntity();
IoOrderEntity ioOrderEntity = new IoOrderEntity();
ioOrderEntity.setInCodeStatus(1);
ioOrderEntity.setBillNo(innerOrderPrintEntity.getOrderIdFk());
ioOrderService.updateByBillNo(ioOrderEntity);
@ -229,7 +229,7 @@ public class InvInnerOrderPrintController {
@RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) throws Exception {
//查询模板文件是否存在
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getLabelId()+"");
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getLabelId() + "");
if (null == sysPdfTemplateRelevanceStatemenEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误");
}
@ -247,7 +247,7 @@ public class InvInnerOrderPrintController {
@RequestBody InnerOrderQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest,
HttpServletRequest request, HttpServletResponse response) throws Exception {
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(stockQRCodeTextPDFTemplateRequest.getLabelId()+"");
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(stockQRCodeTextPDFTemplateRequest.getLabelId() + "");
if (sysPdfTemplateRelevanceStatemenEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查");
SystemPDFTemplateEntity systemPDFTemplateEntity =

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

@ -1,5 +1,7 @@
package com.glxp.api.util;
import cn.hutool.core.util.StrUtil;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
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
* @since 1.0
*/
public static String getSubpath(String pathName, String fileName) {
int index = fileName.indexOf(pathName);
if (index != -1) {

Loading…
Cancel
Save