|
|
|
@ -12,6 +12,7 @@ import com.glxp.api.entity.inout.IoOrderEntity;
|
|
|
|
|
import com.glxp.api.entity.inv.InnerOrderDetailEntity;
|
|
|
|
|
import com.glxp.api.entity.inv.InvInnerOrderPdfTempEntity;
|
|
|
|
|
import com.glxp.api.entity.inv.InvInnerOrderPrintEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SystemPDFModuleEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SystemPDFTemplateEntity;
|
|
|
|
|
import com.glxp.api.req.basic.FilterUdiRelRequest;
|
|
|
|
@ -161,11 +162,9 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageSimpleResponse print(InnerOrderQRCodeTextPDFTemplateRequest innerOrderQRCodeTextPDFTemplateRequest) {
|
|
|
|
|
|
|
|
|
|
SystemPDFModuleEntity systemPDFModuleEntity = systemPDFModuleService.selectById(6 + "");
|
|
|
|
|
if (systemPDFModuleEntity == null) return null;
|
|
|
|
|
SysPdfTemplateRelevanceLabelEntity sysPdfTemplateRelevanceLabelEntity = systemPDFModuleService.selectByLabelId(1 + "");
|
|
|
|
|
SystemPDFTemplateEntity systemPDFTemplateEntity =
|
|
|
|
|
systemPDFTemplateService.selectById(String.valueOf(systemPDFModuleEntity.getTemplateId()));
|
|
|
|
|
systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceLabelEntity.getTemplateId()));
|
|
|
|
|
if (systemPDFTemplateEntity == null) return null;
|
|
|
|
|
List<InnerOrderPrintResponse> printEntities = new ArrayList<>();
|
|
|
|
|
List<InnerOrderPrintResponse> mStockPrintEntities = new ArrayList<>();
|
|
|
|
@ -207,13 +206,13 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
|
|
|
|
|
InvInnerOrderPdfTempEntity stockPrintTempEntity = new InvInnerOrderPdfTempEntity();
|
|
|
|
|
if (innerOrderQRCodeTextPDFTemplateRequest.getOrderId() != null) {
|
|
|
|
|
String fileName = innerOrderQRCodeTextPDFTemplateRequest.getOrderId() + "__" + index + "__标签打印" + ".pdf";
|
|
|
|
|
String filePath = dirPath + "\\pdfprint\\" + fileName;
|
|
|
|
|
String filePath = dirPath + "pdfprint/" + fileName;
|
|
|
|
|
stockPrintTempEntity.setFileName(fileName);
|
|
|
|
|
stockPrintTempEntity.setFilePath(filePath);
|
|
|
|
|
stockPrintTempEntity.setStockOrderFk(innerOrderQRCodeTextPDFTemplateRequest.getOrderId());
|
|
|
|
|
} else {
|
|
|
|
|
String fileName = innerOrderQRCodeTextPDFTemplateRequest.getQueryId() + "__" + index + "__标签打印" + ".pdf";
|
|
|
|
|
String filePath = dirPath + "\\pdfprint\\" + fileName;
|
|
|
|
|
String filePath = dirPath + "pdfprint/" + fileName;
|
|
|
|
|
stockPrintTempEntity.setFileName(fileName);
|
|
|
|
|
stockPrintTempEntity.setFilePath(filePath);
|
|
|
|
|
stockPrintTempEntity.setPrintCodeIdFk(innerOrderQRCodeTextPDFTemplateRequest.getQueryId());
|
|
|
|
@ -222,7 +221,7 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
|
|
|
|
|
stockPrintTempEntity.setGenkey(CustomUtil.getId());
|
|
|
|
|
stockPrintTempEntities.add(stockPrintTempEntity);
|
|
|
|
|
}
|
|
|
|
|
jaspaperService.printPdfLocal(splits, stockPrintTempEntities, systemPDFTemplateEntity.getPath());
|
|
|
|
|
jaspaperService.printPdfLocal(splits, stockPrintTempEntities, dirPath + "pdf/template/" + FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()));
|
|
|
|
|
|
|
|
|
|
innerOrderPdfTempService.insertStockPrintTempList(stockPrintTempEntities);
|
|
|
|
|
|
|
|
|
@ -276,7 +275,8 @@ public class InvInnerOrderPrintServiceImpl implements InvInnerOrderPrintService
|
|
|
|
|
innerOrderPrintEntity.setExpireDate(obj.getExpireDate());
|
|
|
|
|
innerOrderPrintEntity.setProductDate(obj.getProductDate());
|
|
|
|
|
innerOrderPrintEntity.setProductName(obj.getCoName());
|
|
|
|
|
innerOrderPrintEntity.setCount(obj.getCount());
|
|
|
|
|
// obj.getCount()
|
|
|
|
|
innerOrderPrintEntity.setCount(1);
|
|
|
|
|
innerOrderPrintEntity.setBatchNo(obj.getBatchNo());
|
|
|
|
|
innerOrderPrintEntity.setCreateTime(new Date());
|
|
|
|
|
innerOrderPrintEntity.setType(2);
|
|
|
|
|