Browse Source

供应商产能报表

huxy 3 years ago
parent
commit
d96393ebf2
15 changed files with 434 additions and 245 deletions
  1. 32 8
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/controller/DyeLossController.java
  2. 24 27
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/controller/SupplierCapacityController.java
  3. 16 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/dto/DyeLossDto.java
  4. 8 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/dto/SupplierCapacityDto.java
  5. 23 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/entity/vo/SupplierCapacityVo1.java
  6. 20 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/entity/vo/SupplierCapacityVo2.java
  7. 20 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/entity/vo/SupplierCapacityVo3.java
  8. 10 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/DyeLossMapper.java
  9. 7 12
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/SupplierCapacityMapper.java
  10. 72 18
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/xml/DyeLossMapper.xml
  11. 143 164
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/xml/SupplierCapacityMapper.xml
  12. 8 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/service/IDyeLossService.java
  13. 7 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/service/ISupplierCapacityService.java
  14. 23 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/service/impl/DyeLossServiceImpl.java
  15. 21 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/service/impl/SupplierCapacityServiceImpl.java

+ 32 - 8
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/controller/DyeLossController.java

@@ -3,13 +3,13 @@ package org.jeecg.modules.scas.controller;
 
 
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
-import org.jeecg.modules.scas.dto.SupplierCapacityDto;
+import org.jeecg.modules.scas.dto.DyeLossDto;
 import org.jeecg.modules.scas.entity.DyeLoss;
-import org.jeecg.modules.scas.entity.SupplierCapacity;
 import org.jeecg.modules.scas.service.IDyeLossService;
-import org.jeecg.modules.scas.service.ISupplierCapacityService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -25,6 +25,7 @@ import java.util.List;
 * @Date:   2022-04-12
 * @Version: V1.0
 */
+@Slf4j
 @Api(tags="染损报表")
 @RestController
 @RequestMapping("/scas/dyeLoss")
@@ -34,14 +35,37 @@ public class DyeLossController extends JeecgController<DyeLoss, IDyeLossService>
     private IDyeLossService dyeLossService;
 
     @AutoLog(value = "染损报表查询")
-    @RequestMapping(value = "/list2",method = RequestMethod.GET)
-    public List<DyeLoss> list2(){
-        return dyeLossService.select();
+    @ApiOperation(value="染损报表查询", notes="染损报表查询")
+    @RequestMapping(value = "/list",method = RequestMethod.GET)
+    public List<DyeLoss> list(DyeLossDto dyeLossDto){
+        return dyeLossService.select(dyeLossDto);
+    }
+
+    @AutoLog(value = "染损报表数据合计")
+    @ApiOperation(value="染损报表数据合计", notes="染损报表数据合计")
+    @RequestMapping(value = "/selectSum",method = RequestMethod.GET)
+    public List<DyeLoss> selectSum(){
+        return dyeLossService.selectSum();
+    }
+
+    @AutoLog(value = "按供应商名称按物料分组展现每个物料的染损")
+    @ApiOperation(value="按供应商名称按物料分组展现每个物料的染损", notes="按供应商名称按物料分组展现每个物料的染损")
+    @RequestMapping(value = "/vendor",method = RequestMethod.GET)
+    public List<DyeLoss> vendor(String name){
+        return dyeLossService.selectVendor(name);
+    }
+
+    @AutoLog(value = "按供应商分组展现每个供应商的染损")
+    @ApiOperation(value="按供应商分组展现每个供应商的染损", notes="按供应商分组展现每个供应商的染损")
+    @RequestMapping(value = "/cInvName",method = RequestMethod.GET)
+    public List<DyeLoss> cInvName(){
+        return dyeLossService.selectCInvName();
     }
 
     @AutoLog(value = "染损报表导出")
+    @ApiOperation(value="染损报表导出", notes="染损报表导出")
     @RequestMapping(value = "/excel",method = RequestMethod.GET)
-    public ModelAndView excel(){
-        return super.export("染损报表测试",DyeLoss.class,dyeLossService.select());
+    public ModelAndView  excel() {
+       return super.export("染损报表导出测试", DyeLoss.class,dyeLossService.excel());
     }
 }

+ 24 - 27
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/controller/SupplierCapacityController.java

@@ -13,8 +13,12 @@ import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.scas.dto.SupplierCapacityDto;
+import org.jeecg.modules.scas.entity.DyeLoss;
 import org.jeecg.modules.scas.entity.SupplierCapacity;
 import org.jeecg.modules.scas.entity.SyCostAllocationSummary;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo1;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo2;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo3;
 import org.jeecg.modules.scas.service.ISupplierCapacityService;
 import org.jeecgframework.poi.excel.ExcelExportUtil;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -54,39 +58,32 @@ public class SupplierCapacityController extends JeecgController<SupplierCapacity
       return Result.ok(SupplierCapacityService.selectList(supplierCapacityDto));
    }
 
-   @AutoLog(value = "供应商产能报表查询-通过条件查询")
+   /*@AutoLog(value = "供应商产能报表查询-通过条件查询")
    @ApiOperation(value="供应商产能报表查询-通过条件查询", notes="供应商产能报表查询-通过条件查询")
    @RequestMapping(value = "/list3",method = RequestMethod.GET)
    public Result<?> list3(SupplierCapacityDto supplierCapacityDto){
       System.out.println("supplierCapacityDto:"+supplierCapacityDto);
       return Result.ok(SupplierCapacityService.selectList2(supplierCapacityDto));
+   }*/
+
+   @AutoLog(value = "成本分配汇总-通过部门、供应商、月份excel导出")
+   @ApiOperation(value="成本分配汇总-通过部门、供应商、月份excel导出", notes="成本分配汇总-通过部门、供应商、月份excel导出")
+   @RequestMapping(value = "/excel1",method = RequestMethod.GET)
+   public ModelAndView  excel1() {
+      return super.export("供应商产能报表测试", SupplierCapacityVo1.class,SupplierCapacityService.excel1());
+   }
+
+   @AutoLog(value = "成本分配汇总-通过部门、月份excel导出")
+   @ApiOperation(value="成本分配汇总-通过部门、月份excel导出", notes="成本分配汇总-通过部门、月份excel导出")
+   @RequestMapping(value = "/excel2",method = RequestMethod.GET)
+   public ModelAndView  excel2() {
+      return super.export("供应商产能报表测试", SupplierCapacityVo2.class,SupplierCapacityService.excel2());
    }
 
-   @AutoLog(value = "成本分配汇总-通过条件excel导出")
-   @ApiOperation(value="成本分配汇总-通过条件excel导出", notes="成本分配汇总-通过条件excel导出")
-   @RequestMapping(value = "/excel",method = RequestMethod.GET)
-   public ModelAndView  excel(SupplierCapacityDto supplierCapacityDto,String fileName) {
-      List<ExcelExportEntity> entityList = new ArrayList<>();
-      Workbook wb = null;
-      if(supplierCapacityDto.getIOrderType()=="采购"){
-         wb=SupplierCapacityService.excel(supplierCapacityDto);
-      }else{
-         wb=SupplierCapacityService.excel2(supplierCapacityDto);
-      }
-      FileOutputStream fos = null;
-      try {
-         if(fileName!=null){
-            fos = new FileOutputStream(fileName);//导出路径
-         }else{
-            fos = new FileOutputStream("d://供应商产能报表测试.xls");
-         }
-         wb.write(fos);
-         fos.close();
-      } catch (FileNotFoundException e) {
-         e.printStackTrace();
-      } catch (IOException e) {
-         e.printStackTrace();
-      }
-      return null;
+   @AutoLog(value = "成本分配汇总-通过供应商、月份excel导出")
+   @ApiOperation(value="成本分配汇总-通过供应商、月份excel导出", notes="成本分配汇总-通过供应商、月份excel导出")
+   @RequestMapping(value = "/excel3",method = RequestMethod.GET)
+   public ModelAndView  excel3() {
+      return super.export("供应商产能报表测试", SupplierCapacityVo3.class,SupplierCapacityService.excel3());
    }
 }

+ 16 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/dto/DyeLossDto.java

@@ -0,0 +1,16 @@
+package org.jeecg.modules.scas.dto;
+
+import lombok.Data;
+
+@Data
+public class DyeLossDto {
+    private String cCode;//订单号
+    private String cVenName;//供应商名称
+    private String iOrderType;//订单类型
+    private String cPlanLotNumber;//计划单号
+    private String isosid;//销售订单号
+
+    private Integer pageNo=1;//当前页
+    private Integer pageSize=20;//页面大小
+
+}

+ 8 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/dto/SupplierCapacityDto.java

@@ -14,13 +14,17 @@ public class SupplierCapacityDto {
     private String iOrderType;//订单类型
     private int excelType;//导出类型
 
-    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+   /* @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-    private Date startDate;//开始日期
+    private Date startDate;//开始日期*/
 
-    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    /*@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-    private Date endDate;//结束日期
+    private Date endDate;//结束日期*/
+
+    private Integer startDate;//开始月份
+
+    private Integer endDate;//结束月份
 
     private Integer pageNo=1;//当前页
     private Integer pageSize=20;//页面大小

+ 23 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/entity/vo/SupplierCapacityVo1.java

@@ -0,0 +1,23 @@
+package org.jeecg.modules.scas.entity.vo;
+
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class SupplierCapacityVo1 {
+    @Excel(name = "部门", width = 15)
+    private String cDepCode;//部门
+    @Excel(name = "供应商", width = 15)
+    private String cVenCode;//供应商
+    @Excel(name = "统计数量", width = 15)
+    private BigDecimal iQuantity;//统计数量
+    @Excel(name = "累计入库数量", width = 15)
+    private BigDecimal iReceivedQTY;//累计入库数量
+    @Excel(name = "计划到货月份", width = 15)
+    private Integer arriveMonth;//计划到货月份
+    @Excel(name = "能耗", width = 15)
+    private BigDecimal coefficient;//能耗
+}

+ 20 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/entity/vo/SupplierCapacityVo2.java

@@ -0,0 +1,20 @@
+package org.jeecg.modules.scas.entity.vo;
+
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+import java.math.BigDecimal;
+
+@Data
+public class SupplierCapacityVo2 {
+    @Excel(name = "部门", width = 15)
+    private String cDepCode;//部门
+    @Excel(name = "统计数量", width = 15)
+    private BigDecimal iQuantity;//统计数量
+    @Excel(name = "累计入库数量", width = 15)
+    private BigDecimal iReceivedQTY;//累计入库数量
+    @Excel(name = "计划到货月份", width = 15)
+    private Integer arriveMonth;//计划到货月份
+    @Excel(name = "能耗", width = 15)
+    private BigDecimal coefficient;//能耗
+}

+ 20 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/entity/vo/SupplierCapacityVo3.java

@@ -0,0 +1,20 @@
+package org.jeecg.modules.scas.entity.vo;
+
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+import java.math.BigDecimal;
+
+@Data
+public class SupplierCapacityVo3 {
+    @Excel(name = "供应商", width = 15)
+    private String cVenCode;//供应商
+    @Excel(name = "统计数量", width = 15)
+    private BigDecimal iQuantity;//统计数量
+    @Excel(name = "累计入库数量", width = 15)
+    private BigDecimal iReceivedQTY;//累计入库数量
+    @Excel(name = "计划到货月份", width = 15)
+    private Integer arriveMonth;//计划到货月份
+    @Excel(name = "能耗", width = 15)
+    private BigDecimal coefficient;//能耗
+}

+ 10 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/DyeLossMapper.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.scas.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.scas.dto.DyeLossDto;
 import org.jeecg.modules.scas.entity.DyeLoss;
 
 import java.util.List;
@@ -12,5 +13,13 @@ import java.util.List;
  * @Version: V1.0
  */
 public interface DyeLossMapper extends BaseMapper<DyeLoss> {
-    List<DyeLoss> select();
+    List<DyeLoss> select(DyeLossDto dyeLossDto);
+
+    List<DyeLoss> selectSum();
+
+    List<DyeLoss> selectVendor(String name);
+
+    List<DyeLoss> selectCInvName();
+
+    List<DyeLoss> excel();
 }

+ 7 - 12
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/SupplierCapacityMapper.java

@@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.MapKey;
 import org.jeecg.modules.scas.dto.SupplierCapacityDto;
 import org.jeecg.modules.scas.entity.SupplierCapacity;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo1;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo2;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo3;
 
 import java.util.List;
 import java.util.Map;
@@ -17,19 +20,11 @@ import java.util.Map;
  */
 public interface SupplierCapacityMapper extends BaseMapper<SupplierCapacity> {
 
-    List<SupplierCapacity> select(SupplierCapacityDto supplierCapacityDto);
+    List<SupplierCapacity> querySelect(SupplierCapacityDto supplierCapacityDto);
 
-    List<SupplierCapacity> select2(SupplierCapacityDto supplierCapacityDto);
+    List<SupplierCapacityVo1> excel001();
 
-    List<Map<String, Object>> excel1();
+    List<SupplierCapacityVo2> excel002();
 
-    List<Map<String, Object>> excel2();
-
-    List<Map<String, Object>> excel3();
-
-    List<Map<String, Object>> excel4();
-
-    List<Map<String, Object>> excel5();
-
-    List<Map<String, Object>> excel6();
+    List<SupplierCapacityVo3> excel003();
 }

+ 72 - 18
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/xml/DyeLossMapper.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.scas.mapper.DyeLossMapper">
-    <select id="select" resultType="org.jeecg.modules.scas.entity.DyeLoss">
+    <select id="select" resultType="org.jeecg.modules.scas.entity.DyeLoss" parameterType="org.jeecg.modules.scas.dto.DyeLossDto">
         select * from
         (select	ROW_NUMBER() OVER(ORDER BY OM_MOMain.moid) index1,
         Inventory.cinvcode,--物料编码
@@ -17,14 +17,13 @@
 		iMaterialSendQty iQuantity3,--材料出库数
 		--(select sum(iQuantity) from rdrecords11 where OM_MODetails.MODetailsID=rdrecords11.iOMoDID) iQuantity3,--材料出库数
 
-
         (select sum(OM_MatSettleVouchs.iMSQuantity) from OM_MatSettleVouch
 				left join OM_MatSettleVouchs on OM_MatSettleVouchs.msid=OM_MatSettleVouch.msid
 				where OM_MODetails.MODetailsID=OM_MatSettleVouch.modetailsid) iMSQuantity,--核销数量
 
-		(1-iReceivedQTY/(select sum(OM_MatSettleVouchs.iMSQuantity) from OM_MatSettleVouch
+		(1-iReceivedQTY/NULLIF((select sum(OM_MatSettleVouchs.iMSQuantity) from OM_MatSettleVouch
 				left join OM_MatSettleVouchs on OM_MatSettleVouchs.msid=OM_MatSettleVouch.msid
-				where OM_MODetails.MODetailsID=OM_MatSettleVouch.modetailsid))*100 dyeLossRate--染损
+				where OM_MODetails.MODetailsID=OM_MatSettleVouch.modetailsid),0))*100 dyeLossRate--染损
 
         from OM_MOMain
         left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
@@ -32,16 +31,36 @@
         left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
         --left join OM_MatSettleVouch on  OM_MOMain.cCode=OM_MatSettleVouch.cMOCode
         --left join OM_MatSettleVouchs on OM_MatSettleVouchs.msid=OM_MatSettleVouch.msid
-        where Vendor.cVCCode='0105'
+        <where>
+            <if  test="true">
+                and  Vendor.cVCCode='0105'--染厂
+            </if>
+            <if  test="cCode!=null">
+                and cCode=#{cCode} -- 订单号
+            </if>
+            <if  test="cVenName!=null">
+                and cVenName=#{cVenName} -- 供应商名称
+            </if>
+            <if  test="iOrderType!=null">
+                and iOrderType=#{iOrderType} --订单类型
+            </if>
+            <if  test="cPlanLotNumber!=null">
+                and cPlanLotNumber=#{cPlanLotNumber} --计划单号
+            </if>
+            <if  test="isosid!=null">
+                and isosid=#{isosid} --销售订单号
+            </if>
+        </where>
         ) p	--计划时间
-        where p.index1&lt;=100 and p.index1&gt;=0;
+        where p.index1&gt;=${pageNo*pageSize-pageSize} and p.index1&lt;=${pageSize*pageNo}
     </select>
 
-    <select  id="selecCount" resultType="org.jeecg.modules.scas.entity.DyeLoss">
-        select  sum(OM_MODetails.iQuantity),
-				sum(iReceivedQTY),--入库数量
-				sum(iMaterialSendQty),
-				sum(iMSQuantity)--核销数量
+    <select  id="selectSum" resultType="org.jeecg.modules.scas.entity.DyeLoss">
+        --染损报表合计
+        select  sum(OM_MODetails.iQuantity) iQuantity2,
+				sum(iReceivedQTY) iQuantity3,--入库数量
+				sum(iMaterialSendQty) iMSQuantity,
+				sum(iMSQuantity) dyeLossRate--核销数量
         from OM_MOMain
         left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
         left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
@@ -51,9 +70,9 @@
         where Vendor.cVCCode='0105'
     </select>
     
-    <select id="selectVendor"  resultType="org.jeecg.modules.scas.entity.DyeLoss">--选择供应商按物料分组展现每个物料的染损
+    <select id="selectVendor"  resultType="org.jeecg.modules.scas.entity.DyeLoss" parameterType="java.lang.String">--选择供应商按物料分组展现每个物料的染损
        select 	Inventory.cInvName,--物料名称
-				sum(1-(iReceivedQTY/iMSQuantity))--核销数量
+				sum(1-(iReceivedQTY/iMSQuantity)) dyeLossRate--核销数量
         from OM_MOMain
         left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
         left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
@@ -61,17 +80,17 @@
 				left join OM_MatSettleVouch on  OM_MOMain.cCode=OM_MatSettleVouch.cMOCode
         left join OM_MatSettleVouchs on OM_MatSettleVouchs.msid=OM_MatSettleVouch.msid
         where Vendor.cVCCode='0105'
-				AND cVenName='象山伟民漂染有限公司'
+				AND cVenName=#{value}
 				GROUP BY Inventory.cInvName
 
     </select>
 
 
-    <select id="selectVendor"  resultType="org.jeecg.modules.scas.entity.DyeLoss">--按供应商分组展现每个供应商的染损
+    <select id="selectCInvName"  resultType="org.jeecg.modules.scas.entity.DyeLoss">--按供应商分组展现每个供应商的染损
        select 	cVenName,--供应商名称
-				sum(iReceivedQTY),--入库数量
-				sum(iMSQuantity),--核销数量
-				sum(1-(iReceivedQTY/iMSQuantity))--染损
+				sum(iReceivedQTY) iQuantity2,--入库数量
+				sum(iMSQuantity) iMSQuantity,--核销数量
+				sum(1-(iReceivedQTY/iMSQuantity)) dyeLossRate--染损
         from OM_MOMain
         left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
         left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
@@ -83,4 +102,39 @@
     </select>
 
 
+    <select id="excel" resultType="org.jeecg.modules.scas.entity.DyeLoss">
+        select * from
+        (select	ROW_NUMBER() OVER(ORDER BY OM_MOMain.moid) index1,
+        Inventory.cinvcode,--物料编码
+        Inventory.cInvName,--物料名称
+        OM_MODetails.cfree1 color,--颜色
+        cVenName cVenName,--供应商
+        OM_MOMain.cCode cCode,--订单号
+        OM_MODetails.iQuantity,--订单数量
+
+        iReceivedQTY iQuantity2,--采购入库数
+        --(select sum(iQuantity) from rdrecords01 where OM_MODetails.MODetailsID=rdrecords01.iOMoDID) iQuantity2,--采购入库数
+
+		iMaterialSendQty iQuantity3,--材料出库数
+		--(select sum(iQuantity) from rdrecords11 where OM_MODetails.MODetailsID=rdrecords11.iOMoDID) iQuantity3,--材料出库数
+
+        (select sum(OM_MatSettleVouchs.iMSQuantity) from OM_MatSettleVouch
+				left join OM_MatSettleVouchs on OM_MatSettleVouchs.msid=OM_MatSettleVouch.msid
+				where OM_MODetails.MODetailsID=OM_MatSettleVouch.modetailsid) iMSQuantity,--核销数量
+
+		(1-iReceivedQTY/NULLIF((select sum(OM_MatSettleVouchs.iMSQuantity) from OM_MatSettleVouch
+				left join OM_MatSettleVouchs on OM_MatSettleVouchs.msid=OM_MatSettleVouch.msid
+				where OM_MODetails.MODetailsID=OM_MatSettleVouch.modetailsid),0))*100 dyeLossRate--染损
+
+        from OM_MOMain
+        left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
+        left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
+        left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
+        --left join OM_MatSettleVouch on  OM_MOMain.cCode=OM_MatSettleVouch.cMOCode
+        --left join OM_MatSettleVouchs on OM_MatSettleVouchs.msid=OM_MatSettleVouch.msid
+        where Vendor.cVCCode='0105'
+        ) p	--计划时间
+    </select>
+
+
 </mapper>

+ 143 - 164
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/xml/SupplierCapacityMapper.xml

@@ -1,58 +1,34 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.scas.mapper.SupplierCapacityMapper">
-    <select id="select" resultType="org.jeecg.modules.scas.entity.SupplierCapacity" parameterType="org.jeecg.modules.scas.dto.SupplierCapacityDto">
-        select * from
-            (select	ROW_NUMBER() OVER(ORDER BY PO_Pomain.poid) index1,
-                PO_Pomain.cPOID csrccode,
-                PlanLotNumber cPlanLotNumber,
-                cDepname cDepCode,
-                cPersonName cPersonCode,
-                cVenName cVenCode,
-                cVCName cVenCodeType,
-                '采购订单' iOrderType,
-                iQuantity,
-                iReceivedQTY,
-                cComUnitName unit,
-                month(dArriveDate) arriveMonth,
-                dArriveDate,
-                isnull(Inventory.cInvDefine1,'0') coefficient
-            from PO_Pomain
-                left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
-                left join Department on  Department.cdepcode=PO_Pomain.cDepCode
-                left join Person on	Person.cPersonCode=PO_Pomain.cPersonCode
-                left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
-                left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
-                left join ComputationUnit on PO_Podetails.cUnitID=ComputationUnit.cComunitCode
-                left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
-            <where>
-                <if test="csrccode!=null">
-                    AND PO_Pomain.cPOID=#{csrccode} --订单号
-                </if>
-                <if test="iOrderType!=null">
-                    AND	PO_Podetails.iOrderType=#{iOrderType}		--订单类型
-                </if>
-                <if test="cVenCode!=null">
-                    AND Vendor.cVenName=#{cVenCode}		--供应商名称
-                </if>
-                <if test="cPlanLotNumber!=null">
-                    AND PO_Podetails.planlotnumber=#{cPlanLotNumber}	--计划单号
-                </if>
-                <if test="startDate!=null">
-                    AND PO_Podetails.darriveDate&gt;=#{startDate}  --起始日期
-                </if>
-                <if test="endDate!=null">
-                    AND PO_Podetails.darriveDate&lt;=#{endDate}   --结束日期
-                </if>
-            </where>
-            ) p	--计划时间
-        where p.index1&gt;=${pageNo*pageSize-pageSize} and p.index1&lt;=${pageSize*pageNo}
-
-    </select>
 
-    <select id="select2" resultType="org.jeecg.modules.scas.entity.SupplierCapacity"  parameterType="org.jeecg.modules.scas.dto.SupplierCapacityDto">
-        select * from
-        (select	ROW_NUMBER() OVER(ORDER BY OM_MOMain.moid) index1,
+    <select id="querySelect" resultType="org.jeecg.modules.scas.entity.SupplierCapacity"  parameterType="org.jeecg.modules.scas.dto.SupplierCapacityDto">
+        select  * from
+        (select ROW_NUMBER() OVER(ORDER BY cVenCode) index1,* from
+        (select	--ROW_NUMBER() OVER(ORDER BY PO_Pomain.poid) index1,
+        PO_Pomain.cPOID csrccode,
+        PlanLotNumber cPlanLotNumber,
+        cDepname cDepCode,
+        cPersonName cPersonCode,
+        cVenName cVenCode,
+        cVCName cVenCodeType,
+        '采购订单' iOrderType,
+        iQuantity,
+        iReceivedQTY,
+        cComUnitName unit,
+        month(dArriveDate) arriveMonth,
+        dArriveDate,
+        isnull(Inventory.cInvDefine1,0) coefficient
+        from PO_Pomain
+        left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
+        left join Department on  Department.cdepcode=PO_Pomain.cDepCode
+        left join Person on	Person.cPersonCode=PO_Pomain.cPersonCode
+        left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
+        left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
+        left join ComputationUnit on PO_Podetails.cUnitID=ComputationUnit.cComunitCode
+        left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
+        union
+        select	--ROW_NUMBER() OVER(ORDER BY OM_MOMain.moid) index1,
         OM_MOMain.cCode csrccode,
         cPlanLotNumber,
         cDepname cDepCode,
@@ -65,7 +41,7 @@
         cComUnitName unit,
         month(dArriveDate) arriveMonth,
         dArriveDate,
-        isnull(Inventory.cInvDefine1,'0') coefficient
+        isnull(Inventory.cInvDefine1,0) coefficient
         from OM_MOMain
         left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
         left join Department on  Department.cdepcode=OM_MOMain.cDepCode
@@ -74,89 +50,91 @@
         left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
         left join ComputationUnit on OM_MODetails.cUnitID=ComputationUnit.cComunitCode
         left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
+        ) p
         <where>
             <if test="csrccode!=null">
-                AND  OM_MOMain.cCode=#{csrccode} --订单号
+                and csrccode=#{csrccode}----订单号
             </if>
             <if test="iOrderType!=null">
-                AND	OM_MOMain.iOrderType=#{iOrderType}		--订单类型
+                AND iOrderType=#{iOrderType}--订单类型
             </if>
             <if test="cVenCode!=null">
-                AND Vendor.cVenName=#{cVenCode}		--供应商名称
+                and cVenCode=#{cVenCode}--供应商
             </if>
             <if test="cPlanLotNumber!=null">
-                AND OM_MODetails.cplanlotnumber=#{cPlanLotNumber}	--计划单号
+                and cPlanLotNumber=#{cPlanLotNumber}--计划单号
             </if>
             <if test="startDate!=null">
-                AND OM_MODetails.darriveDate&gt;=#{startDate}  --起始日期
+                and arriveMonth&gt;=$#{startDate}  --起始日期
             </if>
             <if test="endDate!=null">
-                AND OM_MODetails.darriveDate&lt;=#{endDate}   --结束日期
+                and arriveMonth&lt;=$#{endDate}   --结束日期
             </if>
         </where>
-        ) p	--计划时间
-        where p.index1&gt;=${pageNo*pageSize-pageSize} and p.index1&lt;=${pageSize*pageNo}
+        )s
+        --where s.index1&gt;=$100 and s.index1&lt;=$0
+        where s.index1&gt;=${pageNo*pageSize-pageSize} and s.index1&lt;=${pageSize*pageNo}
     </select>
 
-    <resultMap type="java.util.HashMap" id="getSupplierCapacity">
-        <!-- 主键 -->
-        <id column="index1" property="index1"/>
-        <!-- 非主键 -->
-        <result column="arriveMonth" property="arriveMonth"/>
-        <result column="iQuantity" property="iQuantity"/>
-        <result column="iReceivedQTY" property="iReceivedQTY"/>
-        <result column="coefficient" property="coefficient"/>
-        <result column="cVenCode" property="cVenCode"/>
-        <result column="cDepCode" property="cDepCode"/>
-    </resultMap>
-
-
-    <select  id="excel1" resultMap="getSupplierCapacity">
-        --部门	供应商	月份	数量	累计入库数量	能耗(能耗相加的汇总)
-            select  ROW_NUMBER() OVER(ORDER BY cVenName) index1,
-                    cDepname cDepCode,
-					cVenName cVenCode,
-					month(dArriveDate) arriveMonth,
-					sum(iQuantity) iQuantity,
-					sum(iReceivedQTY) iReceivedQTY,
-					sum(cast(isnull(cInvDefine1,'0') as decimal)) coefficient
-					from PO_Pomain
-					left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
-					left join Department on  Department.cdepcode=PO_Pomain.cDepCode
-					left join Person on	Person.cPersonCode=PO_Pomain.cPersonCode
-					left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
-					left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
-					left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
-					group by cVenName,cDepname,month(dArriveDate)
-    </select>
-
-    <select  id="excel2" resultMap="getSupplierCapacity">
-        --供应商	月份	数量	累计入库数量	能耗
-            select	ROW_NUMBER() OVER(ORDER BY cVenName) index1,
-                    cVenName cVenCode,
-					month(dArriveDate) arriveMonth,
-					sum(iQuantity) iQuantity,
-					sum(iReceivedQTY) iReceivedQTY,
-					sum(cast(isnull(cInvDefine1,'0') as decimal)) coefficient
-					from PO_Pomain
-					left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
-					left join Department on  Department.cdepcode=PO_Pomain.cDepCode
-					left join Person on	Person.cPersonCode=PO_Pomain.cPersonCode
-					left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
-					left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
-					left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
-					group by cVenName,month(dArriveDate)
+    <select id="excel001" resultType="org.jeecg.modules.scas.entity.vo.SupplierCapacityVo1">
+        --部门	供应商	月份	数量	累计入库数量	能耗(能耗相加的汇总)--汇合
+    select
+        p.cDepCode,
+        p.cVenCode,
+        p.arriveMonth,
+        sum(p.iQuantity) iQuantity,
+        sum(p.iReceivedQTY) iReceivedQTY,
+        sum(p.coefficient) coefficient
+         from (
+            select  cDepname cDepCode,
+				cVenName cVenCode,
+				month(dArriveDate) arriveMonth,
+				iQuantity iQuantity,
+				iReceivedQTY iReceivedQTY,
+				cast(isnull(cInvDefine1,'0') as decimal) coefficient
+				from PO_Pomain
+				left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
+				left join Department on  Department.cdepcode=PO_Pomain.cDepCode
+				left join Person on	Person.cPersonCode=PO_Pomain.cPersonCode
+				left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
+				left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
+				left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
+				--order by cDepCode,cVenCode,arriveMonth
+					UNION
+            select	cDepname cDepCode,
+				cVenName cVenCode,
+				month(dArriveDate) arriveMonth,
+				iQuantity,
+				iReceivedQTY,
+				cast(isnull(cInvDefine1,'0') as decimal) coefficient
+				from OM_MOMain
+				left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
+				left join Department on  Department.cdepcode=OM_MOMain.cDepCode
+				left join Person on	Person.cPersonCode=OM_MOMain.cPersonCode
+				left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
+				left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
+				left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
+				--order by cDepCode,cVenCode,arriveMonth
+        )p
+        group by p.cDepCode,p.cVenCode,p.arriveMonth
+        order by p.cDepCode,p.cVenCode,p.arriveMonth
     </select>
 
+    <select id="excel002" resultType="org.jeecg.modules.scas.entity.vo.SupplierCapacityVo2">
 
-    <select  id="excel3" resultMap="getSupplierCapacity">
-            --部门	月份	数量	累计入库数量	能耗
-            select  ROW_NUMBER() OVER(ORDER BY cDepname) index1,
-                	cDepname cDepCode,
+         --部门	月份	数量	累计入库数量	能耗(能耗相加的汇总)
+        select  p.cDepCode,
+                p.arriveMonth,
+                sum(p.iQuantity) iQuantity,
+                sum(p.iReceivedQTY) iReceivedQTY,
+                sum(p.coefficient) coefficient
+                from(
+                select
+                    cDepname cDepCode,
 					month(dArriveDate) arriveMonth,
-					sum(iQuantity) iQuantity,
-					sum(iReceivedQTY) iReceivedQTY,
-					sum(cast(isnull(cInvDefine1,'0') as decimal)) coefficient
+					iQuantity,
+					iReceivedQTY,
+					cast(isnull(cInvDefine1,'0') as decimal) coefficient
 					from PO_Pomain
 					left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
 					left join Department on  Department.cdepcode=PO_Pomain.cDepCode
@@ -164,39 +142,13 @@
 					left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
 					left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
 					left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
-					group by cDepname,month(dArriveDate)
-    </select>
-
-
-    <!--以下为委外导出-->
-    <select  id="excel4" resultMap="getSupplierCapacity">
-        --部门	供应商	月份	数量	累计入库数量	能耗(能耗相加的汇总)
-        select  ROW_NUMBER() OVER(ORDER BY cVenName) index1,
-                cDepname cDepCode,
-                cVenName cVenCode,
-                month(dArriveDate) arriveMonth,
-                sum(iQuantity) iQuantity,
-                sum(iReceivedQTY) iReceivedQTY,
-                sum(cast(isnull(cInvDefine1,'0') as decimal)) coefficient
-                from OM_MOMain
-                left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
-                left join Department on  Department.cdepcode=OM_MOMain.cDepCode
-                left join Person on	Person.cPersonCode=OM_MOMain.cPersonCode
-                left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
-                left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
-                left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
-                group by cVenName,cDepname,month(dArriveDate)
-
-    </select>
-
-    <select  id="excel5" resultMap="getSupplierCapacity">
-        --供应商	月份	数量	累计入库数量	能耗
-            select	ROW_NUMBER() OVER(ORDER BY cVenName) index1,
-                    cVenName cVenCode,
+            UNION
+                    select
+                      cDepname cDepCode,
 					month(dArriveDate) arriveMonth,
-					sum(iQuantity) iQuantity,
-					sum(iReceivedQTY) iReceivedQTY,
-					sum(cast(isnull(cInvDefine1,'0') as decimal)) coefficient
+					iQuantity,
+					iReceivedQTY,
+					cast(isnull(cInvDefine1,'0') as decimal) coefficient
 					from OM_MOMain
 					left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
 					left join Department on  Department.cdepcode=OM_MOMain.cDepCode
@@ -204,25 +156,52 @@
 					left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
 					left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
 					left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
-					group by cVenName,month(dArriveDate)
+                )p
+					group by p.cDepCode,p.arriveMonth
+					order  by p.cDepCode,p.arriveMonth
     </select>
 
 
-    <select  id="excel6" resultMap="getSupplierCapacity">
-            --部门	月份	数量	累计入库数量	能耗
-            select  ROW_NUMBER() OVER(ORDER BY cDepname) index1,
-                	cDepname cDepCode,
-					month(dArriveDate) arriveMonth,
-					sum(iQuantity) iQuantity,
-					sum(iReceivedQTY) iReceivedQTY,
-					sum(cast(isnull(cInvDefine1,'0') as decimal)) coefficient
-					from OM_MOMain
-					left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
-					left join Department on  Department.cdepcode=OM_MOMain.cDepCode
-					left join Person on	Person.cPersonCode=OM_MOMain.cPersonCode
-					left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
-					left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
-					left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
-					group by cDepname,month(dArriveDate)
+    <select id="excel003" resultType="org.jeecg.modules.scas.entity.vo.SupplierCapacityVo3">
+         --供应商	月份	数量	累计入库数量	能耗(能耗相加的汇总)
+    select
+        p.cVenCode,
+        p.arriveMonth,
+        sum(p.iQuantity) iQuantity,
+        sum(p.iReceivedQTY) iReceivedQTY,
+        sum(p.coefficient) coefficient
+         from(
+        select	ROW_NUMBER() OVER(ORDER BY cVenName) index1,
+            cVenName cVenCode,
+            month(dArriveDate) arriveMonth,
+            iQuantity iQuantity,
+            iReceivedQTY iReceivedQTY,
+            cast(isnull(cInvDefine1,'0') as decimal) coefficient
+            from PO_Pomain
+            left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
+            left join Department on  Department.cdepcode=PO_Pomain.cDepCode
+            left join Person on	Person.cPersonCode=PO_Pomain.cPersonCode
+            left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
+            left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
+            left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
+        union
+        select	ROW_NUMBER() OVER(ORDER BY cVenName) index1,
+            cVenName cVenCode,
+            month(dArriveDate) arriveMonth,
+            iQuantity iQuantity,
+            iReceivedQTY iReceivedQTY,
+            cast(isnull(cInvDefine1,'0') as decimal) coefficient
+            from OM_MOMain
+            left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
+            left join Department on  Department.cdepcode=OM_MOMain.cDepCode
+            left join Person on	Person.cPersonCode=OM_MOMain.cPersonCode
+            left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
+            left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
+            left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
+    )p group by p.cVenCode,p.arriveMonth
+         order by p.cVenCode,p.arriveMonth
+
+
     </select>
+
 </mapper>

+ 8 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/service/IDyeLossService.java

@@ -2,13 +2,20 @@ package org.jeecg.modules.scas.service;
 
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.scas.dto.DyeLossDto;
 import org.jeecg.modules.scas.entity.DyeLoss;
 
 import java.util.List;
 
 public interface IDyeLossService extends IService<DyeLoss> {
 
-    List<DyeLoss> select();
+    List<DyeLoss> select(DyeLossDto dyeLossDto);
 
+    List<DyeLoss> selectSum();
 
+    List<DyeLoss> selectVendor(String name);
+
+    List<DyeLoss> selectCInvName();
+
+    List<DyeLoss> excel();
 }

+ 7 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/service/ISupplierCapacityService.java

@@ -4,6 +4,9 @@ import org.apache.poi.ss.usermodel.Workbook;
 import org.jeecg.modules.scas.dto.SupplierCapacityDto;
 import org.jeecg.modules.scas.entity.SupplierCapacity;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo1;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo2;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo3;
 
 import java.util.List;
 import java.util.Map;
@@ -13,9 +16,10 @@ public interface ISupplierCapacityService extends IService<SupplierCapacity> {
 
     List<SupplierCapacity> selectList(SupplierCapacityDto supplierCapacityDto);
 
-    List<SupplierCapacity> selectList2(SupplierCapacityDto supplierCapacityDto);
 
-    Workbook excel(SupplierCapacityDto supplierCapacityDto);
+    List<SupplierCapacityVo1> excel1();
 
-    Workbook excel2(SupplierCapacityDto supplierCapacityDto);
+    List<SupplierCapacityVo2> excel2();
+
+    List<SupplierCapacityVo3> excel3();
 }

+ 23 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/service/impl/DyeLossServiceImpl.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.scas.service.impl;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.scas.dto.DyeLossDto;
 import org.jeecg.modules.scas.entity.DyeLoss;
 import org.jeecg.modules.scas.mapper.DyeLossMapper;
 import org.jeecg.modules.scas.service.IDyeLossService;
@@ -19,7 +20,27 @@ public class DyeLossServiceImpl extends ServiceImpl<DyeLossMapper, DyeLoss> impl
 
 
     @DS("multi-one")
-    public List<DyeLoss> select() {
-        return dyeLossMapper.select();
+    public List<DyeLoss> select(DyeLossDto dyeLossDto) {
+        return dyeLossMapper.select(dyeLossDto);
+    }
+
+    @DS("multi-one")
+    public List<DyeLoss> selectSum() {
+        return dyeLossMapper.selectSum();
+    }
+
+    @DS("multi-one")
+    public List<DyeLoss> selectVendor(String name) {
+        return dyeLossMapper.selectVendor(name);
+    }
+
+    @DS("multi-one")
+    public List<DyeLoss> selectCInvName() {
+        return dyeLossMapper.selectCInvName();
+    }
+
+    @DS("multi-one")
+    public List<DyeLoss> excel() {
+        return dyeLossMapper.excel();
     }
 }

+ 21 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/service/impl/SupplierCapacityServiceImpl.java

@@ -6,6 +6,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.jeecg.modules.scas.dto.SupplierCapacityDto;
 import org.jeecg.modules.scas.entity.SupplierCapacity;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo1;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo2;
+import org.jeecg.modules.scas.entity.vo.SupplierCapacityVo3;
 import org.jeecg.modules.scas.mapper.SupplierCapacityMapper;
 import org.jeecg.modules.scas.service.ISupplierCapacityService;
 import org.jeecgframework.poi.excel.ExcelExportUtil;
@@ -26,17 +29,30 @@ public class SupplierCapacityServiceImpl extends ServiceImpl<SupplierCapacityMap
 
     @DS("multi-one")
     public List<SupplierCapacity> selectList(SupplierCapacityDto supplierCapacityDto){
-        return supplierCapacityMapper.select(supplierCapacityDto);
+        return supplierCapacityMapper.querySelect(supplierCapacityDto);
     }
 
     @DS("multi-one")
-    public List<SupplierCapacity> selectList2(SupplierCapacityDto supplierCapacityDto) {
-        return supplierCapacityMapper.select2(supplierCapacityDto);
+    public List<SupplierCapacityVo1> excel1() {
+        return supplierCapacityMapper.excel001();
     }
 
-
+    @DS("multi-one")
+    public List<SupplierCapacityVo2> excel2() {
+        return supplierCapacityMapper.excel002();
+    }
 
     @DS("multi-one")
+    public List<SupplierCapacityVo3> excel3() {
+        return supplierCapacityMapper.excel003();
+    }
+
+
+
+
+
+
+    /*@DS("multi-one")
     public Workbook excel(SupplierCapacityDto supplierCapacityDto) {
         List<ExcelExportEntity> entityList = new ArrayList<>();
         int row=supplierCapacityDto.getExcelType();
@@ -82,5 +98,5 @@ public class SupplierCapacityServiceImpl extends ServiceImpl<SupplierCapacityMap
         entityList.add(new ExcelExportEntity("累计入库数量","iReceivedQTY",30));
         entityList.add(new ExcelExportEntity("系数","coefficient",30));
         return ExcelExportUtil.exportExcel(new ExportParams("供应商产能报表测试", "供应商产能报表测试"),entityList,dataList);
-    }
+    }*/
 }