hongxudong 1 год назад
Родитель
Сommit
bd7ec9c747
47 измененных файлов с 1874 добавлено и 73 удалено
  1. 28 0
      src/main/java/com/dk/mdm/controller/report/ReportController.java
  2. 63 63
      src/main/java/com/dk/mdm/mapper/report/ReportMapper.xml
  3. 2 2
      src/main/java/com/dk/mdm/model/query/wxapi/basic/WxCommonQuery.java
  4. 17 0
      src/main/java/com/dk/mdm/model/report/ExcelDataHandler.java
  5. 80 0
      src/main/java/com/dk/mdm/model/report/ExcelExportStyleImpl.java
  6. 14 0
      src/main/java/com/dk/mdm/model/report/ExcelIndex.java
  7. 15 0
      src/main/java/com/dk/mdm/model/report/Util.java
  8. 31 0
      src/main/java/com/dk/mdm/model/report/analysis/BudgetQuotation.java
  9. 31 0
      src/main/java/com/dk/mdm/model/report/analysis/BudgetQuotationStaff.java
  10. 31 0
      src/main/java/com/dk/mdm/model/report/analysis/PotentialCustomerAnalysis.java
  11. 31 0
      src/main/java/com/dk/mdm/model/report/analysis/PotentialCustomerAnalysisStaff.java
  12. 38 0
      src/main/java/com/dk/mdm/model/report/department/DepartmentCollectionRanking.java
  13. 39 0
      src/main/java/com/dk/mdm/model/report/department/DepartmentTransactionRanking.java
  14. 31 0
      src/main/java/com/dk/mdm/model/report/from/Offer.java
  15. 26 0
      src/main/java/com/dk/mdm/model/report/from/PotentialCustomerAnalysisFrom.java
  16. 33 0
      src/main/java/com/dk/mdm/model/report/from/Transaction.java
  17. 32 0
      src/main/java/com/dk/mdm/model/report/product/ProductDistribution.java
  18. 35 0
      src/main/java/com/dk/mdm/model/report/received/ArrearsInfo.java
  19. 35 0
      src/main/java/com/dk/mdm/model/report/received/ArrearsInfoStaff.java
  20. 37 0
      src/main/java/com/dk/mdm/model/report/received/ReceivedTask.java
  21. 37 0
      src/main/java/com/dk/mdm/model/report/received/ReceivedTaskStaff.java
  22. 32 0
      src/main/java/com/dk/mdm/model/report/sale/ActivityEffect1.java
  23. 32 0
      src/main/java/com/dk/mdm/model/report/sale/ActivityEffect2.java
  24. 37 0
      src/main/java/com/dk/mdm/model/report/sale/CustomerUnitPrice.java
  25. 37 0
      src/main/java/com/dk/mdm/model/report/sale/CustomerUnitPriceStaff.java
  26. 40 0
      src/main/java/com/dk/mdm/model/report/sale/CustomizedWisdom1.java
  27. 40 0
      src/main/java/com/dk/mdm/model/report/sale/CustomizedWisdom2.java
  28. 40 0
      src/main/java/com/dk/mdm/model/report/sale/CustomizedWisdomStaff1.java
  29. 40 0
      src/main/java/com/dk/mdm/model/report/sale/CustomizedWisdomStaff2.java
  30. 35 0
      src/main/java/com/dk/mdm/model/report/sale/OrgCategoryAmt.java
  31. 32 0
      src/main/java/com/dk/mdm/model/report/sale/OrgCategoryQty.java
  32. 34 0
      src/main/java/com/dk/mdm/model/report/sale/OrgSpuAmt.java
  33. 33 0
      src/main/java/com/dk/mdm/model/report/sale/OrgSpuQty.java
  34. 38 0
      src/main/java/com/dk/mdm/model/report/sale/ReturnSituation.java
  35. 38 0
      src/main/java/com/dk/mdm/model/report/sale/ReturnSituationStaff.java
  36. 37 0
      src/main/java/com/dk/mdm/model/report/sale/SaleTask.java
  37. 37 0
      src/main/java/com/dk/mdm/model/report/sale/SaleTaskStaff.java
  38. 33 0
      src/main/java/com/dk/mdm/model/report/sale/StaffCategoryAmt.java
  39. 33 0
      src/main/java/com/dk/mdm/model/report/sale/StaffCategoryQty.java
  40. 33 0
      src/main/java/com/dk/mdm/model/report/sale/StaffSpuAmt.java
  41. 33 0
      src/main/java/com/dk/mdm/model/report/sale/StaffSpuQty.java
  42. 40 0
      src/main/java/com/dk/mdm/model/report/sale/categoryRanking.java
  43. 39 0
      src/main/java/com/dk/mdm/model/report/sale/orgRanking.java
  44. 39 0
      src/main/java/com/dk/mdm/model/report/sale/staffRanking.java
  45. 37 0
      src/main/java/com/dk/mdm/model/report/staff/StaffCollectionRanking.java
  46. 39 0
      src/main/java/com/dk/mdm/model/report/staff/StaffTransactionRanking.java
  47. 280 8
      src/main/java/com/dk/mdm/service/report/ReportService.java

+ 28 - 0
src/main/java/com/dk/mdm/controller/report/ReportController.java

@@ -3,8 +3,10 @@ package com.dk.mdm.controller.report;
 import com.alibaba.fastjson.JSONObject;
 import com.dk.common.controller.BaseController;
 import com.dk.common.model.pojo.PageList;
+import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
 import com.dk.common.service.BaseService;
+import com.dk.common.util.RedisUtil;
 import com.dk.mdm.service.common.CommonService;
 import com.dk.mdm.service.report.ReportService;
 import com.google.gson.JsonObject;
@@ -13,8 +15,10 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 import java.util.Map;
+import java.util.UUID;
 
 /**
  * @desc   : 报表数据源
@@ -29,6 +33,9 @@ public class ReportController  {
     @Autowired
     private ReportService reportService;
 
+    @Autowired
+    private RedisUtil redisUtil;
+
     @ApiOperation(
             value = "获取库存",
             notes = "获取库存"
@@ -237,7 +244,28 @@ public class ReportController  {
         return reportService.getReportBatch(params);
     }
 
+    /**
+     * @desc   : 导出的uuid
+     * @author : 洪旭东
+     * @date   : 2024-05-08 11:50
+     */
+    @PostMapping("export_push_params")
+    public ResponseResultVO<String> exportPushParams(@RequestBody Map<String,Object> map){
+        String paramsUuid = UUID.randomUUID().toString();
+        redisUtil.set(paramsUuid,map);
+        redisUtil.expire(paramsUuid,120);
+        return ResponseResultUtil.success(paramsUuid);
+    }
 
+    /**
+     * @desc   : 导出
+     * @author : 洪旭东
+     * @date   : 2024-05-09 13:39
+     */
+    @GetMapping("export")
+    public void export(HttpServletResponse response, @RequestParam("uuid")String uuid) throws Exception {
+        reportService.export(response,uuid);
+    }
 
 }
 

+ 63 - 63
src/main/java/com/dk/mdm/mapper/report/ReportMapper.xml

@@ -2317,323 +2317,323 @@
     <select id="getReportBatch" resultType="Map">
         <!-- 我的页面 助手部分 -->
         <if test="param.type == 'f_my_sale_info'">
-            select f_my_sale_info as report from "dkic_b"."f_my_sale_info"(#{param.cpId}, #{param.orgId}, #{param.userId},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'))
+            select f_my_sale_info as report from "dkic_b"."f_my_sale_info"(#{param.cpId}, #{param.orgId}, #{param.userId, typeHandler=UuidTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'))
         </if>
 
         <!-- 我的页面 销售业务进度 月 -->
         <if test="param.type == 'f_kpi_order_rate_month'">
-            select f_kpi_order_rate_month as report from "dkic_b"."f_kpi_order_rate_month"(to_date(#{param.rateDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgId},#{param.userId})
+            select f_kpi_order_rate_month as report from "dkic_b"."f_kpi_order_rate_month"(to_date(#{param.rateDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgId},#{param.userId, typeHandler=UuidTypeHandler})
         </if>
         <!-- 我的页面 销售业务进度 年 -->
         <if test="param.type == 'f_kpi_order_rate_year'">
-            select f_kpi_order_rate_year as report from "dkic_b"."f_kpi_order_rate_year"(to_date(#{param.rateDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgId},#{param.userId})
+            select f_kpi_order_rate_year as report from "dkic_b"."f_kpi_order_rate_year"(to_date(#{param.rateDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgId},#{param.userId, typeHandler=UuidTypeHandler})
         </if>
         <!-- 我的页面 收款任务进度 月 -->
         <if test="param.type == 'f_kpi_repay_rate_month'">
-            select f_kpi_repay_rate_month as report from "dkic_b"."f_kpi_repay_rate_month"(to_date(#{param.rateDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgId},#{param.userId})
+            select f_kpi_repay_rate_month as report from "dkic_b"."f_kpi_repay_rate_month"(to_date(#{param.rateDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgId},#{param.userId, typeHandler=UuidTypeHandler})
         </if>
         <!-- 我的页面 收款任务进度 年 -->
         <if test="param.type == 'f_kpi_repay_rate_year'">
-            select f_kpi_repay_rate_year as report from "dkic_b"."f_kpi_repay_rate_year"(to_date(#{param.rateDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgId},#{param.userId})
+            select f_kpi_repay_rate_year as report from "dkic_b"."f_kpi_repay_rate_year"(to_date(#{param.rateDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgId},#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <!-- 报表页面 销售分析 -->
         <if test="param.type == 'f_report_order_analysis_home'">
-            select f_report_order_analysis_home as report from "dkic_b"."f_report_order_analysis_home"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.userId})
+            select f_report_order_analysis_home as report from "dkic_b"."f_report_order_analysis_home"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.userId, typeHandler=UuidTypeHandler})
         </if>
         <!-- 报表页面 收款分析 -->
         <if test="param.type == 'f_report_repay_analysis'">
-            select f_report_repay_analysis as report from "dkic_b"."f_report_repay_analysis"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.userId})
+            select f_report_repay_analysis as report from "dkic_b"."f_report_repay_analysis"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.userId, typeHandler=UuidTypeHandler})
         </if>
         <!-- 报表页面 客户分析 -->
         <if test="param.type == 'f_report_csm_analysis_home'">
-            select f_report_csm_analysis_home as report from "dkic_b"."f_report_csm_analysis_home"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId})
+            select f_report_csm_analysis_home as report from "dkic_b"."f_report_csm_analysis_home"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
 
         <!-- 图形部分 -->
         <!-- 报表页面 客户来源分布 -->
         <if test="param.type == 'f_report_csm_from_order'">
-            select f_report_csm_from_order as report from "dkic_b"."f_report_csm_from_order"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId})
+            select f_report_csm_from_order as report from "dkic_b"."f_report_csm_from_order"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <!-- 报表页面 产品分布 -->
         <if test="param.type == 'f_report_spu_analysis'">
-            select f_report_spu_analysis as report from "dkic_b"."f_report_spu_analysis"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId})
+            select f_report_spu_analysis as report from "dkic_b"."f_report_spu_analysis"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <!-- 报表页面 部门成交 -->
         <if test="param.type == 'f_report_index_org_order'">
-            select f_report_index_org_order as report from "dkic_b"."f_report_index_org_order"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.userId})
+            select f_report_index_org_order as report from "dkic_b"."f_report_index_org_order"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <!-- 报表页面 部门收款 -->
         <if test="param.type == 'f_report_index_org_repay'">
-            select f_report_index_org_repay as report from "dkic_b"."f_report_index_org_repay"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.userId})
+            select f_report_index_org_repay as report from "dkic_b"."f_report_index_org_repay"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <!-- 报表页面 业务员成交 -->
         <if test="param.type == 'f_report_index_staff_order'">
-            select f_report_index_staff_order as report from "dkic_b"."f_report_index_staff_order"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},#{param.userId})
+            select f_report_index_staff_order as report from "dkic_b"."f_report_index_staff_order"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <!-- 报表页面 业务员收款 -->
         <if test="param.type == 'f_report_index_staff_repay'">
-            select f_report_index_staff_repay as report from "dkic_b"."f_report_index_staff_repay"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},#{param.userId})
+            select f_report_index_staff_repay as report from "dkic_b"."f_report_index_staff_repay"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <!-- 明细页面 收款分析-收款任务 f_report_index_org_repay 部分收款同一个函数-->
 
         <!-- 明细页面 收款分析-欠款情况 -->
         <if test="param.type == 'f_report_repay_debt'">
-            select f_report_repay_debt as report from "dkic_b"."f_report_repay_debt"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.userId})
+            select f_report_repay_debt as report from "dkic_b"."f_report_repay_debt"(to_date(#{param.monthDate},'yyyy-MM-dd'),#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <!-- 明细页面 客户分析-报价 -->
         <if test="param.type == 'f_report_csm_analysis_offer'">
-            select f_report_csm_analysis_offer as report from "dkic_b"."f_report_csm_analysis_offer"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId})
+            select f_report_csm_analysis_offer as report from "dkic_b"."f_report_csm_analysis_offer"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <!-- 明细页面 客户分析-成交 -->
         <if test="param.type == 'f_report_csm_analysis_order'">
-            select f_report_csm_analysis_order as report from "dkic_b"."f_report_csm_analysis_order"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId})
+            select f_report_csm_analysis_order as report from "dkic_b"."f_report_csm_analysis_order"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <!-- 明细页面 客户来源分布-报价 -->
         <if test="param.type == 'f_report_csm_from_offer'">
-            select f_report_csm_from_offer as report from "dkic_b"."f_report_csm_from_offer"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId})
+            select f_report_csm_from_offer as report from "dkic_b"."f_report_csm_from_offer"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <!-- 明细页面 客户来源分布-潜客 -->
         <if test="param.type == 'f_report_csm_from_filing'">
-            select f_report_csm_from_filing as report from "dkic_b"."f_report_csm_from_filing"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId})
+            select f_report_csm_from_filing as report from "dkic_b"."f_report_csm_from_filing"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
 
         <!-- 明细页面 销售分析5个 第一个就是部门成交-->
 
         <if test="param.type == 'f_report_order_analysis_reject'">
-            select f_report_order_analysis_reject as report from "dkic_b"."f_report_order_analysis_reject"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId})
+            select f_report_order_analysis_reject as report from "dkic_b"."f_report_order_analysis_reject"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <if test="param.type == 'f_report_order_analysis_csm'">
-            select f_report_order_analysis_csm as report from "dkic_b"."f_report_order_analysis_csm"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId})
+            select f_report_order_analysis_csm as report from "dkic_b"."f_report_order_analysis_csm"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <if test="param.type == 'f_report_order_analysis_activity'">
-            select f_report_order_analysis_activity as report from "dkic_b"."f_report_order_analysis_activity"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId})
+            select f_report_order_analysis_activity as report from "dkic_b"."f_report_order_analysis_activity"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
         <if test="param.type == 'f_report_order_analysis_specs'">
-            select f_report_order_analysis_specs as report from "dkic_b"."f_report_order_analysis_specs"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId})
+            select f_report_order_analysis_specs as report from "dkic_b"."f_report_order_analysis_specs"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler})
         </if>
 
 
         <!--订单参考利润-->
         <if test="param.type == 'f_report_s201_sale_reference_profit'">
-            select f_report_s201_sale_reference_profit as report from "dkic_b"."f_report_s201_sale_reference_profit"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s201_sale_reference_profit as report from "dkic_b"."f_report_s201_sale_reference_profit"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!--出库参考利润-->
         <if test="param.type == 'f_report_s201_out_reference_profit'">
-            select f_report_s201_out_reference_profit as report from "dkic_b"."f_report_s201_out_reference_profit"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s201_out_reference_profit as report from "dkic_b"."f_report_s201_out_reference_profit"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
 
 
         <!-- 报表页面 销售分析 -->
         <if test="param.type == 'f_report_s001_order_analysis_home'">
-            select f_report_s001_order_analysis_home as report from "dkic_b"."f_report_s001_order_analysis_home"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_order_analysis_home as report from "dkic_b"."f_report_s001_order_analysis_home"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
         <!-- 报表页面 收款分析 -->
         <if test="param.type == 'f_report_s001_repay_analysis'">
-            select f_report_s001_repay_analysis as report from "dkic_b"."f_report_s001_repay_analysis"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_repay_analysis as report from "dkic_b"."f_report_s001_repay_analysis"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
         <!-- 报表页面 客户分析 -->
         <if test="param.type == 'f_report_s001_csm_analysis_home'">
-            select f_report_s001_csm_analysis_home as report from "dkic_b"."f_report_s001_csm_analysis_home"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_csm_analysis_home as report from "dkic_b"."f_report_s001_csm_analysis_home"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
 
         <!-- 图形部分 -->
         <!-- 报表页面 客户来源分布 -->
         <if test="param.type == 'f_report_s001_csm_from_order'">
-            select f_report_s001_csm_from_order as report from "dkic_b"."f_report_s001_csm_from_order"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_csm_from_order as report from "dkic_b"."f_report_s001_csm_from_order"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 报表页面 产品分布 -->
         <if test="param.type == 'f_report_s001_spu_analysis'">
-            select f_report_s001_spu_analysis as report from "dkic_b"."f_report_s001_spu_analysis"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_spu_analysis as report from "dkic_b"."f_report_s001_spu_analysis"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 报表页面 部门成交 -->
         <if test="param.type == 'f_report_s001_index_org_order'">
-            select f_report_s001_index_org_order as report from "dkic_b"."f_report_s001_index_org_order"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_index_org_order as report from "dkic_b"."f_report_s001_index_org_order"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 报表页面 部门收款 -->
         <if test="param.type == 'f_report_s001_index_org_repay'">
-            select f_report_s001_index_org_repay as report from "dkic_b"."f_report_s001_index_org_repay"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_index_org_repay as report from "dkic_b"."f_report_s001_index_org_repay"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 报表页面 业务员成交 -->
         <if test="param.type == 'f_report_s001_index_staff_order'">
-            select f_report_s001_index_staff_order as report from "dkic_b"."f_report_s001_index_staff_order"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_index_staff_order as report from "dkic_b"."f_report_s001_index_staff_order"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 报表页面 业务员收款 -->
         <if test="param.type == 'f_report_s001_index_staff_repay'">
-            select f_report_s001_index_staff_repay as report from "dkic_b"."f_report_s001_index_staff_repay"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_index_staff_repay as report from "dkic_b"."f_report_s001_index_staff_repay"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 明细页面 收款分析-收款任务 f_report_s001_index_org_repay 部分收款同一个函数-->
 
         <!-- 明细页面 收款分析-欠款情况 -->
         <if test="param.type == 'f_report_s001_repay_debt'">
-            select f_report_s001_repay_debt as report from "dkic_b"."f_report_s001_repay_debt"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_repay_debt as report from "dkic_b"."f_report_s001_repay_debt"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 明细页面 客户分析-报价 -->
         <if test="param.type == 'f_report_s001_csm_analysis_offer'">
-            select f_report_s001_csm_analysis_offer as report from "dkic_b"."f_report_s001_csm_analysis_offer"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_csm_analysis_offer as report from "dkic_b"."f_report_s001_csm_analysis_offer"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 明细页面 客户分析-成交 -->
         <if test="param.type == 'f_report_s001_csm_analysis_order'">
-            select f_report_s001_csm_analysis_order as report from "dkic_b"."f_report_s001_csm_analysis_order"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_csm_analysis_order as report from "dkic_b"."f_report_s001_csm_analysis_order"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 明细页面 客户来源分布-报价 -->
         <if test="param.type == 'f_report_s001_csm_from_offer'">
-            select f_report_s001_csm_from_offer as report from "dkic_b"."f_report_s001_csm_from_offer"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_csm_from_offer as report from "dkic_b"."f_report_s001_csm_from_offer"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 明细页面 客户来源分布-潜客 -->
         <if test="param.type == 'f_report_s001_csm_from_filing'">
-            select f_report_s001_csm_from_filing as report from "dkic_b"."f_report_s001_csm_from_filing"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_csm_from_filing as report from "dkic_b"."f_report_s001_csm_from_filing"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
 
         <!-- 明细页面 销售分析5个 第一个就是部门成交-->
 
         <if test="param.type == 'f_report_s001_order_analysis_reject'">
-            select f_report_s001_order_analysis_reject as report from "dkic_b"."f_report_s001_order_analysis_reject"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_order_analysis_reject as report from "dkic_b"."f_report_s001_order_analysis_reject"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <if test="param.type == 'f_report_s001_order_analysis_csm'">
-            select f_report_s001_order_analysis_csm as report from "dkic_b"."f_report_s001_order_analysis_csm"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_order_analysis_csm as report from "dkic_b"."f_report_s001_order_analysis_csm"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <if test="param.type == 'f_report_s001_order_analysis_activity'">
-            select f_report_s001_order_analysis_activity as report from "dkic_b"."f_report_s001_order_analysis_activity"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_order_analysis_activity as report from "dkic_b"."f_report_s001_order_analysis_activity"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <if test="param.type == 'f_report_s001_order_analysis_specs'">
-            select f_report_s001_order_analysis_specs as report from "dkic_b"."f_report_s001_order_analysis_specs"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s001_order_analysis_specs as report from "dkic_b"."f_report_s001_order_analysis_specs"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
 
         <!-- s002部分 -->
         <!-- 报表页面 销售分析 -->
         <if test="param.type == 'f_report_s002_order_analysis_home'">
-            select f_report_s002_order_analysis_home as report from "dkic_b"."f_report_s002_order_analysis_home"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_order_analysis_home as report from "dkic_b"."f_report_s002_order_analysis_home"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
         <!-- 报表页面 收款分析 -->
         <if test="param.type == 'f_report_s002_repay_analysis'">
-            select f_report_s002_repay_analysis as report from "dkic_b"."f_report_s002_repay_analysis"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_repay_analysis as report from "dkic_b"."f_report_s002_repay_analysis"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
         <!-- 报表页面 客户分析 -->
         <if test="param.type == 'f_report_s002_csm_analysis_home'">
-            select f_report_s002_csm_analysis_home as report from "dkic_b"."f_report_s002_csm_analysis_home"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_csm_analysis_home as report from "dkic_b"."f_report_s002_csm_analysis_home"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
 
         <!-- 图形部分 -->
         <!-- 报表页面 客户来源分布 -->
         <if test="param.type == 'f_report_s002_csm_from_order'">
-            select f_report_s002_csm_from_order as report from "dkic_b"."f_report_s002_csm_from_order"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_csm_from_order as report from "dkic_b"."f_report_s002_csm_from_order"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 报表页面 产品分布 -->
         <if test="param.type == 'f_report_s002_spu_analysis'">
-            select f_report_s002_spu_analysis as report from "dkic_b"."f_report_s002_spu_analysis"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_spu_analysis as report from "dkic_b"."f_report_s002_spu_analysis"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
 
         <!-- 报表页面 业务员成交 -->
         <if test="param.type == 'f_report_s002_index_staff_order'">
-            select f_report_s002_index_staff_order as report from "dkic_b"."f_report_s002_index_staff_order"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_index_staff_order as report from "dkic_b"."f_report_s002_index_staff_order"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 报表页面 业务员收款 -->
         <if test="param.type == 'f_report_s002_index_staff_repay'">
-            select f_report_s002_index_staff_repay as report from "dkic_b"."f_report_s002_index_staff_repay"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_index_staff_repay as report from "dkic_b"."f_report_s002_index_staff_repay"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
 
         <!-- 明细页面 收款分析-欠款情况 -->
         <if test="param.type == 'f_report_s002_repay_debt'">
-            select f_report_s002_repay_debt as report from "dkic_b"."f_report_s002_repay_debt"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_repay_debt as report from "dkic_b"."f_report_s002_repay_debt"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 明细页面 客户分析-报价 -->
         <if test="param.type == 'f_report_s002_csm_analysis_offer'">
-            select f_report_s002_csm_analysis_offer as report from "dkic_b"."f_report_s002_csm_analysis_offer"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_csm_analysis_offer as report from "dkic_b"."f_report_s002_csm_analysis_offer"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 明细页面 客户分析-成交 -->
         <if test="param.type == 'f_report_s002_csm_analysis_order'">
-            select f_report_s002_csm_analysis_order as report from "dkic_b"."f_report_s002_csm_analysis_order"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_csm_analysis_order as report from "dkic_b"."f_report_s002_csm_analysis_order"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 明细页面 客户来源分布-报价 -->
         <if test="param.type == 'f_report_s002_csm_from_offer'">
-            select f_report_s002_csm_from_offer as report from "dkic_b"."f_report_s002_csm_from_offer"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_csm_from_offer as report from "dkic_b"."f_report_s002_csm_from_offer"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 明细页面 客户来源分布-潜客 -->
         <if test="param.type == 'f_report_s002_csm_from_filing'">
-            select f_report_s002_csm_from_filing as report from "dkic_b"."f_report_s002_csm_from_filing"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_csm_from_filing as report from "dkic_b"."f_report_s002_csm_from_filing"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
 
         <!-- 明细页面 销售分析5个 第一个就是部门成交-->
 
         <if test="param.type == 'f_report_s002_order_analysis_reject'">
-            select f_report_s002_order_analysis_reject as report from "dkic_b"."f_report_s002_order_analysis_reject"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_order_analysis_reject as report from "dkic_b"."f_report_s002_order_analysis_reject"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <if test="param.type == 'f_report_s002_order_analysis_csm'">
-            select f_report_s002_order_analysis_csm as report from "dkic_b"."f_report_s002_order_analysis_csm"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_order_analysis_csm as report from "dkic_b"."f_report_s002_order_analysis_csm"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <if test="param.type == 'f_report_s002_order_analysis_activity'">
-            select f_report_s002_order_analysis_activity as report from "dkic_b"."f_report_s002_order_analysis_activity"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_order_analysis_activity as report from "dkic_b"."f_report_s002_order_analysis_activity"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <if test="param.type == 'f_report_s002_order_analysis_specs'">
-            select f_report_s002_order_analysis_specs as report from "dkic_b"."f_report_s002_order_analysis_specs"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s002_order_analysis_specs as report from "dkic_b"."f_report_s002_order_analysis_specs"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 销售分析 -->
         <!-- 部门品类排行 -->
         <if test="param.type == 'f_report_s003_kpi_org_category'">
-            select f_report_s003_kpi_org_category as report from "dkic_b"."f_report_s003_kpi_org_category"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s003_kpi_org_category as report from "dkic_b"."f_report_s003_kpi_org_category"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 部门单品排行 -->
         <if test="param.type == 'f_report_s003_kpi_org_spu'">
-            select f_report_s003_kpi_org_spu as report from "dkic_b"."f_report_s003_kpi_org_spu"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s003_kpi_org_spu as report from "dkic_b"."f_report_s003_kpi_org_spu"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 业务员品类排行 -->
         <if test="param.type == 'f_report_s003_kpi_staff_category'">
-            select f_report_s003_kpi_staff_category as report from "dkic_b"."f_report_s003_kpi_staff_category"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s003_kpi_staff_category as report from "dkic_b"."f_report_s003_kpi_staff_category"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
 
         <!-- 业务员单品排行 -->
         <if test="param.type == 'f_report_s003_kpi_staff_spu'">
-            select f_report_s003_kpi_staff_spu as report from "dkic_b"."f_report_s003_kpi_staff_spu"(#{param.cpId},#{param.orgIds,typeHandler=IntListTypeHandler},#{param.staffIds,typeHandler=IntListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId},#{param.dateType})
+            select f_report_s003_kpi_staff_spu as report from "dkic_b"."f_report_s003_kpi_staff_spu"(#{param.cpId},#{param.orgIds,typeHandler=UuidListTypeHandler},#{param.staffIds,typeHandler=UuidListTypeHandler},to_date(#{param.beginDate},'yyyy-MM-dd'),to_date(#{param.endDate},'yyyy-MM-dd'),#{param.userId, typeHandler=UuidTypeHandler},#{param.dateType})
         </if>
     </select>
 

+ 2 - 2
src/main/java/com/dk/mdm/model/query/wxapi/basic/WxCommonQuery.java

@@ -30,9 +30,9 @@ public class WxCommonQuery extends PageInfo<WxCommonQuery> {
     @ApiModelProperty(value = "商户id")
     private long sysId;
     @ApiModelProperty(value = "部门id")
-    private long orgId;
+    private String orgId;
     @ApiModelProperty(value = "用户id")
-    private long userId;
+    private String userId;
 
 
 

+ 17 - 0
src/main/java/com/dk/mdm/model/report/ExcelDataHandler.java

@@ -0,0 +1,17 @@
+package com.dk.mdm.model.report;
+
+import cn.afterturn.easypoi.handler.impl.ExcelDataHandlerDefaultImpl;
+import org.apache.poi.common.usermodel.HyperlinkType;
+import org.apache.poi.ss.usermodel.CreationHelper;
+import org.apache.poi.ss.usermodel.Hyperlink;
+
+public class ExcelDataHandler extends ExcelDataHandlerDefaultImpl<ExcelIndex> {
+
+    @Override
+    public Hyperlink getHyperlink(CreationHelper creationHelper, ExcelIndex obj, String name, Object value) {
+        Hyperlink hyperlink = creationHelper.createHyperlink(HyperlinkType.DOCUMENT);
+        hyperlink.setLabel(name);
+        hyperlink.setAddress("'"+value+"'!A1");
+        return hyperlink;
+    }
+}

+ 80 - 0
src/main/java/com/dk/mdm/model/report/ExcelExportStyleImpl.java

@@ -0,0 +1,80 @@
+package com.dk.mdm.model.report;
+
+import cn.afterturn.easypoi.excel.export.styler.ExcelExportStylerDefaultImpl;
+import org.apache.poi.hssf.usermodel.HSSFPalette;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.hssf.util.HSSFColor;
+import org.apache.poi.ss.usermodel.*;
+
+public class ExcelExportStyleImpl extends ExcelExportStylerDefaultImpl {
+
+    private static final String DEFAULT_BACKGROUND_COLOR = "#C1C1C1";
+
+    /* 起个名叫title其实是header */
+    @Override
+    public CellStyle getTitleStyle(short color) {
+        CellStyle titleStyle = this.workbook.createCellStyle();
+        Font font = this.workbook.createFont();
+        font.setBold(true);
+        titleStyle.setAlignment(HorizontalAlignment.CENTER);
+        titleStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+        titleStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex());
+        titleStyle.setFillBackgroundColor(IndexedColors.PALE_BLUE.getIndex());
+        titleStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
+        titleStyle.setWrapText(true);
+        titleStyle.setFont(font);
+        titleStyle.setBorderBottom(BorderStyle.NONE);
+        return titleStyle;
+    }
+
+    /* 起个名叫header其实是title */
+    @Override
+    public CellStyle getHeaderStyle(short color) {
+        CellStyle titleStyle = this.workbook.createCellStyle();
+        Font font = this.workbook.createFont();
+        font.setFontHeightInPoints((short)12);
+        titleStyle.setFont(font);
+        titleStyle.setAlignment(HorizontalAlignment.CENTER);
+        titleStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+        return titleStyle;
+    }
+
+
+    @Override
+    public CellStyle stringSeptailStyle(Workbook workbook, boolean isWarp) {
+
+
+        int r = Integer.parseInt((DEFAULT_BACKGROUND_COLOR.substring(1,3)),16);
+        int g = Integer.parseInt((DEFAULT_BACKGROUND_COLOR.substring(3,5)),16);
+        int b = Integer.parseInt((DEFAULT_BACKGROUND_COLOR.substring(5,7)),16);
+
+        HSSFWorkbook wb = new HSSFWorkbook();
+        HSSFPalette palette = wb.getCustomPalette();
+        HSSFColor hssfColor = palette.findSimilarColor(r, g, b);
+
+
+        CellStyle style = workbook.createCellStyle();
+        style.setAlignment(HorizontalAlignment.CENTER);
+        style.setVerticalAlignment(VerticalAlignment.CENTER);
+        style.setDataFormat(STRING_FORMAT);
+        style.setFillForegroundColor(hssfColor.getIndex());
+        style.setFillBackgroundColor(hssfColor.getIndex());
+        style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
+        style.setBorderLeft(BorderStyle.THIN);
+        style.setBorderRight(BorderStyle.THIN);
+        style.setLeftBorderColor(IndexedColors.WHITE.getIndex());
+        style.setRightBorderColor(IndexedColors.WHITE.getIndex());
+        if (isWarp) {
+            style.setWrapText(true);
+        }
+
+        return style;
+    }
+
+    public ExcelExportStyleImpl(Workbook workbook) {
+        super(workbook);
+    }
+
+
+
+}

+ 14 - 0
src/main/java/com/dk/mdm/model/report/ExcelIndex.java

@@ -0,0 +1,14 @@
+package com.dk.mdm.model.report;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+@Data
+@Accessors(chain = true)
+public class ExcelIndex {
+
+   @Excel(name="报表目录",isHyperlink = true,width = 250)
+   private String sheetName;
+
+}

+ 15 - 0
src/main/java/com/dk/mdm/model/report/Util.java

@@ -0,0 +1,15 @@
+package com.dk.mdm.model.report;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+
+public class Util {
+
+    public static BigDecimal calc10000(BigDecimal bigDecimal){
+        if(bigDecimal == null){
+            return null;
+        }
+        return bigDecimal.divide(BigDecimal.valueOf(10000),2, RoundingMode.HALF_UP);
+    }
+
+}

+ 31 - 0
src/main/java/com/dk/mdm/model/report/analysis/BudgetQuotation.java

@@ -0,0 +1,31 @@
+package com.dk.mdm.model.report.analysis;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class BudgetQuotation {
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="门店名称",width = 35,orderNum = "1")
+    private String orgName;
+
+    @Excel(name="收款金额(万)",width = 15,orderNum = "2")
+    private BigDecimal offerAmount;
+
+    @Excel(name="报价客户",width = 15,orderNum = "3")
+    private Integer csmCount;
+
+    @Excel(name="报价率",width = 15,orderNum = "4")
+    private BigDecimal offerRate;
+
+    public void setOfferAmount(BigDecimal offerAmount) {
+        this.offerAmount = Util.calc10000(offerAmount);
+    }
+}

+ 31 - 0
src/main/java/com/dk/mdm/model/report/analysis/BudgetQuotationStaff.java

@@ -0,0 +1,31 @@
+package com.dk.mdm.model.report.analysis;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class BudgetQuotationStaff {
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="业务员名称",width = 35,orderNum = "1")
+    private String staffName;
+
+    @Excel(name="收款金额(万)",width = 15,orderNum = "2")
+    private BigDecimal offerAmount;
+
+    @Excel(name="报价客户",width = 15,orderNum = "3")
+    private Integer csmCount;
+
+    @Excel(name="报价率",width = 15,orderNum = "4")
+    private BigDecimal offerRate;
+
+    public void setOfferAmount(BigDecimal offerAmount) {
+        this.offerAmount = Util.calc10000(offerAmount);
+    }
+}

+ 31 - 0
src/main/java/com/dk/mdm/model/report/analysis/PotentialCustomerAnalysis.java

@@ -0,0 +1,31 @@
+package com.dk.mdm.model.report.analysis;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class PotentialCustomerAnalysis {
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="门店名称",width = 35,orderNum = "1")
+    private String orgName;
+
+    @Excel(name="潜在客户",width = 15,orderNum = "2")
+    private Integer csmCount;
+
+    @Excel(name="量尺",width = 15,orderNum = "3")
+    private Integer measureCsmCount;
+
+    @Excel(name="设计制图",width = 15,orderNum = "4")
+    private Integer designCsmCount;
+
+    @Excel(name="成交率",width = 15,orderNum = "5")
+    private BigDecimal orderRate;
+
+
+}

+ 31 - 0
src/main/java/com/dk/mdm/model/report/analysis/PotentialCustomerAnalysisStaff.java

@@ -0,0 +1,31 @@
+package com.dk.mdm.model.report.analysis;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class PotentialCustomerAnalysisStaff {
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="业务员名称",width = 35,orderNum = "1")
+    private String staffName;
+
+    @Excel(name="潜在客户",width = 15,orderNum = "2")
+    private Integer csmCount;
+
+    @Excel(name="量尺",width = 15,orderNum = "3")
+    private Integer measureCsmCount;
+
+    @Excel(name="设计制图",width = 15,orderNum = "4")
+    private Integer designCsmCount;
+
+    @Excel(name="成交率",width = 15,orderNum = "5")
+    private BigDecimal orderRate;
+
+
+}

+ 38 - 0
src/main/java/com/dk/mdm/model/report/department/DepartmentCollectionRanking.java

@@ -0,0 +1,38 @@
+package com.dk.mdm.model.report.department;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class DepartmentCollectionRanking {
+
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="门店名称",width = 35,orderNum = "1")
+    private String orgName;
+
+
+    @Excel(name="收款金额(万)",width = 15,orderNum = "2")
+    private BigDecimal repayAmount;
+
+//    @Excel(name="任务目标(万)",width = 15,orderNum = "3")
+//    private BigDecimal kpiRepayAmount;
+//
+//    @Excel(name="完成率",width = 15,orderNum = "4")
+//    private BigDecimal kpiOrderRate;
+
+
+    public void setRepayAmount(BigDecimal repayAmount) {
+        this.repayAmount = Util.calc10000(repayAmount);
+    }
+
+//    public void setKpiRepayAmount(BigDecimal kpiRepayAmount) {
+//        this.kpiRepayAmount = Util.calc10000(kpiRepayAmount);
+//    }
+}

+ 39 - 0
src/main/java/com/dk/mdm/model/report/department/DepartmentTransactionRanking.java

@@ -0,0 +1,39 @@
+package com.dk.mdm.model.report.department;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class DepartmentTransactionRanking {
+
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="门店名称",width = 35,orderNum = "1")
+    private String orgName;
+
+
+    @Excel(name="成交金额(万)",width = 15,orderNum = "2")
+    private BigDecimal orderAmount;
+
+
+//    @Excel(name="任务目标(万)",width = 15,orderNum = "3")
+//    private BigDecimal kpiOrderAmount;
+
+
+//    @Excel(name="完成率",width = 15,orderNum = "4")
+//    private BigDecimal kpiOrderRate;
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = Util.calc10000(orderAmount);
+    }
+
+//    public void setKpiOrderAmount(BigDecimal kpiOrderAmount) {
+//        this.kpiOrderAmount =  Util.calc10000(kpiOrderAmount);;
+//    }
+}

+ 31 - 0
src/main/java/com/dk/mdm/model/report/from/Offer.java

@@ -0,0 +1,31 @@
+package com.dk.mdm.model.report.from;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class Offer {
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="客户来源",width = 35,orderNum = "1")
+    private String fromName;
+
+    @Excel(name="报价金额(万)",width = 15,orderNum = "2")
+    private BigDecimal orderAmount;
+
+    @Excel(name="报价客户",width = 15,orderNum = "3")
+    private Integer customerQty;
+
+    @Excel(name="占比",width = 15,orderNum = "4")
+    private BigDecimal rate;
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = Util.calc10000(orderAmount);
+    }
+}

+ 26 - 0
src/main/java/com/dk/mdm/model/report/from/PotentialCustomerAnalysisFrom.java

@@ -0,0 +1,26 @@
+package com.dk.mdm.model.report.from;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+@Data
+@Accessors(chain = true)
+public class PotentialCustomerAnalysisFrom {
+
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="客户来源",width = 35,orderNum = "1")
+    private String fromName;
+
+    @Excel(name="潜在客户",width = 15,orderNum = "2")
+    private Integer csmCount;
+
+    @Excel(name="成交客户",width = 15,orderNum = "3")
+    private Integer orderCsmCount;
+
+    @Excel(name="设计制图",width = 15,orderNum = "4")
+    private Integer designCsmCount;
+
+}

+ 33 - 0
src/main/java/com/dk/mdm/model/report/from/Transaction.java

@@ -0,0 +1,33 @@
+package com.dk.mdm.model.report.from;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class Transaction
+
+{
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="客户来源",width = 35,orderNum = "1")
+    private String fromName;
+
+    @Excel(name="成交金额(万)",width = 15,orderNum = "2")
+    private BigDecimal orderAmount;
+
+    @Excel(name="成交客户",width = 15,orderNum = "3")
+    private Integer customerQty;
+
+    @Excel(name="占比",width = 15,orderNum = "4")
+    private BigDecimal rate;
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = Util.calc10000(orderAmount);
+    }
+}

+ 32 - 0
src/main/java/com/dk/mdm/model/report/product/ProductDistribution.java

@@ -0,0 +1,32 @@
+package com.dk.mdm.model.report.product;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+
+@Data
+@Accessors(chain = true)
+public class ProductDistribution {
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="品类名称",width = 35,orderNum = "1")
+    private String specsName;
+
+    @Excel(name="成交金额(万)",width = 15,orderNum = "2")
+    private BigDecimal sumAmount;
+
+    @Excel(name="成交数量",width = 15,orderNum = "3")
+    private Integer sumCount;
+
+    @Excel(name="数量占比",width = 15,orderNum = "4")
+    private BigDecimal countRate;
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);
+    }
+}

+ 35 - 0
src/main/java/com/dk/mdm/model/report/received/ArrearsInfo.java

@@ -0,0 +1,35 @@
+package com.dk.mdm.model.report.received;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class ArrearsInfo {
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="门店名称",width = 35,orderNum = "1")
+    private String orgName;
+
+    @Excel(name="欠款额(万)",width = 15,orderNum = "2")
+    private BigDecimal receivable;
+
+    @Excel(name="成交额(万)",width = 15,orderNum = "3")
+    private BigDecimal orderAmount;
+
+    @Excel(name="欠款户数",width = 15,orderNum = "4")
+    private Integer csmCount;
+
+    public void setReceivable(BigDecimal receivable) {
+        this.receivable = Util.calc10000(receivable);
+    }
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = Util.calc10000(orderAmount);
+    }
+}

+ 35 - 0
src/main/java/com/dk/mdm/model/report/received/ArrearsInfoStaff.java

@@ -0,0 +1,35 @@
+package com.dk.mdm.model.report.received;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class ArrearsInfoStaff {
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="业务员名称",width = 35,orderNum = "1")
+    private String staffName;
+
+    @Excel(name="欠款额(万)",width = 15,orderNum = "2")
+    private BigDecimal receivable;
+
+    @Excel(name="成交额(万)",width = 15,orderNum = "3")
+    private BigDecimal orderAmount;
+
+    @Excel(name="欠款户数",width = 15,orderNum = "4")
+    private Integer csmCount;
+
+    public void setReceivable(BigDecimal receivable) {
+        this.receivable = Util.calc10000(receivable);
+    }
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = Util.calc10000(orderAmount);
+    }
+}

+ 37 - 0
src/main/java/com/dk/mdm/model/report/received/ReceivedTask.java

@@ -0,0 +1,37 @@
+package com.dk.mdm.model.report.received;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class ReceivedTask {
+
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="门店名称",width = 35,orderNum = "1")
+    private String orgName;
+
+    @Excel(name="收款金额(万)",width = 15,orderNum = "2")
+    private BigDecimal repayAmount;
+
+//    @Excel(name="任务目标(万)",width = 15,orderNum = "3")
+//    private BigDecimal kpiRepayAmount;
+//
+//    @Excel(name="完成率",width = 15,orderNum = "4")
+//    private BigDecimal kpiRepayRate;
+
+    public void setRepayAmount(BigDecimal repayAmount) {
+        this.repayAmount = Util.calc10000(repayAmount);
+    }
+
+//    public void setKpiRepayAmount(BigDecimal kpiRepayAmount) {
+//        this.kpiRepayAmount = Util.calc10000(kpiRepayAmount);
+//    }
+
+}

+ 37 - 0
src/main/java/com/dk/mdm/model/report/received/ReceivedTaskStaff.java

@@ -0,0 +1,37 @@
+package com.dk.mdm.model.report.received;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class ReceivedTaskStaff {
+
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="业务员名称",width = 35,orderNum = "1")
+    private String staffName;
+
+    @Excel(name="收款金额(万)",width = 15,orderNum = "2")
+    private BigDecimal repayAmount;
+
+    @Excel(name="任务目标(万)",width = 15,orderNum = "3")
+    private BigDecimal kpiRepayAmount;
+
+    @Excel(name="完成率",width = 15,orderNum = "4")
+    private BigDecimal kpiRepayRate;
+
+    public void setRepayAmount(BigDecimal repayAmount) {
+        this.repayAmount = Util.calc10000(repayAmount);
+    }
+
+    public void setKpiRepayAmount(BigDecimal kpiRepayAmount) {
+        this.kpiRepayAmount = Util.calc10000(kpiRepayAmount);
+    }
+
+}

+ 32 - 0
src/main/java/com/dk/mdm/model/report/sale/ActivityEffect1.java

@@ -0,0 +1,32 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 活动效果上部 */
+@Data
+@Accessors(chain = true)
+public class ActivityEffect1 {
+    @Excel(name="序号",width = 10)
+    private Integer  kpiIndex;
+
+    @Excel(name="促销套餐(Top5)",width = 35,orderNum = "1")
+    private String kpiName;
+
+    @Excel(name="成交金额(万)",width = 15,orderNum = "2")
+    private BigDecimal sumAmount;
+
+    @Excel(name="成交数量",width = 15,orderNum = "3")
+    private Integer sumQty;
+
+    @Excel(name="成交户数",width = 10,orderNum = "4")
+    private Integer csmCount;
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);
+    }
+}

+ 32 - 0
src/main/java/com/dk/mdm/model/report/sale/ActivityEffect2.java

@@ -0,0 +1,32 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 活动效果下部 */
+@Data
+@Accessors(chain = true)
+public class ActivityEffect2 {
+    @Excel(name="序号",width = 10)
+    private Integer  kpiIndex;
+
+    @Excel(name="促销单品(Top5)",width = 35,orderNum = "1")
+    private String kpiName;
+
+    @Excel(name="成交金额(万)",width = 15,orderNum = "2")
+    private BigDecimal sumAmount;
+
+    @Excel(name="成交数量",width = 15,orderNum = "3")
+    private Integer sumQty;
+
+    @Excel(name="成交户数",width = 10,orderNum = "4")
+    private Integer csmCount;
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);
+    }
+}

+ 37 - 0
src/main/java/com/dk/mdm/model/report/sale/CustomerUnitPrice.java

@@ -0,0 +1,37 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+/* 客单价 */
+public class CustomerUnitPrice {
+
+    @Excel(name = "客单价(万)",orderNum = "2",width = 15)
+    private BigDecimal csmRate;
+
+    @Excel(name = "序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name = "门店名称",orderNum = "1",width = 35)
+    private String orgName;
+
+    @Excel(name = "成交户数",width = 10,orderNum = "4")
+    private Integer csmCount;
+
+    @Excel(name = "成交金额(万)",width = 10,orderNum = "3")
+    private BigDecimal sumAmount;
+
+    public void setCsmRate(BigDecimal csmRate) {
+        this.csmRate = Util.calc10000(csmRate);
+    }
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);;
+    }
+}

+ 37 - 0
src/main/java/com/dk/mdm/model/report/sale/CustomerUnitPriceStaff.java

@@ -0,0 +1,37 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+/* 客单价 */
+public class CustomerUnitPriceStaff {
+
+    @Excel(name = "客单价(万)",orderNum = "2",width = 15)
+    private BigDecimal csmRate;
+
+    @Excel(name = "序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name = "业务员名称",orderNum = "1",width = 35)
+    private String staffName;
+
+    @Excel(name = "成交户数",width = 10,orderNum = "4")
+    private Integer csmCount;
+
+    @Excel(name = "成交金额(万)",width = 10,orderNum = "3")
+    private BigDecimal sumAmount;
+
+    public void setCsmRate(BigDecimal csmRate) {
+        this.csmRate = Util.calc10000(csmRate);
+    }
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);;
+    }
+}

+ 40 - 0
src/main/java/com/dk/mdm/model/report/sale/CustomizedWisdom1.java

@@ -0,0 +1,40 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class CustomizedWisdom1 {
+
+    @Excel(name="序号",width = 10)
+    private Integer  kpiIndex;
+
+    @Excel(name="门店名称",width = 35,orderNum = "1")
+    private String orgName;
+
+    @Excel(name="定+智品类(万)",width = 15,orderNum = "2")
+    private BigDecimal sumAmount;
+
+    @Excel(name="定制品(万)",width = 15,orderNum = "3")
+    private BigDecimal dzAmount;
+
+    @Excel(name="智能坐便(万)",width = 15,orderNum = "4")
+    private BigDecimal znAmount;
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);
+    }
+
+    public void setDzAmount(BigDecimal dzAmount) {
+        this.dzAmount = Util.calc10000(dzAmount);
+    }
+
+    public void setZnAmount(BigDecimal znAmount) {
+        this.znAmount = Util.calc10000(znAmount);
+    }
+}

+ 40 - 0
src/main/java/com/dk/mdm/model/report/sale/CustomizedWisdom2.java

@@ -0,0 +1,40 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class CustomizedWisdom2 {
+
+    @Excel(name="序号",width = 10)
+    private Integer  kpiIndex;
+
+    @Excel(name="门店名称",width = 35,orderNum = "1")
+    private String orgName;
+
+    @Excel(name="定制品(万)",width = 15,orderNum = "2")
+    private BigDecimal sumAmount;
+
+    @Excel(name="定制柜(万)",width = 15,orderNum = "3")
+    private BigDecimal cabinetAmount;
+
+    @Excel(name="订制玻璃(万)",width = 15,orderNum = "4")
+    private BigDecimal glassAmount;
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);
+    }
+
+    public void setCabinetAmount(BigDecimal cabinetAmount) {
+        this.cabinetAmount = Util.calc10000(cabinetAmount);
+    }
+
+    public void setGlassAmount(BigDecimal glassAmount) {
+        this.glassAmount = Util.calc10000(glassAmount);
+    }
+}

+ 40 - 0
src/main/java/com/dk/mdm/model/report/sale/CustomizedWisdomStaff1.java

@@ -0,0 +1,40 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class CustomizedWisdomStaff1 {
+
+    @Excel(name="序号",width = 10)
+    private Integer  kpiIndex;
+
+    @Excel(name="业务员名称",width = 35,orderNum = "1")
+    private String staffName;
+
+    @Excel(name="定+智品类(万)",width = 15,orderNum = "2")
+    private BigDecimal sumAmount;
+
+    @Excel(name="定制品(万)",width = 15,orderNum = "3")
+    private BigDecimal dzAmount;
+
+    @Excel(name="智能坐便(万)",width = 15,orderNum = "4")
+    private BigDecimal znAmount;
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);
+    }
+
+    public void setDzAmount(BigDecimal dzAmount) {
+        this.dzAmount = Util.calc10000(dzAmount);
+    }
+
+    public void setZnAmount(BigDecimal znAmount) {
+        this.znAmount = Util.calc10000(znAmount);
+    }
+}

+ 40 - 0
src/main/java/com/dk/mdm/model/report/sale/CustomizedWisdomStaff2.java

@@ -0,0 +1,40 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class CustomizedWisdomStaff2 {
+
+    @Excel(name="序号",width = 10)
+    private Integer  kpiIndex;
+
+    @Excel(name="业务员名称",width = 35,orderNum = "1")
+    private String staffName;
+
+    @Excel(name="定制品(万)",width = 15,orderNum = "2")
+    private BigDecimal sumAmount;
+
+    @Excel(name="定制柜(万)",width = 15,orderNum = "3")
+    private BigDecimal cabinetAmount;
+
+    @Excel(name="订制玻璃(万)",width = 15,orderNum = "4")
+    private BigDecimal glassAmount;
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);
+    }
+
+    public void setCabinetAmount(BigDecimal cabinetAmount) {
+        this.cabinetAmount = Util.calc10000(cabinetAmount);
+    }
+
+    public void setGlassAmount(BigDecimal glassAmount) {
+        this.glassAmount = Util.calc10000(glassAmount);
+    }
+}

+ 35 - 0
src/main/java/com/dk/mdm/model/report/sale/OrgCategoryAmt.java

@@ -0,0 +1,35 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 销售分析-部门品类-金额 */
+@Data
+@Accessors(chain = true)
+public class OrgCategoryAmt {
+
+
+  @Excel(name="排行",width = 10,orderNum = "2")
+  private Integer  kpiIndex;
+
+
+  @Excel(name="门店名称",width = 35,orderNum = "3")
+  private String orgName;
+
+  @Excel(name="产品分类",width = 35,orderNum = "4")
+  private String categoryName;
+
+  @Excel(name="成交金额(万)",width = 15,orderNum = "5")
+  private BigDecimal sumAmount;
+
+  @Excel(name="任务目标(万)",width = 15,orderNum = "6")
+  private BigDecimal kpiAmount;
+
+  @Excel(name="完成率",width = 10,orderNum = "7", suffix = "%")
+  private BigDecimal kpiRate;
+
+}

+ 32 - 0
src/main/java/com/dk/mdm/model/report/sale/OrgCategoryQty.java

@@ -0,0 +1,32 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 销售分析-部门品类-数量 */
+@Data
+@Accessors(chain = true)
+public class OrgCategoryQty {
+
+  @Excel(name="排行",width = 10,orderNum = "2")
+  private Integer  kpiIndex;
+
+  @Excel(name="门店名称",width = 35,orderNum = "3")
+  private String orgName;
+
+  @Excel(name="产品分类",width = 35,orderNum = "4")
+  private String categoryName;
+
+  @Excel(name="成交数量",width = 15,orderNum = "5",numFormat = "0")
+  private BigDecimal sumQty;
+
+  @Excel(name="任务目标",width = 15,orderNum = "6")
+  private BigDecimal kpiQty;
+
+  @Excel(name="完成率",width = 10,orderNum = "7",suffix = "%")
+  private BigDecimal kpiRate;
+
+}

+ 34 - 0
src/main/java/com/dk/mdm/model/report/sale/OrgSpuAmt.java

@@ -0,0 +1,34 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 销售分析-部门单品-金额 */
+@Data
+@Accessors(chain = true)
+public class OrgSpuAmt {
+
+
+  @Excel(name="排行",width = 10,orderNum = "2")
+  private Integer  kpiIndex;
+
+
+  @Excel(name="门店名称",width = 35,orderNum = "3")
+  private String orgName;
+
+  @Excel(name="产品型号",width = 35,orderNum = "4")
+  private String spuCode;
+
+  @Excel(name="成交金额(万)",width = 15,orderNum = "5")
+  private BigDecimal sumAmount;
+
+  @Excel(name="任务目标(万)",width = 15,orderNum = "6")
+  private BigDecimal kpiAmount;
+
+  @Excel(name="完成率",width = 10,orderNum = "7" ,suffix = "%")
+  private BigDecimal kpiRate;
+
+}

+ 33 - 0
src/main/java/com/dk/mdm/model/report/sale/OrgSpuQty.java

@@ -0,0 +1,33 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 销售分析-部门单品-数量 */
+@Data
+@Accessors(chain = true)
+public class OrgSpuQty {
+
+
+  @Excel(name="排行",width = 10,orderNum = "2")
+  private Integer  kpiIndex;
+
+  @Excel(name="门店名称",width = 35,orderNum = "3")
+  private String orgName;
+
+  @Excel(name="产品型号",width = 35,orderNum = "4")
+  private String spuCode;
+
+  @Excel(name="成交数量",width = 15,orderNum = "5",numFormat = "0")
+  private BigDecimal sumQty;
+
+  @Excel(name="任务目标",width = 15,orderNum = "6")
+  private BigDecimal kpiQty;
+
+  @Excel(name="完成率",width = 10,orderNum = "7",suffix = "%")
+  private BigDecimal kpiRate;
+
+}

+ 38 - 0
src/main/java/com/dk/mdm/model/report/sale/ReturnSituation.java

@@ -0,0 +1,38 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+/* 销售分析 - 退货情况 */
+public class ReturnSituation {
+
+    @Excel(name="出库额(万)",width = 15,orderNum = "3")
+    private BigDecimal outAmount;
+
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="退货额(万)",width = 15,orderNum = "2")
+    private BigDecimal rejectAmount;
+
+    @Excel(name="门店名称",width = 35,orderNum = "1")
+    private String orgName;
+
+    @Excel(name="退货占率",width = 10,orderNum = "4")
+    private BigDecimal kpiRate;
+
+
+    public void setOutAmount(BigDecimal outAmount) {
+        this.outAmount = Util.calc10000(outAmount);
+    }
+
+    public void setRejectAmount(BigDecimal rejectAmount) {
+        this.rejectAmount = Util.calc10000(rejectAmount);;
+    }
+}

+ 38 - 0
src/main/java/com/dk/mdm/model/report/sale/ReturnSituationStaff.java

@@ -0,0 +1,38 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+/* 销售分析 - 退货情况 */
+public class ReturnSituationStaff {
+
+    @Excel(name="出库额(万)",width = 15,orderNum = "3")
+    private BigDecimal outAmount;
+
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="退货额(万)",width = 15,orderNum = "2")
+    private BigDecimal rejectAmount;
+
+    @Excel(name="业务员名称",width = 35,orderNum = "1")
+    private String staffName;
+
+    @Excel(name="退货占率",width = 10,orderNum = "4")
+    private BigDecimal kpiRate;
+
+
+    public void setOutAmount(BigDecimal outAmount) {
+        this.outAmount = Util.calc10000(outAmount);
+    }
+
+    public void setRejectAmount(BigDecimal rejectAmount) {
+        this.rejectAmount = Util.calc10000(rejectAmount);;
+    }
+}

+ 37 - 0
src/main/java/com/dk/mdm/model/report/sale/SaleTask.java

@@ -0,0 +1,37 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 销售简报 - 销售任务 */
+@Data
+@Accessors(chain = true)
+public class SaleTask {
+
+  @Excel(name="序号",width = 10)
+  private Integer  kpiIndex;
+
+//  @Excel(name="任务目标(万)",width = 15,orderNum = "3")
+//  private BigDecimal kpiOrderAmount;
+//
+//  @Excel(name="完成率",width = 10,orderNum = "4")
+//  private BigDecimal kpiOrderRate;
+
+  @Excel(name="成交金额(万)",width = 15,orderNum = "2")
+  private BigDecimal orderAmount;
+
+  @Excel(name="门店名称",width = 35,orderNum = "1")
+  private String orgName;
+
+//  public void setKpiOrderAmount(BigDecimal kpiOrderAmount) {
+//    this.kpiOrderAmount = Util.calc10000(kpiOrderAmount);
+//  }
+
+  public void setOrderAmount(BigDecimal orderAmount) {
+    this.orderAmount = Util.calc10000(orderAmount);
+  }
+}

+ 37 - 0
src/main/java/com/dk/mdm/model/report/sale/SaleTaskStaff.java

@@ -0,0 +1,37 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 销售简报 - 销售任务 */
+@Data
+@Accessors(chain = true)
+public class SaleTaskStaff {
+
+    @Excel(name="序号",width = 10)
+    private Integer  kpiIndex;
+
+    @Excel(name="任务目标(万)",width = 15,orderNum = "3")
+    private BigDecimal kpiOrderAmount;
+
+    @Excel(name="完成率",width = 10,orderNum = "4")
+    private BigDecimal kpiOrderRate;
+
+    @Excel(name="成交金额(万)",width = 15,orderNum = "2")
+    private BigDecimal orderAmount;
+
+    @Excel(name="业务员名称",width = 35,orderNum = "1")
+    private String staffName;
+
+    public void setKpiOrderAmount(BigDecimal kpiOrderAmount) {
+        this.kpiOrderAmount = Util.calc10000(kpiOrderAmount);
+    }
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = Util.calc10000(orderAmount);
+    }
+}

+ 33 - 0
src/main/java/com/dk/mdm/model/report/sale/StaffCategoryAmt.java

@@ -0,0 +1,33 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 销售分析-业务员品类-金额 */
+@Data
+@Accessors(chain = true)
+public class StaffCategoryAmt {
+
+  @Excel(name="排行",width = 10,orderNum = "2")
+  private Integer  kpiIndex;
+
+
+  @Excel(name="业务员名称",width = 35,orderNum = "3")
+  private String staffName;
+
+  @Excel(name="产品分类",width = 35,orderNum = "4")
+  private String categoryName;
+
+  @Excel(name="成交金额(万)",width = 15,orderNum = "5")
+  private BigDecimal sumAmount;
+
+  @Excel(name="任务目标(万)",width = 15,orderNum = "6")
+  private BigDecimal kpiAmount;
+
+  @Excel(name="完成率",width = 10,orderNum = "7"  ,suffix = "%")
+  private BigDecimal kpiRate;
+
+}

+ 33 - 0
src/main/java/com/dk/mdm/model/report/sale/StaffCategoryQty.java

@@ -0,0 +1,33 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 销售分析-业务员品类-数量 */
+@Data
+@Accessors(chain = true)
+public class StaffCategoryQty {
+
+
+  @Excel(name="排行",width = 10,orderNum = "2")
+  private Integer  kpiIndex;
+
+  @Excel(name="业务员名称",width = 35,orderNum = "3")
+  private String staffName;
+
+  @Excel(name="产品分类",width = 35,orderNum = "4")
+  private String categoryName;
+
+  @Excel(name="成交数量",width = 15,orderNum = "5",numFormat = "0")
+  private BigDecimal sumQty;
+
+  @Excel(name="任务目标",width = 15,orderNum = "6")
+  private BigDecimal kpiQty;
+
+  @Excel(name="完成率",width = 10,orderNum = "7" ,suffix = "%")
+  private BigDecimal kpiRate;
+
+}

+ 33 - 0
src/main/java/com/dk/mdm/model/report/sale/StaffSpuAmt.java

@@ -0,0 +1,33 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 销售分析-业务员单品-金额 */
+@Data
+@Accessors(chain = true)
+public class StaffSpuAmt {
+
+
+  @Excel(name="排行",width = 10,orderNum = "2")
+  private Integer  kpiIndex;
+
+  @Excel(name="业务员名称",width = 35,orderNum = "3")
+  private String staffName;
+
+  @Excel(name="产品型号",width = 35,orderNum = "4")
+  private String spuCode;
+
+  @Excel(name="成交金额(万)",width = 15,orderNum = "5")
+  private BigDecimal sumAmount;
+
+  @Excel(name="任务目标(万)",width = 15,orderNum = "6")
+  private BigDecimal kpiAmount;
+
+  @Excel(name="完成率",width = 10,orderNum = "7",suffix = "%")
+  private BigDecimal kpiRate;
+
+}

+ 33 - 0
src/main/java/com/dk/mdm/model/report/sale/StaffSpuQty.java

@@ -0,0 +1,33 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 销售分析-业务员单品-数量 */
+@Data
+@Accessors(chain = true)
+public class StaffSpuQty {
+
+
+  @Excel(name="排行",width = 10,orderNum = "2")
+  private Integer  kpiIndex;
+
+  @Excel(name="业务员名称",width = 35,orderNum = "3")
+  private String staffName;
+
+  @Excel(name="产品型号",width = 35,orderNum = "4")
+  private String spuCode;
+
+  @Excel(name="成交数量",width = 15,orderNum = "5",numFormat = "0")
+  private BigDecimal sumQty;
+
+  @Excel(name="任务目标",width = 15,orderNum = "6")
+  private BigDecimal kpiQty;
+
+  @Excel(name="完成率",width = 10,orderNum = "7" ,suffix = "%")
+  private BigDecimal kpiRate;
+
+}

+ 40 - 0
src/main/java/com/dk/mdm/model/report/sale/categoryRanking.java

@@ -0,0 +1,40 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 订单参考利润/出库参考利润 - 品类排行 */
+@Data
+@Accessors(chain = true)
+public class categoryRanking {
+
+
+    @Excel(name="排行",width = 10,orderNum = "2")
+    private Integer  kpiIndex;
+
+
+    @Excel(name="商品品类",width = 35,orderNum = "3")
+    private String kpiName;
+
+    @Excel(name="销售金额(万)",width = 35,orderNum = "4")
+    private BigDecimal sumAmount;
+
+    @Excel(name="毛利(万)",width = 15,orderNum = "6")
+    private BigDecimal grossProfit;
+
+    @Excel(name="毛利率",width = 10,orderNum = "7"  ,suffix = "%")
+    private BigDecimal grossProfitMargin;
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);
+    }
+
+    public void setGrossProfit(BigDecimal grossProfit) {
+        this.grossProfit = Util.calc10000(grossProfit);
+    }
+
+}

+ 39 - 0
src/main/java/com/dk/mdm/model/report/sale/orgRanking.java

@@ -0,0 +1,39 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 订单参考利润/出库参考利润 - 部门排行 */
+@Data
+@Accessors(chain = true)
+public class orgRanking {
+
+
+    @Excel(name="排行",width = 10,orderNum = "2")
+    private Integer  kpiIndex;
+
+
+    @Excel(name="部门名称",width = 35,orderNum = "3")
+    private String kpiName;
+
+    @Excel(name="销售金额(万)",width = 35,orderNum = "4")
+    private BigDecimal sumAmount;
+
+    @Excel(name="毛利(万)",width = 15,orderNum = "6")
+    private BigDecimal grossProfit;
+
+    @Excel(name="毛利率",width = 10,orderNum = "7"  ,suffix = "%")
+    private BigDecimal grossProfitMargin;
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);
+    }
+
+    public void setGrossProfit(BigDecimal grossProfit) {
+        this.grossProfit = Util.calc10000(grossProfit);
+    }
+}

+ 39 - 0
src/main/java/com/dk/mdm/model/report/sale/staffRanking.java

@@ -0,0 +1,39 @@
+package com.dk.mdm.model.report.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/* 订单参考利润/出库参考利润 - 业务员排行 */
+@Data
+@Accessors(chain = true)
+public class staffRanking {
+
+
+    @Excel(name="排行",width = 10,orderNum = "2")
+    private Integer  kpiIndex;
+
+
+    @Excel(name="业务员",width = 35,orderNum = "3")
+    private String kpiName;
+
+    @Excel(name="销售金额(万)",width = 35,orderNum = "4")
+    private BigDecimal sumAmount;
+
+    @Excel(name="毛利(万)",width = 15,orderNum = "6")
+    private BigDecimal grossProfit;
+
+    @Excel(name="毛利率",width = 10,orderNum = "7"  ,suffix = "%")
+    private BigDecimal grossProfitMargin;
+
+    public void setSumAmount(BigDecimal sumAmount) {
+        this.sumAmount = Util.calc10000(sumAmount);
+    }
+
+    public void setGrossProfit(BigDecimal grossProfit) {
+        this.grossProfit = Util.calc10000(grossProfit);
+    }
+}

+ 37 - 0
src/main/java/com/dk/mdm/model/report/staff/StaffCollectionRanking.java

@@ -0,0 +1,37 @@
+package com.dk.mdm.model.report.staff;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class StaffCollectionRanking {
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="业务员名称",width = 35,orderNum = "1")
+    private String staffName;
+
+
+    @Excel(name="收款金额(万)",width = 15,orderNum = "2")
+    private BigDecimal repayAmount;
+
+//    @Excel(name="任务目标(万)",width = 15,orderNum = "3")
+//    private BigDecimal kpiRepayAmount;
+//
+//    @Excel(name="完成率",width = 15,orderNum = "4")
+//    private BigDecimal kpiOrderRate;
+
+
+    public void setRepayAmount(BigDecimal repayAmount) {
+        this.repayAmount = Util.calc10000(repayAmount);
+    }
+
+//    public void setKpiRepayAmount(BigDecimal kpiRepayAmount) {
+//        this.kpiRepayAmount = Util.calc10000(kpiRepayAmount);
+//    }
+}

+ 39 - 0
src/main/java/com/dk/mdm/model/report/staff/StaffTransactionRanking.java

@@ -0,0 +1,39 @@
+package com.dk.mdm.model.report.staff;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.dk.mdm.model.report.Util;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+public class StaffTransactionRanking {
+    @Excel(name="序号",width = 10)
+    private Integer kpiIndex;
+
+    @Excel(name="业务员名称",width = 35,orderNum = "1")
+    private String staffName;
+
+
+    @Excel(name="成交金额(万)",width = 15,orderNum = "2")
+    private BigDecimal orderAmount;
+
+
+//    @Excel(name="任务目标(万)",width = 15,orderNum = "3")
+//    private BigDecimal kpiOrderAmount;
+//
+//
+//    @Excel(name="完成率",width = 15,orderNum = "4")
+//    private BigDecimal kpiOrderRate;
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = Util.calc10000(orderAmount);
+    }
+
+//    public void setKpiOrderAmount(BigDecimal kpiOrderAmount) {
+//        this.kpiOrderAmount =  Util.calc10000(kpiOrderAmount);;
+//    }
+
+}

+ 280 - 8
src/main/java/com/dk/mdm/service/report/ReportService.java

@@ -1,29 +1,46 @@
 package com.dk.mdm.service.report;
 
+import cn.afterturn.easypoi.excel.entity.ExportParams;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.dk.common.infrastructure.constant.Constant;
-import com.dk.common.infrastructure.enums.ErrorCodeEnum;
-import com.dk.common.mapper.BaseMapper;
 import com.dk.common.model.pojo.PageList;
 import com.dk.common.response.ResponseCodeEnum;
 import com.dk.common.response.ResponseResultUtil;
 import com.dk.common.response.ResponseResultVO;
-import com.dk.common.service.BaseService;
-import com.dk.mdm.infrastructure.util.AuthUtils;
-import com.dk.mdm.mapper.common.CommonMapper;
+import com.dk.common.util.ExcelUtils;
+import com.dk.common.util.ExportMoreView;
+import com.dk.common.util.ExportView;
+import com.dk.common.util.RedisUtil;
 import com.dk.mdm.mapper.ivt.InboundItemMapper;
 import com.dk.mdm.mapper.ivt.OutboundItemMapper;
-import com.dk.mdm.mapper.mst.StaffMapper;
 import com.dk.mdm.mapper.report.ReportMapper;
+import com.dk.mdm.model.report.ExcelDataHandler;
+import com.dk.mdm.model.report.ExcelExportStyleImpl;
+import com.dk.mdm.model.report.ExcelIndex;
+import com.dk.mdm.model.report.analysis.*;
+import com.dk.mdm.model.report.department.*;
+import com.dk.mdm.model.report.from.*;
+import com.dk.mdm.model.report.product.ProductDistribution;
+import com.dk.mdm.model.report.received.*;
+import com.dk.mdm.model.report.sale.*;
+import com.dk.mdm.model.report.staff.*;
+import com.google.common.collect.ImmutableMap;
 import lombok.extern.slf4j.Slf4j;
-import org.postgresql.util.PGobject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * @desc   : 报表数据源
@@ -42,6 +59,10 @@ public class ReportService {
 
     @Autowired
     private OutboundItemMapper outboundItemMapper;
+
+    @Autowired
+    private RedisUtil redisUtil;
+
     /**
      * @desc   : 查询库存
      * @author : 常皓宁
@@ -507,5 +528,256 @@ public class ReportService {
         return ResponseResultUtil.success(result);
     }
 
+//    @Autowired
+//    private LogReportExportFeign logReportExportFeign;
+    @Transactional(rollbackFor = {Exception.class})
+    public void export(HttpServletResponse response, String uuid) throws Exception {
+
+        ExportMoreView exportMoreView = new ExportMoreView();
+
+        List<ExportView> exportViews = new ArrayList<>();
+
+        Map<String,Object> redisData = ((Map<String,Object>) redisUtil.get(uuid));
+
+        Map<String,Map<String,Object>> params = (Map<String, Map<String, Object>>)redisData.get("params") ;
+        /* 查询条件 */
+        String searchCondition = redisData.get("searchCond").toString();
+        /* 数据库查询出来的数据 */
+        Map<String,Object> reportData = getReportBatch(params).getData();
+
+        String fileName = redisData.get("fileName").toString();
+//        String filePath = redisData.get("filePath").toString();
+
+        exportViews.add(new ExportView());
+        exportViews.get(0).setCls(ExcelIndex.class);
+        ExportParams indexExportParams = new ExportParams(searchCondition,"报表目录");
+        indexExportParams.setDataHandler(new ExcelDataHandler());
+        exportViews.get(0).setExportParams(indexExportParams);
+        exportViews.get(0).setTitleHeight(60);
+        List<ExcelIndex> sheetList = new ArrayList<>();
+//        String currentUserId = null;
+//        Long cpId = null;
+        for(String key : params.keySet()){
+            sheetList.add(new ExcelIndex().setSheetName(TITLE_MAP.get(key)));
+            Map<String,Object> currentMap = params.get(key);
+            /* 手动处理一下 userId */
+//            if(currentUserId == null){
+//                currentUserId = currentMap.get("userId").toString();
+//            }
+            /* 手动处理cpId */
+//            if(cpId == null){
+//                cpId = Long.valueOf(currentMap.get("cpId").toString());
+//            }
+            Class<?> clazz = CLASS_MAP.get(key);
+            List<?> list = JSONArray.parseArray(JSONArray.toJSONString(((Map<String,Object>)reportData.get(key)).get(currentMap.get("items").toString())),clazz);
+            ExportParams exportParams = new ExportParams(
+                    TITLE_MAP.get(key),
+                    getTotal(currentMap.get("secondTitle").toString(), (Map<String,Object>)reportData.get(key), (List<String>)currentMap.get("calc10000")),
+                    TITLE_MAP.get(key));
+
+            exportParams.setStyle(ExcelExportStyleImpl.class);
+
+            ExportView exportView = new ExportView(exportParams,list,clazz);
+            exportViews.add(exportView);
+        }
+        exportViews.get(0).setDataList(sheetList);
+        exportMoreView.setMoreViewList(exportViews);
+
+        DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分ss秒");
+        String currentTime = LocalDateTime.now().format(outputFormatter);
+
+        /* 导出成功之前 插入日志表 */
+//        LogReportExportVo logReportExportVo = new LogReportExportVo()
+//                .setReportName(fileName + "-" +currentTime +".xls")
+//                .setReportPath(filePath)
+//                .setCpId(cpId)
+//                .setQueryItems(JSONObject.parseObject(JSONObject.toJSONString(params)))
+//                .setExportData(new JSONObject(reportData))
+//                .setOpCreateUserId(currentUserId);
+//        ResponseResultVO<?> insertRes = logReportExportFeign.insert(logReportExportVo);
+//        if(insertRes.getCode() == 200){
+            ExcelUtils.defaultExportMoreSheet(fileName + "-" +currentTime +".xls",response,exportMoreView);
+//        }else{
+//            throw new BaseBusinessException(insertRes.getCode(),insertRes.getMessage());
+//        }
+    }
 
+    private static final Map<String, Class<?>> CLASS_MAP = ImmutableMap.<String, Class<?>>builder()
+            /* 销售分析 */
+            .put("saleTask", SaleTask.class)
+            .put("returnSituation", ReturnSituation.class)
+            .put("customerUnitPrice", CustomerUnitPrice.class)
+//            .put("activityEffect1", ActivityEffect1.class)
+//            .put("activityEffect2", ActivityEffect2.class)
+//            .put("customizedWisdom1",CustomizedWisdom1.class)
+//            .put("customizedWisdom2",CustomizedWisdom2.class)
+            /* 收款分析 */
+            .put("receivedTask", ReceivedTask.class)
+            .put("arrearsInfo", ArrearsInfo.class)
+            /* 客户分析 */
+//            .put("budgetQuotation", BudgetQuotation.class)
+            .put("potentialCustomerAnalysis", PotentialCustomerAnalysis.class)
+
+            /* 客户来源 */
+            .put("transaction", Transaction.class)
+//            .put("offer", Offer.class)
+            .put("potentialCustomerAnalysisFrom", PotentialCustomerAnalysisFrom.class)
+            /* 产品分布 */
+            .put("productDistribution", ProductDistribution.class)
+            /* 部门成交 */
+            .put("departmentTransactionRanking", DepartmentTransactionRanking.class)
+            /* 部门收款 */
+            .put("departmentCollectionRanking", DepartmentCollectionRanking.class)
+            /* 业务员成交 */
+            .put("staffTransactionRanking", StaffTransactionRanking.class)
+            /* 业务员收款 */
+            .put("staffCollectionRanking", StaffCollectionRanking.class)
+
+            /* 店长简报部分 */
+            /* 销售分析 */
+            .put("saleTaskStaff", SaleTaskStaff.class)
+            .put("returnSituationStaff", ReturnSituationStaff.class)
+            .put("customerUnitPriceStaff", CustomerUnitPriceStaff.class)
+            .put("customizedWisdomStaff1", CustomizedWisdomStaff1.class)
+            .put("customizedWisdomStaff2", CustomizedWisdomStaff2.class)
+
+            /* 收款分析 */
+            .put("receivedTaskStaff", ReceivedTaskStaff.class)
+            .put("arrearsInfoStaff", ArrearsInfoStaff.class)
+
+            /* 收款分析 */
+            .put("budgetQuotationStaff", BudgetQuotationStaff.class)
+            .put("potentialCustomerAnalysisStaff", PotentialCustomerAnalysisStaff.class)
+
+            /* 销售分析-部门品类 */
+            .put("orgCategoryAmt", OrgCategoryAmt.class)
+            .put("orgCategoryQty", OrgCategoryQty.class)
+
+            /* 销售分析-部门单品 */
+            .put("orgSpuAmt", OrgSpuAmt.class)
+            .put("orgSpuQty", OrgSpuQty.class)
+
+            /* 销售分析-业务员品类 */
+            .put("staffCategoryAmt", StaffCategoryAmt.class)
+            .put("staffCategoryQty", StaffCategoryQty.class)
+
+
+            /* 销售分析-业务员单类 */
+            .put("staffSpuAmt", StaffSpuAmt.class)
+            .put("staffSpuQty", StaffSpuQty.class)
+
+            /* 订单参考利润 - 品类排行 */
+            .put("saleReferenceProfit1",categoryRanking.class)
+            /* 订单参考利润 - 部门排行 */
+            .put("saleReferenceProfit2",orgRanking.class)
+            /* 订单参考利润 - 业务员排行 */
+            .put("saleReferenceProfit3",staffRanking.class)
+
+            /* 出库参考利润 - 品类排行 */
+            .put("outReferenceProfit1",categoryRanking.class)
+            /* 出库参考利润 - 部门排行 */
+            .put("outReferenceProfit2",orgRanking.class)
+            /* 出库参考利润 - 业务员排行 */
+            .put("outReferenceProfit3",staffRanking.class)
+
+            .build();
+
+    private static final Map<String, String> TITLE_MAP = ImmutableMap.<String, String>builder()
+            /* 销售分析 */
+            .put("saleTask", "销售分析-销售任务")
+            .put("returnSituation", "销售分析-退货情况")
+            .put("customerUnitPrice","销售分析-客单价")
+//            .put("activityEffect1","销售分析-促销套餐活动效果")
+//            .put("activityEffect2","销售分析-促销单品活动效果")
+//            .put("customizedWisdom1","销售分析-定+智品类")
+//            .put("customizedWisdom2","销售分析-定+定制类")
+            /* 收款分析 */
+            .put("receivedTask", "收款分析-收款任务")
+            .put("arrearsInfo", "收款分析-欠款情况")
+            /* 客户分析 */
+//            .put("budgetQuotation", "客户分析-预算报价")
+            .put("potentialCustomerAnalysis", "客户分析-潜客分析")
+            /* 客户来源 */
+            .put("transaction", "客户来源-成交情况")
+//            .put("offer", "客户来源-报价情况")
+            .put("potentialCustomerAnalysisFrom", "客户来源-潜客分析")
+            /* 产品分布 */
+            .put("productDistribution", "产品分布")
+            /* 部门成交 */
+            .put("departmentTransactionRanking", "部门成交排行")
+            /* 部门收款 */
+            .put("departmentCollectionRanking", "部门收款排行")
+            /* 业务员成交 */
+            .put("staffTransactionRanking", "业务员成交排行")
+            /* 业务员收款 */
+            .put("staffCollectionRanking", "业务员收款排行")
+
+            /* 店长简报部分 */
+            /* 销售分析 */
+            .put("saleTaskStaff", "销售分析-销售任务")
+            .put("returnSituationStaff", "销售分析-退货情况")
+            .put("customerUnitPriceStaff", "销售分析-客单价")
+            .put("customizedWisdomStaff1", "销售分析-定+智品类")
+            .put("customizedWisdomStaff2", "销售分析-定+定制类")
+
+            /* 收款分析 */
+            .put("receivedTaskStaff", "收款分析-收款任务")
+            .put("arrearsInfoStaff", "收款分析-欠款情况")
+
+            /* 收款分析 */
+            .put("budgetQuotationStaff", "客户分析-预算报价")
+            .put("potentialCustomerAnalysisStaff", "客户分析-潜客分析")
+
+            /*部门品类 */
+            .put("orgCategoryAmt", "销售分析-部门品类金额")
+            .put("orgCategoryQty", "销售分析-部门品类数量")
+
+            /*部门单品 */
+            .put("orgSpuAmt", "销售分析-部门单品金额")
+            .put("orgSpuQty", "销售分析-部门单品数量")
+
+            /*业务员品类 */
+            .put("staffCategoryAmt", "销售分析-部门单品金额")
+            .put("staffCategoryQty", "销售分析-部门单品数量")
+
+            /*业务员单品 */
+            .put("staffSpuAmt", "销售分析-业务员单品金额")
+            .put("staffSpuQty", "销售分析-业务员单品数量")
+
+            /* 订单参考利润 - 品类排行 */
+            .put("saleReferenceProfit1","订单参考利润-品类排行")
+            /* 订单参考利润 - 部门排行 */
+            .put("saleReferenceProfit2","订单参考利润-部门排行")
+            /* 订单参考利润 - 业务员排行 */
+            .put("saleReferenceProfit3","订单参考利润-业务员排行")
+
+            /* 出库参考利润 - 品类排行 */
+            .put("outReferenceProfit1","出库参考利润-品类排行")
+            /* 出库参考利润 - 部门排行 */
+            .put("outReferenceProfit2","出库参考利润-部门排行")
+            /* 出库参考利润 - 业务员排行 */
+            .put("outReferenceProfit3","出库参考利润-业务员排行")
+
+
+            .build();
+
+    private static String getTotal(String str,Map<String,Object> data,List<String> calcStr){
+        String returnStr = str;
+        Pattern dynamic = Pattern.compile(".*\\$\\{([A-Za-z0-9]+)\\}.*");
+        Pattern dynamicLimitCount = Pattern.compile("\\$\\{([A-Za-z0-9]+)\\}");
+        List<String> params = new ArrayList<>();
+        Matcher m = dynamicLimitCount.matcher(str);
+        while (m.find()) {
+            params.add(m.group(1));
+        }
+        for (String it : params) {
+            String value = data.get(it).toString();
+            if(value != null && calcStr.contains(it)){
+                BigDecimal b = new BigDecimal(value);
+                value = b.divide(BigDecimal.valueOf(10000),2, RoundingMode.HALF_UP).toString();
+            }
+            returnStr = returnStr.replaceAll("\\$\\{" + it + "\\}", value);
+        }
+        return returnStr;
+    }
 }