maven
13 小时以前 2edfe8214e2723dfb6cc1866c58f783f49a7f649
yys 成品入库导出修改
已修改4个文件
21 ■■■■■ 文件已修改
src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/procurementrecord/pojo/CustomStorage.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java
@@ -1,6 +1,7 @@
package com.ruoyi.procurementrecord.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
@@ -219,10 +220,16 @@
     * @param response
     */
    @PostMapping("/exportTwo")
    public void exportTwo(HttpServletResponse response) {
        List<CustomStorage> customStorages = customStorageMapper.selectList(null);
    public void exportTwo(HttpServletResponse response,List<CustomStorage> customStorage) {
        if(CollectionUtils.isEmpty(customStorage)){
            customStorage = customStorageMapper.selectList(null);
        }
        for (CustomStorage storage : customStorage) {
            // nginx 前端访问图片
            storage.setUrl("http://114.132.189.42:9044"+storage.getUrl());
        }
        ExcelUtil<CustomStorage> util = new ExcelUtil<CustomStorage>(CustomStorage.class);
        util.exportExcel(response, customStorages, "入库台账");
        util.exportExcel(response, customStorage, "入库台账");
    }
src/main/java/com/ruoyi/procurementrecord/pojo/CustomStorage.java
@@ -44,6 +44,7 @@
    /**
     * 图片
     */
    @Excel(name = "图片", cellType = Excel.ColumnType.IMAGE)
    private String url;
    /**
     * 出库数量
src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java
@@ -273,7 +273,7 @@
    @Override
    public void exportCopyTwo(HttpServletResponse response,Integer type) {
        LambdaQueryWrapper<CustomStorage> customStorageLambdaQueryWrapper = new LambdaQueryWrapper<>();
        customStorageLambdaQueryWrapper.groupBy(CustomStorage::getSupplierName, CustomStorage::getProductCategory, CustomStorage::getSpecificationModel);
        customStorageLambdaQueryWrapper.groupBy(CustomStorage::getProductCategory, CustomStorage::getSpecificationModel);
        List<CustomStorage> list = customStorageMapper.selectList(customStorageLambdaQueryWrapper);
        // 计算待入库数量
        // 查询采购记录已入库数量
@@ -285,7 +285,6 @@
        }
        LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>();
        procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect);
        procurementRecordLambdaQueryWrapper.eq(ProcurementRecordOut::getType, type);
        procurementRecordLambdaQueryWrapper.eq(ProcurementRecordOut::getType, type);
        List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper);
        if(CollectionUtils.isEmpty( procurementRecords)){
src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml
@@ -210,7 +210,7 @@
                  left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 2
                  left join purchase_ledger t3 on t3.id = t2.sales_ledger_id
        where t1.type = 1
        group by t3.supplier_name,t2.product_category,t2.specification_model
        group by t2.product_category,t2.specification_model
    </select>
    <select id="listCopyOne" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy">
        select
@@ -239,7 +239,7 @@
                  left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 1
                  left join sales_ledger t3 on t3.id = t2.sales_ledger_id
        where t1.type = 2
        group by t3.customer_name,t2.product_category,t2.specification_model
        group by t2.product_category,t2.specification_model
    </select>
    <select id="listPageByProduction" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDto">
        select