|
@@ -15,6 +15,7 @@ package vip.xiaonuo.biz.modular.qyfrontlinewarehouse.service.impl;
|
|
|
import cn.afterturn.easypoi.pdf.PdfExportUtil;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollStreamUtil;
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
@@ -28,6 +29,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+import vip.xiaonuo.biz.modular.qyinwarehouse.entity.QyInWarehouse;
|
|
|
+import vip.xiaonuo.biz.modular.qyinwarehouse.service.QyInWarehouseService;
|
|
|
import vip.xiaonuo.common.enums.CommonSortOrderEnum;
|
|
|
import vip.xiaonuo.common.exception.CommonException;
|
|
|
import vip.xiaonuo.common.page.CommonPageRequest;
|
|
@@ -61,6 +64,8 @@ public class QyFrontlineWarehouseServiceImpl extends ServiceImpl<QyFrontlineWare
|
|
|
|
|
|
@Autowired
|
|
|
private DevFileApi devFileApi;
|
|
|
+ @Autowired
|
|
|
+ private QyInWarehouseService qyInWarehouseService;
|
|
|
|
|
|
@Override
|
|
|
public Page<QyFrontlineWarehouse> page(QyFrontlineWarehousePageParam qyFrontlineWarehousePageParam) {
|
|
@@ -184,8 +189,18 @@ public class QyFrontlineWarehouseServiceImpl extends ServiceImpl<QyFrontlineWare
|
|
|
|
|
|
queryWrapper.lambda().eq(QyFrontlineWarehouse::getWarehouseNumber,qyFrontlineWarehouse.getWarehouseNumber());
|
|
|
|
|
|
+
|
|
|
+
|
|
|
List<QyFrontlineWarehouse> list = this.list(queryWrapper);
|
|
|
|
|
|
+ String warehouseNumber = qyFrontlineWarehouse.getWarehouseNumber();
|
|
|
+ QueryWrapper<QyInWarehouse> qyInWarehouseQuery= new QueryWrapper<QyInWarehouse>().checkSqlInjection();
|
|
|
+ List<QyInWarehouse> warehouses = qyInWarehouseService.list(qyInWarehouseQuery);
|
|
|
+ QyInWarehouse qyInWarehouse = null;
|
|
|
+ if(CollectionUtil.isNotEmpty(warehouses)){
|
|
|
+ qyInWarehouse = CollectionUtil.getFirst(warehouses);
|
|
|
+ }
|
|
|
+
|
|
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
|
|
Document document = CommonPdfUtil.createDocument();
|
|
|
PdfWriter.getInstance(document, os);
|
|
@@ -232,7 +247,7 @@ public class QyFrontlineWarehouseServiceImpl extends ServiceImpl<QyFrontlineWare
|
|
|
|
|
|
//第三行内容_往来对象
|
|
|
String wldxName = "往来对象:";
|
|
|
- PdfPCell wldxHead = CommonPdfUtil.createCenterPdfPCell(wldxName+"哈尔滨怡康药业邮箱公司", 1, 3, CommonPdfUtil.NORMALFONT);
|
|
|
+ PdfPCell wldxHead = CommonPdfUtil.createCenterPdfPCell(wldxName+(qyInWarehouse == null ? "":qyInWarehouse.getFhqymc()), 1, 3, CommonPdfUtil.NORMALFONT);
|
|
|
wldxHead.setHorizontalAlignment(Element.ALIGN_LEFT);
|
|
|
pdfPTable.addCell(wldxHead);
|
|
|
|