瀏覽代碼

核注核放bug修改

wenjinbiao 9 月之前
父節點
當前提交
d69835e332
共有 12 個文件被更改,包括 355 次插入93 次删除
  1. 2 2
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/service/impl/BizDictServiceImpl.java
  2. 114 23
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qyfrontlinewarehouse/service/impl/QyFrontlineWarehouseServiceImpl.java
  3. 40 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/controller/QySecondlineHfdController.java
  4. 40 39
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/entity/QySecondlineHfd.java
  5. 2 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/mapper/QySecondlineHfdMapper.java
  6. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/mapper/mapping/QySecondlineHfdMapper.xml
  7. 6 3
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/service/impl/QySecondlineHfdServiceImpl.java
  8. 22 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/controller/QySecondlineHzdTzController.java
  9. 2 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/mapper/QySecondlineHzdTzMapper.java
  10. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/mapper/mapping/QySecondlineHzdTzMapper.xml
  11. 2 3
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/service/impl/QySecondlineHzdTzServiceImpl.java
  12. 119 21
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinewarehouse/service/impl/QySecondlineWarehouseServiceImpl.java

+ 2 - 2
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/dict/service/impl/BizDictServiceImpl.java

@@ -171,8 +171,8 @@ public class BizDictServiceImpl extends ServiceImpl<BizDictMapper, BizDict> impl
         if(bizDict != null){
             QueryWrapper<BizDict> dataQuery = new QueryWrapper<BizDict>().checkSqlInjection();
             dataQuery.lambda()
-                    .eq(BizDict::getParentId,bizDict.getParentId())
-                    .eq(BizDict::getDictValue,dataType);
+                    .eq(BizDict::getParentId,bizDict.getId())
+                    .eq(BizDict::getDictValue,dataValue);
             BizDict dataBizDict = this.getOne(dataQuery);
             if(dataBizDict != null){
                 return dataBizDict.getDictLabel();

+ 114 - 23
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qyfrontlinewarehouse/service/impl/QyFrontlineWarehouseServiceImpl.java

@@ -46,6 +46,7 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 import java.util.UUID;
 
@@ -190,33 +191,91 @@ public class QyFrontlineWarehouseServiceImpl extends ServiceImpl<QyFrontlineWare
         PdfWriter.getInstance(document, os);
         document.open();
 
-        String headName = "入库凭证";
+        String headName = "入库";
 
         if("1".equals(qyFrontlineWarehouse.getWarehouseType())){
-           headName = "出库凭证";
+           headName = "出库单";
+        }
+        //公用
+        String warehouseTypeName = "入库" ;
+        if("1".equals(qyFrontlineWarehouse.getWarehouseType())){
+            warehouseTypeName = "出库";
         }
 
+        headName = qyFrontlineWarehouse.getCompanyName() + headName;
+
         //创建表格
-        PdfPTable pdfPTable = CommonPdfUtil.createPdfPTable(7);
+        PdfPTable pdfPTable = CommonPdfUtil.createPdfPTable(8);
 //        //设置列宽
 //        pdfPTable.setWidths(new float[]{2f,6f,3f,2f,2f,3f,5f});
         //设置表头
-        PdfPCell firstHead = CommonPdfUtil.createCenterPdfPCell(headName, 2, 7, CommonPdfUtil.BOLDFONT);
+        PdfPCell firstHead = CommonPdfUtil.createCenterPdfPCell(headName, 2, 8, CommonPdfUtil.BOLDFONT);
         pdfPTable.addCell(firstHead);
 
-        //设置账册编号
-        PdfPCell accountCodeCell = CommonPdfUtil.createCenterPdfPCell("NO:"+qyFrontlineWarehouse.getAccountCode(), 1, 7, CommonPdfUtil.NORMALFONT);
-        //设置文字居右
-        accountCodeCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
-        pdfPTable.addCell(accountCodeCell);
+        //第二行内容_出入库类型
+        String typeName = warehouseTypeName + "类型:";
+        PdfPCell typeHead = CommonPdfUtil.createCenterPdfPCell(typeName+"销售"+warehouseTypeName, 1, 3, CommonPdfUtil.NORMALFONT);
+        typeHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(typeHead);
+
+        //第二行内容_仓库
+        String ckName = warehouseTypeName + "仓库:";
+        PdfPCell ckHead = CommonPdfUtil.createCenterPdfPCell(ckName+"料件仓库", 1, 3, CommonPdfUtil.NORMALFONT);
+        ckHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(ckHead);
+
+        //第二行内容_单号
+        String dhName = warehouseTypeName + "单号:";
+        PdfPCell dhHead = CommonPdfUtil.createCenterPdfPCell(dhName+qyFrontlineWarehouse.getWarehouseNumber(), 1, 2, CommonPdfUtil.NORMALFONT);
+        dhHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(dhHead);
+
+        //第三行内容_往来对象
+        String wldxName = "往来对象:";
+        PdfPCell wldxHead = CommonPdfUtil.createCenterPdfPCell(wldxName+"哈尔滨怡康药业邮箱公司", 1, 3, CommonPdfUtil.NORMALFONT);
+        wldxHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(wldxHead);
+
+        //第三行内容_经手人
+        String jsrName = "经手人:";
+        PdfPCell jsrHead = CommonPdfUtil.createCenterPdfPCell(jsrName+"钱晓红", 1, 3, CommonPdfUtil.NORMALFONT);
+        jsrHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(jsrHead);
+
+
+        //第三行内容_经手人
+        String rqName = warehouseTypeName + "日期:";
+        Date warehouseTime = qyFrontlineWarehouse.getWarehouseTime();
+        String rqValue ="";
+        if(warehouseTime != null){
+           rqValue =  new SimpleDateFormat("yyyy-MM-dd").format(warehouseTime);
+        }
+        PdfPCell rqHead = CommonPdfUtil.createCenterPdfPCell(rqName+rqValue, 1, 2, CommonPdfUtil.NORMALFONT);
+        rqHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(rqHead);
+
+
+        //第四行内容——地址备注
+        String dzName = "地址备注:";
+        PdfPCell dzHead = CommonPdfUtil.createCenterPdfPCell(dzName+"顺丰快递", 1, 7, CommonPdfUtil.NORMALFONT);
+        dzHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(dzHead);
+
+        String ymName = "第1/1页";
+        PdfPCell ymHead = CommonPdfUtil.createCenterPdfPCell(ymName, 1, 1, CommonPdfUtil.NORMALFONT);
+        ymHead.setHorizontalAlignment(Element.ALIGN_RIGHT);
+        pdfPTable.addCell(ymHead);
 
         //设置二级表头
         PdfPCell indexNoHead = CommonPdfUtil.createCenterPdfPCell("序号", 1, 1, CommonPdfUtil.NORMALFONT);
-        PdfPCell commodityNameHead = CommonPdfUtil.createCenterPdfPCell("商品名称", 1, 1, CommonPdfUtil.NORMALFONT);
-        PdfPCell specsHead = CommonPdfUtil.createCenterPdfPCell("规格", 1, 1, CommonPdfUtil.NORMALFONT);
-        PdfPCell unitHead = CommonPdfUtil.createCenterPdfPCell("单位", 1, 1, CommonPdfUtil.NORMALFONT);
+        PdfPCell commodityNameHead = CommonPdfUtil.createCenterPdfPCell("品名", 1, 1, CommonPdfUtil.NORMALFONT);
+        PdfPCell specsHead = CommonPdfUtil.createCenterPdfPCell("规格型号", 1, 1, CommonPdfUtil.NORMALFONT);
         PdfPCell accountNumberHead = CommonPdfUtil.createCenterPdfPCell("数量", 1, 1, CommonPdfUtil.NORMALFONT);
+        PdfPCell unitHead = CommonPdfUtil.createCenterPdfPCell("单位", 1, 1, CommonPdfUtil.NORMALFONT);
         PdfPCell unitPriceHead= CommonPdfUtil.createCenterPdfPCell("单价", 1, 1, CommonPdfUtil.NORMALFONT);
+
+        PdfPCell jeHead= CommonPdfUtil.createCenterPdfPCell("金额", 1, 1, CommonPdfUtil.NORMALFONT);
+
         PdfPCell remarkHead = CommonPdfUtil.createCenterPdfPCell("备注", 1, 1, CommonPdfUtil.NORMALFONT);
         pdfPTable.addCell(indexNoHead);
         pdfPTable.addCell(commodityNameHead);
@@ -224,18 +283,31 @@ public class QyFrontlineWarehouseServiceImpl extends ServiceImpl<QyFrontlineWare
         pdfPTable.addCell(unitHead);
         pdfPTable.addCell(accountNumberHead);
         pdfPTable.addCell(unitPriceHead);
+        pdfPTable.addCell(jeHead);
         pdfPTable.addCell(remarkHead);
 
 
+        //金额
         BigDecimal amount  =  BigDecimal.ZERO;
+        //数量
+        BigDecimal total  =  BigDecimal.ZERO;
 
         for (int i = 1; i <= list.size(); i++) {
             QyFrontlineWarehouse item = list.get(i - 1);
             PdfPCell indexNoCell = CommonPdfUtil.createCenterPdfPCell(String.valueOf(i),1, 1, CommonPdfUtil.NORMALFONT);
             PdfPCell commodityNameCell = CommonPdfUtil.createCenterPdfPCell(item.getCommodityName(), 1, 1, CommonPdfUtil.NORMALFONT);
             PdfPCell specsCell = CommonPdfUtil.createCenterPdfPCell(item.getSpecs(), 1, 1, CommonPdfUtil.NORMALFONT);
-            PdfPCell unitCell = CommonPdfUtil.createCenterPdfPCell(item.getMeasurementUnit(), 1, 1, CommonPdfUtil.NORMALFONT);
+
             PdfPCell accountNumberCell = CommonPdfUtil.createCenterPdfPCell(item.getAccountNumber(), 1, 1, CommonPdfUtil.NORMALFONT);
+            PdfPCell unitCell = CommonPdfUtil.createCenterPdfPCell(item.getMeasurementUnit(), 1, 1, CommonPdfUtil.NORMALFONT);
+            BigDecimal subAmount = BigDecimal.ZERO;
+            try {
+                subAmount = new BigDecimal(item.getAccountNumber()).multiply(new BigDecimal(item.getUnitPrice()));
+            }catch (Exception e){
+
+            }
+
+            PdfPCell jeCell = CommonPdfUtil.createCenterPdfPCell(subAmount.toPlainString(), 1, 1, CommonPdfUtil.NORMALFONT);
             PdfPCell unitPriceCell = CommonPdfUtil.createCenterPdfPCell(item.getUnitPrice(), 1, 1, CommonPdfUtil.NORMALFONT);
             PdfPCell remarkCell = CommonPdfUtil.createCenterPdfPCell(item.getRemark(), 1, 1, CommonPdfUtil.NORMALFONT);
 
@@ -244,30 +316,49 @@ public class QyFrontlineWarehouseServiceImpl extends ServiceImpl<QyFrontlineWare
             pdfPTable.addCell(specsCell);
             pdfPTable.addCell(unitCell);
             pdfPTable.addCell(accountNumberCell);
+            pdfPTable.addCell(jeCell);
             pdfPTable.addCell(unitPriceCell);
             pdfPTable.addCell(remarkCell);
-
+            //防止错填数据转换不成数字类型报错导致报错
+            amount = amount.add(subAmount);
             try {
-                //防止错填数据转换不成数字类型报错导致报错
-                amount = amount.add(new BigDecimal(item.getAccountNumber()).multiply(new BigDecimal(item.getUnitPrice())));
-
+                total = total.add(new BigDecimal(item.getAccountNumber()));
             }catch (Exception e){
 
             }
+
         }
 
-        //计算合计
 
-        PdfPCell amountCell = CommonPdfUtil.createCenterPdfPCell("合计:"+amount.toPlainString(),1, 2, CommonPdfUtil.NORMALFONT);
+        //底部第一行_数量总计
+        PdfPCell slCell = CommonPdfUtil.createCenterPdfPCell("数量总计:"+total.toPlainString(),1, 3, CommonPdfUtil.NORMALFONT);
+        slCell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        PdfPCell amountCell = CommonPdfUtil.createCenterPdfPCell("金额总计:"+amount.toPlainString(),1, 3, CommonPdfUtil.NORMALFONT);
         amountCell.setHorizontalAlignment(Element.ALIGN_LEFT);
-        PdfPCell companyNameCell = CommonPdfUtil.createCenterPdfPCell("单位: " + qyFrontlineWarehouse.getCompanyName() ,1, 3, CommonPdfUtil.NORMALFONT);
-        companyNameCell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        //底部第一行_实收
+        PdfPCell ssCell = CommonPdfUtil.createCenterPdfPCell("实收 现金¥:"+amount.toPlainString(),1, 2, CommonPdfUtil.NORMALFONT);
+        ssCell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        //底部第二行_制单人
         PdfPCell creatorCell = CommonPdfUtil.createCenterPdfPCell("制单人: "+qyFrontlineWarehouse.getCreator(),1, 2, CommonPdfUtil.NORMALFONT);
-        creatorCell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        //底部第二行_审核人
+        PdfPCell shrCell = CommonPdfUtil.createCenterPdfPCell("审核人: "+"王凯",1, 2, CommonPdfUtil.NORMALFONT);
+        //底部第二行_发货人
+        PdfPCell fhrCell = CommonPdfUtil.createCenterPdfPCell("发货人: "+"刘晨",1, 2, CommonPdfUtil.NORMALFONT);
+        //底部第二行_收货人
+        PdfPCell shCell = CommonPdfUtil.createCenterPdfPCell("收货人: "+"张详",1, 2, CommonPdfUtil.NORMALFONT);
+
+
 
+
+
+        pdfPTable.addCell(slCell);
         pdfPTable.addCell(amountCell);
-        pdfPTable.addCell(companyNameCell);
+        pdfPTable.addCell(ssCell);
         pdfPTable.addCell(creatorCell);
+        pdfPTable.addCell(shrCell);
+        pdfPTable.addCell(fhrCell);
+        pdfPTable.addCell(shCell);
+
 
         document.add(pdfPTable);
 

+ 40 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/controller/QySecondlineHfdController.java

@@ -13,15 +13,19 @@
 package vip.xiaonuo.biz.modular.qysecondlinehfd.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.URLUtil;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import io.swagger.v3.oas.annotations.Operation;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
+import vip.xiaonuo.biz.modular.dict.service.BizDictService;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.param.*;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.vo.QySecondlineHfdBgInfoVo;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.vo.QySecondlineHfdDetailVo;
@@ -54,7 +58,8 @@ public class QySecondlineHfdController {
 
     @Resource
     private QySecondlineHfdService qySecondlineHfdService;
-
+    @Autowired
+    BizDictService bizDictService;
     /**
      * 获取二线出区核放单管理分页
      *
@@ -109,8 +114,42 @@ public class QySecondlineHfdController {
     @SaCheckPermission("/biz/qysecondlinehfd/export")
     @PostMapping("/biz/qysecondlinehfd/export")
     public void export(@RequestBody @Valid QySecondlineHfdPageParam qySecondlineHfdPageParam, HttpServletResponse response) {
+        qySecondlineHfdPageParam.setSize( Integer.MAX_VALUE);
         Page<QySecondlineHfd> page =  qySecondlineHfdService.page(qySecondlineHfdPageParam);
         List<QySecondlineHfd> records = page.getRecords();
+
+        if(CollectionUtil.isNotEmpty(records)){
+            records.parallelStream().forEach(r->{
+                //翻译字典
+                //1.核放单类型
+                if(ObjectUtil.isNotEmpty(r.getHfdLx())){
+                    String hfdlx = bizDictService.getNameByType("hfdlx", r.getHfdLx());
+                    r.setHfdLx(hfdlx);
+                }
+                //申报类型
+                if(ObjectUtil.isNotEmpty(r.getSblx())){
+                    String sblx = bizDictService.getNameByType("qybalx", r.getSblx());
+                    if(ObjectUtil.isEmpty(sblx)){
+                        if ("1".equals(r.getSblx())){
+                            r.setSblx("备案");
+                        }
+
+                        if ("2".equals(r.getSblx())){
+                            r.setSblx("变更");
+                        }
+
+                        if ("3".equals(r.getSblx())){
+                            r.setSblx("注销");
+                        }
+                    }
+                }
+                //单据状态
+                if(ObjectUtil.isNotEmpty(r.getStatus())){
+                    String status = bizDictService.getNameByType("djzt", r.getStatus());
+                    r.setStatus(status);
+                }
+            });
+        }
         exportExcel(response,QySecondlineHfd.class,records,"二线出区核放单管理");
     }
 

+ 40 - 39
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/entity/QySecondlineHfd.java

@@ -11,6 +11,7 @@
  * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
  */
 package vip.xiaonuo.biz.modular.qysecondlinehfd.entity;
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.baomidou.mybatisplus.annotation.*;
@@ -35,237 +36,237 @@ public class QySecondlineHfd {
     @TableId
     @Schema(description = "主键")
     @ColumnWidth(12)
-    @ExcelProperty(index = 0,value = "主键")
+    @ExcelIgnore
     private String id;
 
     /** 核放单预录入号 */
     @Schema(description = "核放单预录入号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 1,value = "核放单预录入号")
+    @ExcelProperty(index = 0,value = "核放单预录入号")
     private String hfdrCode;
 
     /** 核放单号 */
     @Schema(description = "核放单号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 2,value = "核放单号")
+    @ExcelProperty(index = 1,value = "核放单号")
     private String hfdCode;
 
     /** 核放类型 */
     @Schema(description = "核放类型")
     @ColumnWidth(12)
-    @ExcelProperty(index = 3,value = "核放类型")
+    @ExcelProperty(index = 2,value = "核放类型")
     private String hfdLx;
 
     /** 台账编号 */
     @Schema(description = "台账编号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 4,value = "台账编号")
+    @ExcelIgnore
     private String ledgerCode;
 
     /** 进出标志 */
     @Schema(description = "进出标志")
     @ColumnWidth(12)
-    @ExcelProperty(index = 5,value = "进出标志")
+    @ExcelIgnore
     private String jcbz;
 
     /** 绑定类型 */
     @Schema(description = "绑定类型")
     @ColumnWidth(12)
-    @ExcelProperty(index = 6,value = "绑定类型")
+    @ExcelIgnore
     private String bdlx;
 
     /** 关联核注清单编号 */
     @Schema(description = "关联核注清单编号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 7,value = "关联核注清单编号")
+    @ExcelProperty(index = 3,value = "关联核注清单编号")
     private String glhzqdbh;
 
     /** 申报类型 */
     @Schema(description = "申报类型")
     @ColumnWidth(12)
-    @ExcelProperty(index = 8,value = "申报类型")
+    @ExcelProperty(index = 4,value = "申报类型")
     private String sblx;
 
     /** 单据类型 */
     @Schema(description = "单据类型")
     @ColumnWidth(12)
-    @ExcelProperty(index = 9,value = "单据类型")
+    @ExcelIgnore
     private String applyType;
 
     /** 承运车车牌号 */
     @Schema(description = "承运车车牌号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 10,value = "承运车车牌号")
+    @ExcelIgnore
     private String cyccph;
 
     /** ic卡号 */
     @Schema(description = "ic卡号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 11,value = "ic卡号")
+    @ExcelIgnore
     private String ickh;
 
     /** 车架号 */
     @Schema(description = "车架号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 12,value = "车架号")
+    @ExcelIgnore
     private String cjh;
 
     /** 车架重 */
     @Schema(description = "车架重")
     @ColumnWidth(12)
-    @ExcelProperty(index = 13,value = "车架重")
+    @ExcelIgnore
     private String cjz;
 
     /** 车自重 */
     @Schema(description = "车自重")
     @ColumnWidth(12)
-    @ExcelProperty(index = 14,value = "车自重")
+    @ExcelIgnore
     private String czz;
 
     /** 集装箱号 */
     @Schema(description = "集装箱号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 15,value = "集装箱号")
+    @ExcelIgnore
     private String jzxh;
 
     /** 集装箱类型 */
     @Schema(description = "集装箱类型")
     @ColumnWidth(12)
-    @ExcelProperty(index = 16,value = "集装箱类型")
+    @ExcelIgnore
     private String jzxlx;
 
     /** 总重量 */
     @Schema(description = "总重量")
     @ColumnWidth(12)
-    @ExcelProperty(index = 17,value = "总重量")
+    @ExcelIgnore
     private String zzl;
 
     /** 货物毛重量 */
     @Schema(description = "货物毛重量")
     @ColumnWidth(12)
-    @ExcelProperty(index = 18,value = "货物毛重量")
+    @ExcelIgnore
     private String hwmzl;
 
     /** 货物总净重 */
     @Schema(description = "货物总净重")
     @ColumnWidth(12)
-    @ExcelProperty(index = 19,value = "货物总净重")
+    @ExcelIgnore
     private String hwjzl;
 
     /** 申报企业名称 */
     @Schema(description = "申报企业名称")
     @ColumnWidth(12)
-    @ExcelProperty(index = 20,value = "申报企业名称")
+    @ExcelIgnore
     private String sbqymc;
 
     /** 申报企业编号 */
     @Schema(description = "申报企业编号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 21,value = "申报企业编号")
+    @ExcelIgnore
     private String sbqybh;
 
     /** 申报企业社会信用代码 */
     @Schema(description = "申报企业社会信用代码")
     @ColumnWidth(12)
-    @ExcelProperty(index = 22,value = "申报企业社会信用代码")
+    @ExcelIgnore
     private String sbqyshxydm;
 
     /** 录入单位代码 */
     @Schema(description = "录入单位代码")
     @ColumnWidth(12)
-    @ExcelProperty(index = 23,value = "录入单位代码")
+    @ExcelIgnore
     private String lrdwdm;
 
     /** 录入单位社会信用代码 */
     @Schema(description = "录入单位社会信用代码")
     @ColumnWidth(12)
-    @ExcelProperty(index = 24,value = "录入单位社会信用代码")
+    @ExcelIgnore
     private String lrdwshxydm;
 
     /** 录入单位名称 */
     @Schema(description = "录入单位名称")
     @ColumnWidth(12)
-    @ExcelProperty(index = 25,value = "录入单位名称")
+    @ExcelIgnore
     private String lrdwmc;
 
     /** 企业单位内部编号 */
     @Schema(description = "企业单位内部编号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 26,value = "企业单位内部编号")
+    @ExcelIgnore
     private String qydwnbbh;
 
     /** 过卡1时间 */
     @Schema(description = "过卡1时间")
     @ColumnWidth(12)
-    @ExcelProperty(index = 27,value = "过卡1时间")
+    @ExcelIgnore
     private Date gkonesj;
 
     /** 过卡2时间 */
     @Schema(description = "过卡2时间")
     @ColumnWidth(12)
-    @ExcelProperty(index = 28,value = "过卡2时间")
+    @ExcelIgnore
     private Date gktwosj;
 
     /** 申报时间 */
     @Schema(description = "申报时间")
     @ColumnWidth(12)
-    @ExcelProperty(index = 29,value = "申报时间")
+    @ExcelProperty(index = 5,value = "申报时间")
     private Date sbsj;
 
     /** 申请人 */
     @Schema(description = "申请人")
     @ColumnWidth(12)
-    @ExcelProperty(index = 30,value = "申请人")
+    @ExcelIgnore
     private String sqr;
 
     /** 申请人联系方式 */
     @Schema(description = "申请人联系方式")
     @ColumnWidth(12)
-    @ExcelProperty(index = 31,value = "申请人联系方式")
+    @ExcelIgnore
     private String sqrlxfs;
 
     /** 单据状态 */
     @Schema(description = "单据状态")
     @ColumnWidth(12)
-    @ExcelProperty(index = 32,value = "单据状态")
+    @ExcelProperty(index = 6,value = "单据状态")
     private String status;
 
     /** 创建人 */
     @Schema(description = "创建人")
     @ColumnWidth(12)
-    @ExcelProperty(index = 33,value = "创建人")
+    @ExcelIgnore
     @TableField(fill = FieldFill.INSERT)
     private String createUser;
 
     /** 创建时间 */
     @Schema(description = "创建时间")
     @ColumnWidth(12)
-    @ExcelProperty(index = 34,value = "创建时间")
+    @ExcelIgnore
     @TableField(fill = FieldFill.INSERT)
     private Date createTime;
 
     /** 更新人 */
     @Schema(description = "更新人")
     @ColumnWidth(12)
-    @ExcelProperty(index = 35,value = "更新人")
+    @ExcelIgnore
     @TableField(fill = FieldFill.UPDATE)
     private String updateUser;
 
     /** 更新时间 */
     @Schema(description = "更新时间")
     @ColumnWidth(12)
-    @ExcelProperty(index = 36,value = "更新时间")
+    @ExcelIgnore
     @TableField(fill = FieldFill.UPDATE)
     private Date updateTime;
 
     /**  备注 */
     @Schema(description = " 备注")
     @ColumnWidth(12)
-    @ExcelProperty(index = 37,value = " 备注")
+    @ExcelIgnore
     private String remark;
 
     @Schema(description = "核放单报关单号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 38,value = "核放单报关单号")
+    @ExcelIgnore
     private String hfdBgCode;
 }

+ 2 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/mapper/QySecondlineHfdMapper.java

@@ -13,6 +13,7 @@
 package vip.xiaonuo.biz.modular.qysecondlinehfd.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.entity.QySecondlineHfd;
 
 /**
@@ -22,4 +23,5 @@ import vip.xiaonuo.biz.modular.qysecondlinehfd.entity.QySecondlineHfd;
  * @date  2024/07/06 11:58
  **/
 public interface QySecondlineHfdMapper extends BaseMapper<QySecondlineHfd> {
+    String createNo(@Param("prefix") String prefix);
 }

+ 3 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/mapper/mapping/QySecondlineHfdMapper.xml

@@ -2,4 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="vip.xiaonuo.biz.modular.qysecondlinehfd.mapper.QySecondlineHfdMapper">
 
+    <select id="createNo" resultType="java.lang.String">
+        SELECT  CONCAT(#{prefix},FLOOR(RAND() * 9999999999999999))
+    </select>
 </mapper>

+ 6 - 3
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/service/impl/QySecondlineHfdServiceImpl.java

@@ -26,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
+import vip.xiaonuo.biz.modular.dict.service.BizDictService;
 import vip.xiaonuo.biz.modular.qyrecordinfo.entity.BusinessIdGenerator;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.param.*;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.vo.QySecondlineHfdBgInfoVo;
@@ -83,6 +84,7 @@ public class QySecondlineHfdServiceImpl extends ServiceImpl<QySecondlineHfdMappe
     @Autowired
     QySecondlineHzdTzService qySecondlineHzdTzService;
 
+
     @Override
     public Page<QySecondlineHfd> page(QySecondlineHfdPageParam qySecondlineHfdPageParam) {
         QueryWrapper<QySecondlineHfd> queryWrapper = new QueryWrapper<QySecondlineHfd>().checkSqlInjection();
@@ -118,8 +120,9 @@ public class QySecondlineHfdServiceImpl extends ServiceImpl<QySecondlineHfdMappe
             queryWrapper.lambda().orderByDesc(QySecondlineHfd::getSblx);
         }
         Page<QySecondlineHfd> defaultPage = CommonPageRequest.defaultPage();
-        defaultPage.setSize(Integer.MAX_VALUE);
-        return this.page(defaultPage, queryWrapper);
+
+        Page<QySecondlineHfd> page = this.page(defaultPage, queryWrapper);
+        return page;
     }
 
 
@@ -214,7 +217,7 @@ public class QySecondlineHfdServiceImpl extends ServiceImpl<QySecondlineHfdMappe
         //生成预录入单号
         String hfdRCode = BusinessIdGenerator.generateNumBerUUID(18);
         qySecondlineHfd.setHfdrCode(hfdRCode);
-        //生成核单号(审核通过时)
+        //生成核单号(审核通过时)
         if(ObjectUtil.isNotEmpty(baseInfo.getStatus()) && "3".equals(baseInfo.getStatus())){
             qySecondlineHfd.setHfdCode(BusinessIdGenerator.generateNumBerUUID(18));
         }

+ 22 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/controller/QySecondlineHzdTzController.java

@@ -13,15 +13,19 @@
 package vip.xiaonuo.biz.modular.qysecondlinehzdtz.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.URLUtil;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import io.swagger.v3.oas.annotations.Operation;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
+import vip.xiaonuo.biz.modular.dict.service.BizDictService;
 import vip.xiaonuo.biz.modular.qyrecardbody.entity.QyRecardBody;
 import vip.xiaonuo.biz.modular.qyrecardbody.param.QyRecardBodyIdParam;
 import vip.xiaonuo.biz.modular.qyrecordinfo.entity.QyRecordInfo;
@@ -59,7 +63,8 @@ public class QySecondlineHzdTzController {
 
     @Resource
     private QySecondlineHzdTzService qySecondlineHzdTzService;
-
+    @Autowired
+    BizDictService bizDictService;
     /**
      * 获取二线核注单台账信息分页
      *
@@ -114,8 +119,24 @@ public class QySecondlineHzdTzController {
     @SaCheckPermission("/biz/qysecondlinehzdtz/export")
     @PostMapping("/biz/qysecondlinehzdtz/export")
     public void export(@RequestBody @Valid QySecondlineHzdTzPageParam qySecondlineHzdTzPageParam, HttpServletResponse response) {
+        qySecondlineHzdTzPageParam.setSize(Integer.MAX_VALUE);
         Page<QySecondlineHzdTz> page =  qySecondlineHzdTzService.page(qySecondlineHzdTzPageParam);
         List<QySecondlineHzdTz> records = page.getRecords();
+
+        if(CollectionUtil.isNotEmpty(records)){
+            records.parallelStream().forEach(r->{
+                //申报类型
+                if(ObjectUtil.isNotEmpty(r.getSblx())){
+                    String sblx = bizDictService.getNameByType("qybalx", r.getSblx());
+                    r.setSblx(sblx);
+                }
+                //单据状态
+                if(ObjectUtil.isNotEmpty(r.getStatus())){
+                    String status = bizDictService.getNameByType("djzt", r.getStatus());
+                    r.setStatus(status);
+                }
+            });
+        }
         exportExcel(response,QySecondlineHzdTz.class,records,"二线核注单台账信息");
     }
 

+ 2 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/mapper/QySecondlineHzdTzMapper.java

@@ -13,6 +13,7 @@
 package vip.xiaonuo.biz.modular.qysecondlinehzdtz.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
 import vip.xiaonuo.biz.modular.qysecondlinehzdtz.entity.QySecondlineHzdTz;
 
 /**
@@ -22,4 +23,5 @@ import vip.xiaonuo.biz.modular.qysecondlinehzdtz.entity.QySecondlineHzdTz;
  * @date  2024/07/06 14:44
  **/
 public interface QySecondlineHzdTzMapper extends BaseMapper<QySecondlineHzdTz> {
+    String createNo(@Param("prefix") String prefix);
 }

+ 3 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/mapper/mapping/QySecondlineHzdTzMapper.xml

@@ -2,4 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="vip.xiaonuo.biz.modular.qysecondlinehzdtz.mapper.QySecondlineHzdTzMapper">
 
+    <select id="createNo" resultType="java.lang.String">
+        SELECT  CONCAT(#{prefix},FLOOR(RAND() * 9999999999999999))
+    </select>
 </mapper>

+ 2 - 3
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/service/impl/QySecondlineHzdTzServiceImpl.java

@@ -125,7 +125,6 @@ public class QySecondlineHzdTzServiceImpl extends ServiceImpl<QySecondlineHzdTzM
             queryWrapper.lambda().orderByDesc(QySecondlineHzdTz::getSbsj);
         }
         Page<QySecondlineHzdTz> objectPage = CommonPageRequest.defaultPage();
-        objectPage.setSize(Integer.MAX_VALUE);
         return this.page(objectPage, queryWrapper);
     }
 
@@ -152,7 +151,7 @@ public class QySecondlineHzdTzServiceImpl extends ServiceImpl<QySecondlineHzdTzM
         qySecondlineHzdTz.setHzdrCode(hzdRCode);
         //生成核注单号(审核通过时)
         if(ObjectUtil.isNotEmpty(baseInfo.getStatus()) && "3".equals(baseInfo.getStatus())){
-            qySecondlineHzdTz.setHgHzdCode(BusinessIdGenerator.generateNumBerUUID(18));
+            qySecondlineHzdTz.setHgHzdCode(this.baseMapper.createNo("QD"));
         }
         this.save(qySecondlineHzdTz);
     }
@@ -233,7 +232,7 @@ public class QySecondlineHzdTzServiceImpl extends ServiceImpl<QySecondlineHzdTzM
         BeanUtil.copyProperties(qySecondlineHzdTzBaseParam.getBaseInfo(), qySecondlineHzdTz);
         //生成核注单号(审核通过时)
         if(ObjectUtil.isNotEmpty(qySecondlineHzdTzBaseParam.getBaseInfo().getStatus()) && "3".equals(qySecondlineHzdTzBaseParam.getBaseInfo().getStatus())){
-            qySecondlineHzdTz.setHgHzdCode(BusinessIdGenerator.generateNumBerUUID(18));
+            qySecondlineHzdTz.setHgHzdCode(this.baseMapper.createNo("QD"));
         }
         this.updateById(qySecondlineHzdTz);
 

+ 119 - 21
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinewarehouse/service/impl/QySecondlineWarehouseServiceImpl.java

@@ -49,6 +49,7 @@ import vip.xiaonuo.dev.api.DevFileApi;
 import java.io.ByteArrayOutputStream;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -184,25 +185,86 @@ public class QySecondlineWarehouseServiceImpl extends ServiceImpl<QySecondlineWa
         PdfWriter.getInstance(document, os);
         document.open();
 
-        //创建表格
-        PdfPTable pdfPTable = CommonPdfUtil.createPdfPTable(7);
 
+
+        String headName = "出库单";
+        String warehouseTypeName = "出库";
+
+
+        headName = qySecondlineWarehouse.getCompanyName() + headName;
+
+        //创建表格
+        PdfPTable pdfPTable = CommonPdfUtil.createPdfPTable(8);
+//        //设置列宽
+//        pdfPTable.setWidths(new float[]{2f,6f,3f,2f,2f,3f,5f});
         //设置表头
-        PdfPCell firstHead = CommonPdfUtil.createCenterPdfPCell("出库凭证", 2, 7, CommonPdfUtil.BOLDFONT);
+        PdfPCell firstHead = CommonPdfUtil.createCenterPdfPCell(headName, 2, 8, CommonPdfUtil.BOLDFONT);
         pdfPTable.addCell(firstHead);
 
-        //设置账册编号
-        PdfPCell accountCodeCell = CommonPdfUtil.createCenterPdfPCell("NO:"+ qySecondlineWarehouse.getAccountCode(), 1, 7, CommonPdfUtil.NORMALFONT);
-        accountCodeCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
-        pdfPTable.addCell(accountCodeCell);
+        //第二行内容_出入库类型
+        String typeName = warehouseTypeName + "类型:";
+        PdfPCell typeHead = CommonPdfUtil.createCenterPdfPCell(typeName+"销售"+warehouseTypeName, 1, 3, CommonPdfUtil.NORMALFONT);
+        typeHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(typeHead);
+
+        //第二行内容_仓库
+        String ckName = warehouseTypeName + "仓库:";
+        PdfPCell ckHead = CommonPdfUtil.createCenterPdfPCell(ckName+"料件仓库", 1, 3, CommonPdfUtil.NORMALFONT);
+        ckHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(ckHead);
+
+        //第二行内容_单号
+        String dhName = warehouseTypeName + "单号:";
+        PdfPCell dhHead = CommonPdfUtil.createCenterPdfPCell(dhName+qySecondlineWarehouse.getWarehouseNumber(), 1, 2, CommonPdfUtil.NORMALFONT);
+        dhHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(dhHead);
+
+        //第三行内容_往来对象
+        String wldxName = "往来对象:";
+        PdfPCell wldxHead = CommonPdfUtil.createCenterPdfPCell(wldxName+"哈尔滨怡康药业邮箱公司", 1, 3, CommonPdfUtil.NORMALFONT);
+        wldxHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(wldxHead);
+
+        //第三行内容_经手人
+        String jsrName = "经手人:";
+        PdfPCell jsrHead = CommonPdfUtil.createCenterPdfPCell(jsrName+"钱晓红", 1, 3, CommonPdfUtil.NORMALFONT);
+        jsrHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(jsrHead);
+
+
+        //第三行内容_经手人
+        String rqName = warehouseTypeName + "日期:";
+        Date warehouseTime = qySecondlineWarehouse.getWarehouseTime();
+        String rqValue ="";
+        if(warehouseTime != null){
+            rqValue =  new SimpleDateFormat("yyyy-MM-dd").format(warehouseTime);
+        }
+        PdfPCell rqHead = CommonPdfUtil.createCenterPdfPCell(rqName+rqValue, 1, 2, CommonPdfUtil.NORMALFONT);
+        rqHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(rqHead);
+
+
+        //第四行内容——地址备注
+        String dzName = "地址备注:";
+        PdfPCell dzHead = CommonPdfUtil.createCenterPdfPCell(dzName+"顺丰快递", 1, 7, CommonPdfUtil.NORMALFONT);
+        dzHead.setHorizontalAlignment(Element.ALIGN_LEFT);
+        pdfPTable.addCell(dzHead);
+
+        String ymName = "第1/1页";
+        PdfPCell ymHead = CommonPdfUtil.createCenterPdfPCell(ymName, 1, 1, CommonPdfUtil.NORMALFONT);
+        ymHead.setHorizontalAlignment(Element.ALIGN_RIGHT);
+        pdfPTable.addCell(ymHead);
 
         //设置二级表头
         PdfPCell indexNoHead = CommonPdfUtil.createCenterPdfPCell("序号", 1, 1, CommonPdfUtil.NORMALFONT);
-        PdfPCell commodityNameHead = CommonPdfUtil.createCenterPdfPCell("商品名称", 1, 1, CommonPdfUtil.NORMALFONT);
-        PdfPCell specsHead = CommonPdfUtil.createCenterPdfPCell("规格", 1, 1, CommonPdfUtil.NORMALFONT);
-        PdfPCell unitHead = CommonPdfUtil.createCenterPdfPCell("单位", 1, 1, CommonPdfUtil.NORMALFONT);
+        PdfPCell commodityNameHead = CommonPdfUtil.createCenterPdfPCell("品名", 1, 1, CommonPdfUtil.NORMALFONT);
+        PdfPCell specsHead = CommonPdfUtil.createCenterPdfPCell("规格型号", 1, 1, CommonPdfUtil.NORMALFONT);
         PdfPCell accountNumberHead = CommonPdfUtil.createCenterPdfPCell("数量", 1, 1, CommonPdfUtil.NORMALFONT);
+        PdfPCell unitHead = CommonPdfUtil.createCenterPdfPCell("单位", 1, 1, CommonPdfUtil.NORMALFONT);
         PdfPCell unitPriceHead= CommonPdfUtil.createCenterPdfPCell("单价", 1, 1, CommonPdfUtil.NORMALFONT);
+
+        PdfPCell jeHead= CommonPdfUtil.createCenterPdfPCell("金额", 1, 1, CommonPdfUtil.NORMALFONT);
+
         PdfPCell remarkHead = CommonPdfUtil.createCenterPdfPCell("备注", 1, 1, CommonPdfUtil.NORMALFONT);
         pdfPTable.addCell(indexNoHead);
         pdfPTable.addCell(commodityNameHead);
@@ -210,17 +272,31 @@ public class QySecondlineWarehouseServiceImpl extends ServiceImpl<QySecondlineWa
         pdfPTable.addCell(unitHead);
         pdfPTable.addCell(accountNumberHead);
         pdfPTable.addCell(unitPriceHead);
+        pdfPTable.addCell(jeHead);
         pdfPTable.addCell(remarkHead);
 
 
-        BigDecimal amount = BigDecimal.ZERO;
+        //金额
+        BigDecimal amount  =  BigDecimal.ZERO;
+        //数量
+        BigDecimal total  =  BigDecimal.ZERO;
+
         for (int i = 1; i <= list.size(); i++) {
             QySecondlineWarehouse item = list.get(i - 1);
             PdfPCell indexNoCell = CommonPdfUtil.createCenterPdfPCell(String.valueOf(i),1, 1, CommonPdfUtil.NORMALFONT);
             PdfPCell commodityNameCell = CommonPdfUtil.createCenterPdfPCell(item.getCommodityName(), 1, 1, CommonPdfUtil.NORMALFONT);
             PdfPCell specsCell = CommonPdfUtil.createCenterPdfPCell(item.getSpecs(), 1, 1, CommonPdfUtil.NORMALFONT);
-            PdfPCell unitCell = CommonPdfUtil.createCenterPdfPCell(item.getMeasurementUnit(), 1, 1, CommonPdfUtil.NORMALFONT);
+
             PdfPCell accountNumberCell = CommonPdfUtil.createCenterPdfPCell(item.getAccountNumber(), 1, 1, CommonPdfUtil.NORMALFONT);
+            PdfPCell unitCell = CommonPdfUtil.createCenterPdfPCell(item.getMeasurementUnit(), 1, 1, CommonPdfUtil.NORMALFONT);
+            BigDecimal subAmount = BigDecimal.ZERO;
+            try {
+                subAmount = new BigDecimal(item.getAccountNumber()).multiply(new BigDecimal(item.getUnitPrice()));
+            }catch (Exception e){
+
+            }
+
+            PdfPCell jeCell = CommonPdfUtil.createCenterPdfPCell(subAmount.toPlainString(), 1, 1, CommonPdfUtil.NORMALFONT);
             PdfPCell unitPriceCell = CommonPdfUtil.createCenterPdfPCell(item.getUnitPrice(), 1, 1, CommonPdfUtil.NORMALFONT);
             PdfPCell remarkCell = CommonPdfUtil.createCenterPdfPCell(item.getRemark(), 1, 1, CommonPdfUtil.NORMALFONT);
 
@@ -230,26 +306,48 @@ public class QySecondlineWarehouseServiceImpl extends ServiceImpl<QySecondlineWa
             pdfPTable.addCell(unitCell);
             pdfPTable.addCell(accountNumberCell);
             pdfPTable.addCell(unitPriceCell);
+            pdfPTable.addCell(jeCell);
             pdfPTable.addCell(remarkCell);
-
+            //防止错填数据转换不成数字类型报错导致报错
+            amount = amount.add(subAmount);
             try {
-                //防止错填数据转换不成数字类型报错导致报错
-                amount = amount.add(new BigDecimal(item.getAccountNumber()).multiply(new BigDecimal(item.getUnitPrice())));
-
+                total = total.add(new BigDecimal(item.getAccountNumber()));
             }catch (Exception e){
 
             }
+
         }
-        PdfPCell amountCell = CommonPdfUtil.createCenterPdfPCell("合计:"+amount.toPlainString(),1, 2, CommonPdfUtil.NORMALFONT);
+
+
+        //底部第一行_数量总计
+        PdfPCell slCell = CommonPdfUtil.createCenterPdfPCell("数量总计:"+total.toPlainString(),1, 3, CommonPdfUtil.NORMALFONT);
+        slCell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        PdfPCell amountCell = CommonPdfUtil.createCenterPdfPCell("金额总计:"+amount.toPlainString(),1, 3, CommonPdfUtil.NORMALFONT);
         amountCell.setHorizontalAlignment(Element.ALIGN_LEFT);
-        PdfPCell companyNameCell = CommonPdfUtil.createCenterPdfPCell("单位: " + qySecondlineWarehouse.getCompanyName() ,1, 3, CommonPdfUtil.NORMALFONT);
-        companyNameCell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        //底部第一行_实收
+        PdfPCell ssCell = CommonPdfUtil.createCenterPdfPCell("实收 现金¥:"+amount.toPlainString(),1, 2, CommonPdfUtil.NORMALFONT);
+        ssCell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        //底部第二行_制单人
         PdfPCell creatorCell = CommonPdfUtil.createCenterPdfPCell("制单人: "+qySecondlineWarehouse.getCreator(),1, 2, CommonPdfUtil.NORMALFONT);
-        creatorCell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        //底部第二行_审核人
+        PdfPCell shrCell = CommonPdfUtil.createCenterPdfPCell("审核人: "+"王凯",1, 2, CommonPdfUtil.NORMALFONT);
+        //底部第二行_发货人
+        PdfPCell fhrCell = CommonPdfUtil.createCenterPdfPCell("发货人: "+"刘晨",1, 2, CommonPdfUtil.NORMALFONT);
+        //底部第二行_收货人
+        PdfPCell shCell = CommonPdfUtil.createCenterPdfPCell("收货人: "+"张详",1, 2, CommonPdfUtil.NORMALFONT);
+
 
+
+
+
+        pdfPTable.addCell(slCell);
         pdfPTable.addCell(amountCell);
-        pdfPTable.addCell(companyNameCell);
+        pdfPTable.addCell(ssCell);
         pdfPTable.addCell(creatorCell);
+        pdfPTable.addCell(shrCell);
+        pdfPTable.addCell(fhrCell);
+        pdfPTable.addCell(shCell);
+
 
         document.add(pdfPTable);