diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryOkMapper.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryOkMapper.java index 284df9a5..408ef6d7 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryOkMapper.java +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryOkMapper.java @@ -64,7 +64,8 @@ public interface GdInventoryOkMapper extends BaseMapper { @Select("select IFNULL(count(1),0) from gd_inventory_ok where warehouseType='1' and warehouseCode<>'112'") int countProd1Not112(); - @Select("select IFNULL(count(1),0) from gd_inventory_ok where warehouseType='2'") + // @Select("select IFNULL(count(1),0) from gd_inventory_ok where warehouseType='2'") + @Select("select IFNULL(count(1),0) FROM (SELECT DISTINCT prodCode from gd_inventory_ok where warehouseType='2') t") int countProd2(); @Select("select IFNULL(sum(prodValue),0) from gd_inventory_ok where warehouseCode='112'") @@ -82,4 +83,16 @@ public interface GdInventoryOkMapper extends BaseMapper { @Select("select warehouseCode, warehouseName, warehouseType, prodCode, prodBarCode, prodName, prodNum, prodValue from gd_inventory_ok order by warehouseType") List> listOfProd(); + + @Select("select IFNULL(count(1),0) from gd_inventory_ok where warehouseCode='101'") + int countProd101(); + + @Select("select IFNULL(count(1),0) from gd_inventory_ok where warehouseCode='199'") + int countProd199(); + + @Select("select IFNULL(sum(prodValue),0) from gd_inventory_ok where warehouseCode='101'") + double countVal101(); + + @Select("select IFNULL(sum(prodValue),0) from gd_inventory_ok where warehouseCode='199'") + double countVal199(); } diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryOkService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryOkService.java index 01b58f96..63f19c7c 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryOkService.java +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryOkService.java @@ -27,7 +27,6 @@ package com.yxt.supervise.portal.biz.gdinventory; import cn.hutool.core.date.DateUtil; import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.resource.ResourceUtil; import cn.hutool.poi.excel.ExcelUtil; import cn.hutool.poi.excel.ExcelWriter; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -36,7 +35,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.io.File; -import java.net.URL; import java.util.Date; import java.util.List; import java.util.Map; @@ -75,13 +73,17 @@ public class GdInventoryOkService extends ServiceImpl0){ + writer.writeCellValue(1, 4, 1); + }else { + writer.writeCellValue(1, 4, 0); + } + if(prod199>0){ + writer.writeCellValue(1, 5, 1); + }else { + writer.writeCellValue(1, 5, 0); + } + // writer.writeCellValue(1, 4, type1); + writer.writeCellValue(1, 6, type2); writer.writeCellValue(2, 3, prod112); - writer.writeCellValue(2, 4, prod1Not112); - writer.writeCellValue(2, 5, prod2); + writer.writeCellValue(2, 4, prod101); + writer.writeCellValue(2, 5, prod199); + writer.writeCellValue(2, 6, prod2); writer.writeCellValue(3, 3, val112); - writer.writeCellValue(3, 4, val1Not112); - writer.writeCellValue(3, 5, val2); + writer.writeCellValue(3, 4, val101); + writer.writeCellValue(3, 5, val199); + writer.writeCellValue(3, 6, val2); // writer.flush(); // writer.close(); diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/库存汇总表-20221221.xlsx b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/库存汇总表-20221221.xlsx new file mode 100644 index 00000000..b638d576 Binary files /dev/null and b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/库存汇总表-20221221.xlsx differ diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/库存汇总表.xlsx b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/库存汇总表.xlsx index b638d576..2ee0c6fc 100644 Binary files a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/库存汇总表.xlsx and b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/库存汇总表.xlsx differ