浏览代码

Merge remote-tracking branch 'origin/master'

yumeng 1 年之前
父节点
当前提交
e0ccb89e45
共有 15 个文件被更改,包括 217 次插入106 次删除
  1. 20 0
      jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/policy/service/impl/CreateSheetServiceImpl.java
  2. 1 0
      jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/entity/vo/SettlementReportBytedanceVo.java
  3. 1 0
      jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/entity/vo/SettlementReportKuaiShouVo.java
  4. 1 0
      jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/entity/vo/SheetBytedanceVo.java
  5. 1 0
      jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/entity/vo/SheetKuaiShouVo.java
  6. 4 0
      jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/mapper/ReportSettlementMapper.java
  7. 60 58
      jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/mapper/xml/IntranetSettlementMapper.xml
  8. 37 1
      jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/mapper/xml/ReportSettlementMapper.xml
  9. 10 0
      jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/service/serviceImpl/ReportSettlementServiceImpl.java
  10. 2 2
      jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/mapper/xml/ManagerSaleValueMapper.xml
  11. 4 4
      jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/service/impl/ManagerSaleValueServiceImpl.java
  12. 58 23
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java
  13. 1 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KsNewGroupReportCtrl.java
  14. 13 13
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaiShouYiCheReportMapper.xml
  15. 4 4
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouOperationReportServiceImpl.java

+ 20 - 0
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/policy/service/impl/CreateSheetServiceImpl.java

@@ -114,6 +114,11 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
         cell = row.createCell(15);
         cell = row.createCell(15);
         cell.setCellValue("政策时间");
         cell.setCellValue("政策时间");
         cell.setCellStyle(style);
         cell.setCellStyle(style);
+
+        cell = row.createCell(16);
+        cell.setCellValue("激活");
+        cell.setCellStyle(style);
+
         sheet.autoSizeColumn(0, true);
         sheet.autoSizeColumn(0, true);
         List<SheetBytedanceVo> resultList = new ArrayList<>(accountIdList.size());
         List<SheetBytedanceVo> resultList = new ArrayList<>(accountIdList.size());
         //获取当前年月的 第一天 和 最后一天
         //获取当前年月的 第一天 和 最后一天
@@ -180,6 +185,9 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
                     vo.setTransferOut(Check.isNull(listAccount) ? "0" : listAccount.get(0).getOrDefault("transferOut", "") + "");//总转出
                     vo.setTransferOut(Check.isNull(listAccount) ? "0" : listAccount.get(0).getOrDefault("transferOut", "") + "");//总转出
                     BeanUtils.copyProperties(voSource, vo, SettlementUtil.getNullPropertyNames(voSource));
                     BeanUtils.copyProperties(voSource, vo, SettlementUtil.getNullPropertyNames(voSource));
                     vo.setTime(stringMap.get("startDate") + "----" + stringMap.get("endDate"));
                     vo.setTime(stringMap.get("startDate") + "----" + stringMap.get("endDate"));
+
+                    String active = reportSettlementMapper.getBytedanceActive(map.get("accountId") + "", stringMap.get("startDate"), stringMap.get("endDate"));
+                    vo.setActive(active);
                     resultList.add(vo);
                     resultList.add(vo);
                     policyDaysList.addAll(SettlementUtil.getAllDatesOfTwoTimes(stringMap.get("startDate"), stringMap.get("endDate")));
                     policyDaysList.addAll(SettlementUtil.getAllDatesOfTwoTimes(stringMap.get("startDate"), stringMap.get("endDate")));
                 }
                 }
@@ -213,6 +221,8 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
                 vo.setTransferOut(Check.isNull(listAccount) ? "0" : listAccount.get(0).getOrDefault("transferOut", "") + "");//总转出
                 vo.setTransferOut(Check.isNull(listAccount) ? "0" : listAccount.get(0).getOrDefault("transferOut", "") + "");//总转出
                 BeanUtils.copyProperties(voSource, vo, SettlementUtil.getNullPropertyNames(voSource));
                 BeanUtils.copyProperties(voSource, vo, SettlementUtil.getNullPropertyNames(voSource));
                 vo.setTime((!Check.isNull(vo.getRebateType()) ? stringMap.get("startDate") + "----" + stringMap.get("endDate") : ""));
                 vo.setTime((!Check.isNull(vo.getRebateType()) ? stringMap.get("startDate") + "----" + stringMap.get("endDate") : ""));
+                String active = reportSettlementMapper.getBytedanceActive(map.get("accountId") + "", stringMap.get("startDate"), stringMap.get("endDate"));
+                vo.setActive(active);
                 resultList.add(vo);
                 resultList.add(vo);
             }
             }
         }
         }
@@ -240,6 +250,7 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
             row.createCell(13).setCellValue(vo.getRebateType());
             row.createCell(13).setCellValue(vo.getRebateType());
             row.createCell(14).setCellValue(vo.getRebateRate());
             row.createCell(14).setCellValue(vo.getRebateRate());
             row.createCell(15).setCellValue(vo.getTime());
             row.createCell(15).setCellValue(vo.getTime());
+            row.createCell(16).setCellValue(vo.getActive());
             // row.setRowStyle(style);
             // row.setRowStyle(style);
         }
         }
     }
     }
@@ -334,6 +345,10 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
         cell.setCellValue("政策时间");
         cell.setCellValue("政策时间");
         cell.setCellStyle(style);
         cell.setCellStyle(style);
 
 
+        cell = row.createCell(18);
+        cell.setCellValue("激活");
+        cell.setCellStyle(style);
+
         sheet.autoSizeColumn(0, true);
         sheet.autoSizeColumn(0, true);
 
 
         List<SheetKuaiShouVo> resultList = new ArrayList<>(accountIdList.size());
         List<SheetKuaiShouVo> resultList = new ArrayList<>(accountIdList.size());
@@ -409,6 +424,8 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
                     vo.setDirectRebateRealRecharged(listInfo.stream().filter(v -> !Check.isNull(v.getDirectRebateRealRecharged())).map(SheetKuaiShouVo::getDirectRebateRealRecharged).reduce(BigDecimal.ZERO, BigDecimal::add));
                     vo.setDirectRebateRealRecharged(listInfo.stream().filter(v -> !Check.isNull(v.getDirectRebateRealRecharged())).map(SheetKuaiShouVo::getDirectRebateRealRecharged).reduce(BigDecimal.ZERO, BigDecimal::add));
                     BeanUtils.copyProperties(voSource, vo, SettlementUtil.getNullPropertyNames(voSource));
                     BeanUtils.copyProperties(voSource, vo, SettlementUtil.getNullPropertyNames(voSource));
                     vo.setTime(stringMap.get("startDate") + "----" + stringMap.get("endDate"));
                     vo.setTime(stringMap.get("startDate") + "----" + stringMap.get("endDate"));
+                    String activation = reportSettlementMapper.getKuaiShouActivation(map.get("accountId") + "", stringMap.get("startDate"), stringMap.get("endDate"));
+                    vo.setActivation(activation);
                     resultList.add(vo);
                     resultList.add(vo);
                     policyDaysList.addAll(SettlementUtil.getAllDatesOfTwoTimes(stringMap.get("startDate"), stringMap.get("endDate")));
                     policyDaysList.addAll(SettlementUtil.getAllDatesOfTwoTimes(stringMap.get("startDate"), stringMap.get("endDate")));
                 }
                 }
@@ -444,6 +461,8 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
                 vo.setDirectRebateRealRecharged(listInfo.stream().filter(v -> !Check.isNull(v.getDirectRebateRealRecharged())).map(SheetKuaiShouVo::getDirectRebateRealRecharged).reduce(BigDecimal.ZERO, BigDecimal::add));
                 vo.setDirectRebateRealRecharged(listInfo.stream().filter(v -> !Check.isNull(v.getDirectRebateRealRecharged())).map(SheetKuaiShouVo::getDirectRebateRealRecharged).reduce(BigDecimal.ZERO, BigDecimal::add));
                 BeanUtils.copyProperties(voSource, vo, SettlementUtil.getNullPropertyNames(voSource));
                 BeanUtils.copyProperties(voSource, vo, SettlementUtil.getNullPropertyNames(voSource));
                 vo.setTime(!Check.isNull(vo.getRebateType()) ? stringMap.get("startDate") + "----" + stringMap.get("endDate") : "");
                 vo.setTime(!Check.isNull(vo.getRebateType()) ? stringMap.get("startDate") + "----" + stringMap.get("endDate") : "");
+                String activation = reportSettlementMapper.getKuaiShouActivation(map.get("accountId") + "", stringMap.get("startDate"), stringMap.get("endDate"));
+                vo.setActivation(activation);
                 resultList.add(vo);
                 resultList.add(vo);
             }
             }
         }
         }
@@ -473,6 +492,7 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
             row.createCell(15).setCellValue(vo.getRebateType());
             row.createCell(15).setCellValue(vo.getRebateType());
             row.createCell(16).setCellValue(vo.getRebateRate());
             row.createCell(16).setCellValue(vo.getRebateRate());
             row.createCell(17).setCellValue(vo.getTime());
             row.createCell(17).setCellValue(vo.getTime());
+            row.createCell(18).setCellValue(vo.getActivation());
         }
         }
     }
     }
 
 

+ 1 - 0
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/entity/vo/SettlementReportBytedanceVo.java

@@ -52,6 +52,7 @@ public class SettlementReportBytedanceVo implements Serializable {
     private String accountName;
     private String accountName;
     private String agentId;
     private String agentId;
     private String agentName;
     private String agentName;
+    private String active;
 
 
 
 
 
 

+ 1 - 0
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/entity/vo/SettlementReportKuaiShouVo.java

@@ -86,6 +86,7 @@ public class SettlementReportKuaiShouVo implements Serializable {
     private String directRebateRealRecharged;
     private String directRebateRealRecharged;
 
 
     private String ksId;
     private String ksId;
+    private String activation;
 
 
 
 
 
 

+ 1 - 0
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/entity/vo/SheetBytedanceVo.java

@@ -37,6 +37,7 @@ public class SheetBytedanceVo implements Serializable {
     private String sharedWalletCost;
     private String sharedWalletCost;
     private String transferIn;
     private String transferIn;
     private String transferOut;
     private String transferOut;
+    private String active;
 
 
 
 
 
 

+ 1 - 0
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/entity/vo/SheetKuaiShouVo.java

@@ -59,6 +59,7 @@ public class SheetKuaiShouVo implements Serializable {
     private String rebateRate;
     private String rebateRate;
 
 
     private String time;
     private String time;
+    private String activation;
 
 
 
 
 
 

+ 4 - 0
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/mapper/ReportSettlementMapper.java

@@ -102,4 +102,8 @@ public interface ReportSettlementMapper {
     List<Map<String, Object>> getAccountAndProductByOperate(String userId);
     List<Map<String, Object>> getAccountAndProductByOperate(String userId);
 
 
 
 
+    String getBytedanceActive(@Param("accountId") String accountId, @Param("startTime") String startTime, @Param("endTime") String endTime);
+
+    String getKuaiShouActivation(@Param("accountId") String accountId, @Param("startTime") String startTime, @Param("endTime") String endTime);
+
 }
 }

+ 60 - 58
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/mapper/xml/IntranetSettlementMapper.xml

@@ -7,66 +7,68 @@
     <select id="getTransactionDayKuaiShouAgentAndAccountInrtanet"
     <select id="getTransactionDayKuaiShouAgentAndAccountInrtanet"
             resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportKuaiShouVo">
             resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportKuaiShouVo">
 
 
-        SELECT
-            *
-        FROM
-            (
-                SELECT
-                    t.*
-                FROM
-                    (
-                        SELECT
-                            date_format(date_time,'%Y%m%d') as 'date',
-                            account_id AS accountId,
-                            total_charged_in_yuan as dailyCharge,
-                            contract_rebate_real_charged_in_yuan as contractRebateRealCharged,
-                            direct_rebate_real_charged_in_yuan as directRebateRealCharged,
-                            ( real_charged_in_yuan + total_rebate_real_charged_in_yuan + credit_real_charged_in_yuan ) realCharged,
-                            account_name AS accountName,
-                            user_id AS ksId
-                        FROM
-                            `jeecg-boot`.ctop_kuaishou_daily_agent
-                        WHERE
-                            total_charged_in_yuan >0
-                          and account_id = #{accountId}
-                    ) t
-                WHERE
-                    t.date >= DATE_FORMAT( #{startTime}, '%Y%m%d' )
-                    and t.date &lt;= DATE_FORMAT(#{endTime}, '%Y%m%d' )
-                ORDER BY
-                    t.date
+        SELECT *
+        FROM (
+                 SELECT t.*
+                 FROM (
+                          SELECT date_format(date_time, '%Y%m%d') as 'date',
+                                 account_id                           AS accountId,
+                                 total_charged_in_yuan                as dailyCharge,
+                                 contract_rebate_real_charged_in_yuan as contractRebateRealCharged,
+                                 direct_rebate_real_charged_in_yuan   as directRebateRealCharged,
+                                 (real_charged_in_yuan + total_rebate_real_charged_in_yuan +
+                                  credit_real_charged_in_yuan)           realCharged,
+                                 account_name                         AS accountName,
+                                 user_id                              AS ksId
+                          FROM `jeecg-boot`.ctop_kuaishou_daily_agent
+                          WHERE total_charged_in_yuan > 0
+                            and account_id = #{accountId}
+                      ) t
+                 WHERE t.date >= DATE_FORMAT(#{startTime}, '%Y%m%d')
+                   and t.date &lt;= DATE_FORMAT(#{endTime}, '%Y%m%d')
+                 ORDER BY t.date
              ) a
              ) a
-                LEFT JOIN (
-                SELECT
-                    t.*,
-                    c.auth_name AS accountNameF,
-                    base.user_id AS ksIdF
-                FROM
-                    (
-                        SELECT
-                            advertiser_id AS accountIdF,
-                            daily_charge as flowDailyCharge,
-                            date_format(date,'%Y%m%d') as 'date',
-                            daily_transfer_in as dailyTransferIn,
-                            daily_transfer_out as dailyTransferOut,
-                            balance as balance,
-                            real_recharged as realRecharged,
+                 LEFT JOIN (
+            SELECT t.*,
+                   c.auth_name  AS accountNameF,
+                   base.user_id AS ksIdF
+            FROM (
+                     SELECT advertiser_id                  AS accountIdF,
+                            daily_charge                   as flowDailyCharge,
+                            date_format(date, '%Y%m%d') as 'date',
+                            daily_transfer_in              as dailyTransferIn,
+                            daily_transfer_out             as dailyTransferOut,
+                            balance                        as balance,
+                            real_recharged                 as realRecharged,
                             contract_rebate_real_recharged as contractRebateRealRecharged,
                             contract_rebate_real_recharged as contractRebateRealRecharged,
-                            direct_rebate_real_recharged as directRebateRealRecharged
-                        FROM
-                            `application`.kuaishou_advertiser_fund_daily_flows
-                        WHERE
-                            advertiser_id = #{accountId}
-                    ) t
-                        LEFT JOIN `jeecg-boot`.ctop_user_allocation c ON t.accountIdF = c.account_id
-                        LEFT JOIN `jeecg-boot`.ctop_kuaishou_advertiser_base_info base ON base.account_id = t.accountIdF
-                WHERE
-                    DATE_FORMAT( t.date, '%Y-%m-%d' ) >= #{startTime}
-                    AND DATE_FORMAT( t.date, '%Y-%m-%d' ) &lt;= #{endTime}
-                ORDER BY
-                    date
-             ) b ON a.accountId = b.accountIdF
-                AND a.date = b.date
+                            direct_rebate_real_recharged   as directRebateRealRecharged
+                     FROM `application`.kuaishou_advertiser_fund_daily_flows
+                     WHERE advertiser_id = #{accountId}
+                 ) t
+                     LEFT JOIN `jeecg-boot`.ctop_user_allocation c ON t.accountIdF = c.account_id
+                     LEFT JOIN `jeecg-boot`.ctop_kuaishou_advertiser_base_info base ON base.account_id = t.accountIdF
+            WHERE DATE_FORMAT(t.date, '%Y-%m-%d') >= #{startTime}
+              AND DATE_FORMAT(t.date, '%Y-%m-%d') &lt;= #{endTime}
+            ORDER BY
+                date
+        ) b ON a.accountId = b.accountIdF
+            AND a.date = b.date
+                 LEFT JOIN (
+        SELECT account_id as 'accountIdC',
+               SUM(activation) as'activation',
+        date_format(stat_date, '%Y%m%d') as 'date'
+        FROM application.kuaishou_account_report_daily_dw
+        WHERE account_id = #{accountId}
+        <if test="startTime !=null and startTime != ''">
+            AND stat_date >= DATE_FORMAT(#{startTime}, '%Y%m%d')
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            AND stat_date &lt;= DATE_FORMAT(#{endTime}, '%Y%m%d')
+        </if>
+        GROUP BY stat_date
+        ORDER BY stat_date
+            ) c ON a.accountId = c.accountIdC
+        AND a.date = c.date
     </select>
     </select>
 </mapper>
 </mapper>
 
 

+ 37 - 1
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/mapper/xml/ReportSettlementMapper.xml

@@ -5,7 +5,9 @@
     <!-- 获取头条 账户 日流水信息 -->
     <!-- 获取头条 账户 日流水信息 -->
     <select id="getAccountTransactionDayBytedance"
     <select id="getAccountTransactionDayBytedance"
             resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportBytedanceVo">
             resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportBytedanceVo">
-        select t.*, c.auth_name as accountName
+        select t.*,
+               c.auth_name as accountName,
+               tt.active
         from (
         from (
                  select id,
                  select id,
                         advertiser_id,
                         advertiser_id,
@@ -39,6 +41,16 @@
                    and advertiser_id = #{accountId}
                    and advertiser_id = #{accountId}
              ) t
              ) t
                  LEFT JOIN ctop_user_allocation c on t.advertiser_id = c.account_id
                  LEFT JOIN ctop_user_allocation c on t.advertiser_id = c.account_id
+                 LEFT JOIN (
+            SELECT account_id,
+                   SUM(active) as 'active',
+                   stat_datetime
+            FROM application.bytedance_advertiser_report_daily_dw
+            WHERE account_id = #{accountId}
+              AND stat_datetime >= DATE_FORMAT(#{startTime}, '%Y%m%d')
+              AND stat_datetime &lt;= DATE_FORMAT(#{endTime}, '%Y%m%d')
+            GROUP BY stat_datetime
+        ) tt ON DATE_FORMAT(t.date, '%Y%m%d') = tt.stat_datetime
         where date >= #{startTime}
         where date >= #{startTime}
           AND date &lt;= #{endTime}
           AND date &lt;= #{endTime}
         ORDER BY date
         ORDER BY date
@@ -365,6 +377,30 @@
 
 
     </select>
     </select>
 
 
+    <select id="getBytedanceActive" resultType="String">
+        SELECT SUM(active) as'active'
+        FROM application.bytedance_advertiser_report_daily_dw
+        WHERE account_id = #{accountId}
+        <if test="startTime !=null and startTime != ''">
+            AND stat_datetime >= DATE_FORMAT(#{startTime}, '%Y%m%d')
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            AND stat_datetime &lt;= DATE_FORMAT(#{endTime}, '%Y%m%d')
+        </if>
+    </select>
+
+    <select id="getKuaiShouActivation" resultType="String">
+        SELECT SUM(activation) as'activation'
+        FROM application.kuaishou_account_report_daily_dw
+        WHERE account_id = #{accountId}
+        <if test="startTime !=null and startTime != ''">
+            AND stat_date >= DATE_FORMAT(#{startTime}, '%Y%m%d')
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            AND stat_date &lt;= DATE_FORMAT(#{endTime}, '%Y%m%d')
+        </if>
+    </select>
+
 
 
     <!-- 查询 头条利润表  返点类型和比列-->
     <!-- 查询 头条利润表  返点类型和比列-->
     <select id="getProfitBytedance" resultType="java.util.LinkedHashMap">
     <select id="getProfitBytedance" resultType="java.util.LinkedHashMap">

+ 10 - 0
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/service/serviceImpl/ReportSettlementServiceImpl.java

@@ -234,6 +234,10 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
                 cell.setCellValue("冻结(¥)");
                 cell.setCellValue("冻结(¥)");
                 cell.setCellStyle(style);
                 cell.setCellStyle(style);
 
 
+                cell = row.createCell(13);
+                cell.setCellValue("激活");
+                cell.setCellStyle(style);
+
                 for (int i = 0; i < settlementList.size(); i++) {
                 for (int i = 0; i < settlementList.size(); i++) {
                     SettlementReportBytedanceVo vo = settlementList.get(i);
                     SettlementReportBytedanceVo vo = settlementList.get(i);
                     //创建行 (表头占0-1行 所以 从 2开始)
                     //创建行 (表头占0-1行 所以 从 2开始)
@@ -254,6 +258,7 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
                     row.createCell(10).setCellValue(vo.getTransferOut());
                     row.createCell(10).setCellValue(vo.getTransferOut());
                     row.createCell(11).setCellValue(vo.getBalance());
                     row.createCell(11).setCellValue(vo.getBalance());
                     row.createCell(12).setCellValue(vo.getFrozen());
                     row.createCell(12).setCellValue(vo.getFrozen());
+                    row.createCell(13).setCellValue(vo.getActive());
                 }
                 }
 
 
                 //查询 图片 url
                 //查询 图片 url
@@ -494,6 +499,10 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
                 cell.setCellValue("日终结余");
                 cell.setCellValue("日终结余");
                 cell.setCellStyle(style);
                 cell.setCellStyle(style);
 
 
+                cell = row.createCell(14);
+                cell.setCellValue("激活");
+                cell.setCellStyle(style);
+
 
 
                 for (int i = 0; i < settlementList.size(); i++) {
                 for (int i = 0; i < settlementList.size(); i++) {
                     SettlementReportKuaiShouVo vo = settlementList.get(i);
                     SettlementReportKuaiShouVo vo = settlementList.get(i);
@@ -516,6 +525,7 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
                     row.createCell(11).setCellValue(vo.getDailyTransferIn());
                     row.createCell(11).setCellValue(vo.getDailyTransferIn());
                     row.createCell(12).setCellValue(vo.getDailyTransferOut());
                     row.createCell(12).setCellValue(vo.getDailyTransferOut());
                     row.createCell(13).setCellValue(vo.getBalance());
                     row.createCell(13).setCellValue(vo.getBalance());
+                    row.createCell(14).setCellValue(vo.getActivation());
                 }
                 }
 
 
 
 

+ 2 - 2
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/mapper/xml/ManagerSaleValueMapper.xml

@@ -107,9 +107,9 @@
         AND user_id in (
         AND user_id in (
         select user_id
         select user_id
         from `application`.app_user_manage
         from `application`.app_user_manage
-        where manage_id IN ('461857c245f54ba5813bcb5900a23092','00d630a129e4487cba5427788a1f08ce')
+        where manage_id IN ('4afe739502ae4258a18c36a000d7ff20','00d630a129e4487cba5427788a1f08ce')
         UNION ALL
         UNION ALL
-        select '461857c245f54ba5813bcb5900a23092'
+        select '4afe739502ae4258a18c36a000d7ff20'
         UNION ALL
         UNION ALL
         select '00d630a129e4487cba5427788a1f08ce'
         select '00d630a129e4487cba5427788a1f08ce'
         )
         )

+ 4 - 4
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/service/impl/ManagerSaleValueServiceImpl.java

@@ -126,7 +126,7 @@ public class ManagerSaleValueServiceImpl extends ServiceImpl<ManagerSaleValueMap
         //运营一部:李超及其下级 李超 id:f6a6843879c949618e4a859140c8a127
         //运营一部:李超及其下级 李超 id:f6a6843879c949618e4a859140c8a127
         List<Long> oneAccountIds = null;
         List<Long> oneAccountIds = null;
         String lichaoId = "f6a6843879c949618e4a859140c8a127";
         String lichaoId = "f6a6843879c949618e4a859140c8a127";
-        //运营二部:兰兰及其下级 兰兰id:461857c245f54ba5813bcb5900a23092,00d630a129e4487cba5427788a1f08ce
+        //运营二部:陈思宇及其下级 陈思宇id:4afe739502ae4258a18c36a000d7ff20,00d630a129e4487cba5427788a1f08ce
         List<Long> twoAccountIds = null;
         List<Long> twoAccountIds = null;
         //1 头条
         //1 头条
         if ("1".equals(mediaId)) {
         if ("1".equals(mediaId)) {
@@ -157,7 +157,7 @@ public class ManagerSaleValueServiceImpl extends ServiceImpl<ManagerSaleValueMap
                 result.put("oneCharge", oneResult.getBigDecimal("totalCharge"));
                 result.put("oneCharge", oneResult.getBigDecimal("totalCharge"));
                 result.put("oneChargeRoi", oneResult.getString("chargeRoi"));
                 result.put("oneChargeRoi", oneResult.getString("chargeRoi"));
 
 
-                //运营二部:兰兰及其下级 兰兰id:461857c245f54ba5813bcb5900a23092
+                //运营二部:陈思宇及其下级 陈思宇id:4afe739502ae4258a18c36a000d7ff20
                 twoAccountIds = baseMapper.querySalesDirectorAccountIds2(companyId, mediaId, saleTeaMber);
                 twoAccountIds = baseMapper.querySalesDirectorAccountIds2(companyId, mediaId, saleTeaMber);
                 JSONObject twoResult = baseMapper.queryTtTodayCharge2(startTime, endTime, hour, twoAccountIds, companyId, days);
                 JSONObject twoResult = baseMapper.queryTtTodayCharge2(startTime, endTime, hour, twoAccountIds, companyId, days);
                 result.put("twoCharge", twoResult.getBigDecimal("totalCharge"));
                 result.put("twoCharge", twoResult.getBigDecimal("totalCharge"));
@@ -194,8 +194,8 @@ public class ManagerSaleValueServiceImpl extends ServiceImpl<ManagerSaleValueMap
                 result.put("oneCharge", oneResult.getBigDecimal("totalCharge"));
                 result.put("oneCharge", oneResult.getBigDecimal("totalCharge"));
                 result.put("oneChargeRoi", oneResult.getString("chargeRoi"));
                 result.put("oneChargeRoi", oneResult.getString("chargeRoi"));
 
 
-                //运营二部:兰兰及其下级 兰兰id:461857c245f54ba5813bcb5900a23092,00d630a129e4487cba5427788a1f08ce
-                //专查询 兰兰组 并去除 郭浩和王雪莹账户
+                //运营二部:陈思宇及其下级 陈思宇id:4afe739502ae4258a18c36a000d7ff20,00d630a129e4487cba5427788a1f08ce
+                //专查询 陈思宇组 并去除 郭浩和王雪莹账户
                 twoAccountIds = baseMapper.querySalesDirectorAccountIds2(companyId, mediaId, saleTeaMber);
                 twoAccountIds = baseMapper.querySalesDirectorAccountIds2(companyId, mediaId, saleTeaMber);
                 JSONObject twoResult = baseMapper.queryKsTodayCharge2(startTime, endTime, hour, twoAccountIds, companyId, days);
                 JSONObject twoResult = baseMapper.queryKsTodayCharge2(startTime, endTime, hour, twoAccountIds, companyId, days);
                 result.put("twoCharge", twoResult.getBigDecimal("totalCharge"));
                 result.put("twoCharge", twoResult.getBigDecimal("totalCharge"));

+ 58 - 23
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java

@@ -1,14 +1,40 @@
 package cn.com.ctop.common.module.service.impl;
 package cn.com.ctop.common.module.service.impl;
 
 
 import cn.com.ctop.common.module.constant.CosConstant;
 import cn.com.ctop.common.module.constant.CosConstant;
-import cn.com.ctop.common.module.entity.*;
-import cn.com.ctop.common.module.enums.MaterialSupplierEnum;
+import cn.com.ctop.common.module.entity.MaterialAscription;
+import cn.com.ctop.common.module.entity.MaterialCutFrame;
+import cn.com.ctop.common.module.entity.MaterialImageInfo;
+import cn.com.ctop.common.module.entity.MaterialInfo;
+import cn.com.ctop.common.module.entity.MaterialParameter;
+import cn.com.ctop.common.module.entity.MaterialTag;
+import cn.com.ctop.common.module.entity.MaterialTagInfo;
+import cn.com.ctop.common.module.entity.Project;
+import cn.com.ctop.common.module.entity.SupplierWatermark;
+import cn.com.ctop.common.module.entity.TagInfo;
+import cn.com.ctop.common.module.entity.TencentWatermarkTemplate;
+import cn.com.ctop.common.module.entity.VideoWatermarkTask;
 import cn.com.ctop.common.module.mapper.MaterialAscriptionMapper;
 import cn.com.ctop.common.module.mapper.MaterialAscriptionMapper;
 import cn.com.ctop.common.module.mapper.MaterialInfoMapper;
 import cn.com.ctop.common.module.mapper.MaterialInfoMapper;
 import cn.com.ctop.common.module.mapper.MaterialParameterMapper;
 import cn.com.ctop.common.module.mapper.MaterialParameterMapper;
 import cn.com.ctop.common.module.mapper.MaterialTagMapper;
 import cn.com.ctop.common.module.mapper.MaterialTagMapper;
-import cn.com.ctop.common.module.service.*;
-import cn.com.ctop.common.module.utils.*;
+import cn.com.ctop.common.module.service.IMaterialCutFrameService;
+import cn.com.ctop.common.module.service.IMaterialImageInfoService;
+import cn.com.ctop.common.module.service.IMaterialInfoService;
+import cn.com.ctop.common.module.service.IMaterialTagInfoService;
+import cn.com.ctop.common.module.service.IProjectService;
+import cn.com.ctop.common.module.service.ISupplierWatermarkService;
+import cn.com.ctop.common.module.service.ISysUserService;
+import cn.com.ctop.common.module.service.ITagInfoService;
+import cn.com.ctop.common.module.service.ITencentWatermarkTemplateService;
+import cn.com.ctop.common.module.service.IVideoWatermarkTaskService;
+import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.CloudVideoProcessUtil;
+import cn.com.ctop.common.module.utils.CosUtils;
+import cn.com.ctop.common.module.utils.LoadFileUtil;
+import cn.com.ctop.common.module.utils.PropertiesUtils;
+import cn.com.ctop.common.module.utils.ResultMapUtils;
+import cn.com.ctop.common.module.utils.StatusCode;
+import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.common.module.vo.ResFileDTO;
 import cn.com.ctop.common.module.vo.ResFileDTO;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
@@ -38,7 +64,12 @@ import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.math.RoundingMode;
 import java.net.URLDecoder;
 import java.net.URLDecoder;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileChannel;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Executors;
 
 
@@ -580,15 +611,15 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
                 if (null != clipId && !"".equals(clipId.trim())) {
                 if (null != clipId && !"".equals(clipId.trim())) {
                     materialAscription.setClipId(clipId);
                     materialAscription.setClipId(clipId);
                 }
                 }
-                String  shotId = ascription.getString("shotId");
-                if(!Check.isNull(shotId)){
+                String shotId = ascription.getString("shotId");
+                if (!Check.isNull(shotId)) {
                     materialAscription.setShotId(shotId);
                     materialAscription.setShotId(shotId);
                     SysUser shot = userService.getById(shotId);
                     SysUser shot = userService.getById(shotId);
                     String shotCode = userService.getRoleCodeByUserId(shotId);
                     String shotCode = userService.getRoleCodeByUserId(shotId);
-                    if("designTeamLeader".equals(shotCode)){
+                    if ("designTeamLeader".equals(shotCode)) {
                         materialAscription.setShotLeaderId(shotId);
                         materialAscription.setShotLeaderId(shotId);
                         materialAscription.setShotLeaderName(shot.getRealname());
                         materialAscription.setShotLeaderName(shot.getRealname());
-                    }else {
+                    } else {
                         materialAscription.setShotLeaderId(shot.getLeaderId());
                         materialAscription.setShotLeaderId(shot.getLeaderId());
                         materialAscription.setShotLeaderName(shot.getLeaderName());
                         materialAscription.setShotLeaderName(shot.getLeaderName());
                     }
                     }
@@ -766,15 +797,15 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
                     materialAscription.setClipId(clipId);
                     materialAscription.setClipId(clipId);
                 }
                 }
 
 
-               String  shotId = ascription.getString("shotId");
-                if(!Check.isNull(shotId)){
+                String shotId = ascription.getString("shotId");
+                if (!Check.isNull(shotId)) {
                     materialAscription.setShotId(shotId);
                     materialAscription.setShotId(shotId);
                     SysUser shot = userService.getById(shotId);
                     SysUser shot = userService.getById(shotId);
                     String shotCode = userService.getRoleCodeByUserId(shotId);
                     String shotCode = userService.getRoleCodeByUserId(shotId);
-                    if("designTeamLeader".equals(shotCode)){
+                    if ("designTeamLeader".equals(shotCode)) {
                         materialAscription.setShotLeaderId(shotId);
                         materialAscription.setShotLeaderId(shotId);
                         materialAscription.setShotLeaderName(shot.getRealname());
                         materialAscription.setShotLeaderName(shot.getRealname());
-                    }else {
+                    } else {
                         materialAscription.setShotLeaderId(shot.getLeaderId());
                         materialAscription.setShotLeaderId(shot.getLeaderId());
                         materialAscription.setShotLeaderName(shot.getLeaderName());
                         materialAscription.setShotLeaderName(shot.getLeaderName());
                     }
                     }
@@ -1036,24 +1067,28 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
                 setList.add(materialInfo);
                 setList.add(materialInfo);
             }
             }
         }
         }
-        List<JSONObject> kuaiShouCostList = materialParameterMapper.getKuaiShouVideoCostList(md5List);
-        List<JSONObject> bytedanceCostList = materialParameterMapper.getBytedanceVideoCostList(md5List);
-        
-        Map<String,BigDecimal> kuaishouMap = new HashMap<>();
+        List<JSONObject> kuaiShouCostList = null;
+        List<JSONObject> bytedanceCostList = null;
+        if (!Check.isNull(md5List)) {
+            kuaiShouCostList = materialParameterMapper.getKuaiShouVideoCostList(md5List);
+            bytedanceCostList = materialParameterMapper.getBytedanceVideoCostList(md5List);
+        }
+
+        Map<String, BigDecimal> kuaishouMap = new HashMap<>();
         for (int i = 0; i < kuaiShouCostList.size(); i++) {
         for (int i = 0; i < kuaiShouCostList.size(); i++) {
             JSONObject jsonObject = kuaiShouCostList.get(i);
             JSONObject jsonObject = kuaiShouCostList.get(i);
-            kuaishouMap.put(jsonObject.getString("signature"),jsonObject.getBigDecimal("charges"));
+            kuaishouMap.put(jsonObject.getString("signature"), jsonObject.getBigDecimal("charges"));
         }
         }
 
 
-        Map<String,BigDecimal> bytedanceMap = new HashMap<>();
+        Map<String, BigDecimal> bytedanceMap = new HashMap<>();
         for (int i = 0; i < bytedanceCostList.size(); i++) {
         for (int i = 0; i < bytedanceCostList.size(); i++) {
             JSONObject jsonObject = bytedanceCostList.get(i);
             JSONObject jsonObject = bytedanceCostList.get(i);
-            bytedanceMap.put(jsonObject.getString("signature"),jsonObject.getBigDecimal("charges"));
+            bytedanceMap.put(jsonObject.getString("signature"), jsonObject.getBigDecimal("charges"));
         }
         }
 
 
-        for (int i = 0; i <setList.size() ; i++) {
+        for (int i = 0; i < setList.size(); i++) {
             MaterialInfo materialInfo = setList.get(i);
             MaterialInfo materialInfo = setList.get(i);
-            if(!Check.isNullMap(kuaishouMap)){
+            if (!Check.isNullMap(kuaishouMap)) {
                 if (!Check.isNull(kuaishouMap.get(materialInfo.getCode()))) {
                 if (!Check.isNull(kuaishouMap.get(materialInfo.getCode()))) {
                     materialInfo.setCost(kuaishouMap.get(materialInfo.getCode()));
                     materialInfo.setCost(kuaishouMap.get(materialInfo.getCode()));
                 } else {
                 } else {
@@ -1061,7 +1096,7 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
                 }
                 }
             }
             }
 
 
-            if(!Check.isNullMap(bytedanceMap)){
+            if (!Check.isNullMap(bytedanceMap)) {
                 if (!Check.isNull(bytedanceMap.get(materialInfo.getCode()))) {
                 if (!Check.isNull(bytedanceMap.get(materialInfo.getCode()))) {
                     materialInfo.setBytedanceCost(bytedanceMap.get(materialInfo.getCode()));
                     materialInfo.setBytedanceCost(bytedanceMap.get(materialInfo.getCode()));
                 } else {
                 } else {

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KsNewGroupReportCtrl.java

@@ -55,7 +55,7 @@ public class KsNewGroupReportCtrl {
         JSONArray accountIds = requestBody.getJSONArray("accountIds");
         JSONArray accountIds = requestBody.getJSONArray("accountIds");
         String userId = requestBody.getString("userId");
         String userId = requestBody.getString("userId");
         //TODO 没有维护快手事业部负责人角色,增加判断
         //TODO 没有维护快手事业部负责人角色,增加判断
-        if ("b73c6a1cafb4469a8c0081acd50f703b".equals(userId) || "228c45f913924639bf20c79ce5dadb16".equals(userId)) {
+        if ("4afe739502ae4258a18c36a000d7ff20".equals(userId) || "228c45f913924639bf20c79ce5dadb16".equals(userId)) {
             accountIds = newPlanReportService.getAccountIdsByMedia();
             accountIds = newPlanReportService.getAccountIdsByMedia();
         } else {
         } else {
             if (!userId.isEmpty()) {
             if (!userId.isEmpty()) {

+ 13 - 13
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaiShouYiCheReportMapper.xml

@@ -3,24 +3,24 @@
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaiShouYiCheReportMapper">
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaiShouYiCheReportMapper">
 
 
     <select id="getMaxHourByProjectIdAndStatDate" resultType="java.lang.Integer">
     <select id="getMaxHourByProjectIdAndStatDate" resultType="java.lang.Integer">
-    SELECT
-	max(t2.stat_hour)
-    FROM
-	ctop_user_allocation t1
-    LEFT JOIN ctop_kuaishou_report_hourly_account t2 ON t1.account_id = t2.account_id
-    WHERE
-	t1.project_id = #{projectId}
-    AND t2.stat_date = #{statDate}
+        SELECT
+            max(t2.stat_hour)
+        FROM
+            ctop_user_allocation t1
+                LEFT JOIN ctop_kuaishou_report_hourly_account t2 ON t1.account_id = t2.account_id
+        WHERE
+            t1.project_id = #{projectId}
+          AND t2.stat_date = #{statDate}
     </select>
     </select>
 
 
     <select id="selectReportByMap" parameterType="java.util.Map" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectReportByMap" parameterType="java.util.Map" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
         SELECT
         (case when t1.system_type = 'android'
         (case when t1.system_type = 'android'
-         then '安卓'
-         when t1.system_type = 'ios'
-         then 'ios'
-         else '-'
-         end
+        then '安卓'
+        when t1.system_type = 'ios'
+        then 'ios'
+        else '-'
+        end
         ) as systemType,
         ) as systemType,
         t1.auth_name authName,
         t1.auth_name authName,
         ROUND(sum(t2.charge) / #{disCount},3) charge,
         ROUND(sum(t2.charge) / #{disCount},3) charge,

+ 4 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouOperationReportServiceImpl.java

@@ -560,8 +560,8 @@ public class KuaishouOperationReportServiceImpl extends ServiceImpl<KuaishouOper
             String roleName = datum.getString("roleName");
             String roleName = datum.getString("roleName");
             if (roleName.contains("经理")) {
             if (roleName.contains("经理")) {
                 BigDecimal managenCharge = null;
                 BigDecimal managenCharge = null;
-                //兰兰和李超 就这俩人定制化
-                if ("461857c245f54ba5813bcb5900a23092".equals(userId) ||
+                //陈思宇和李超 就这俩人定制化
+                if ("4afe739502ae4258a18c36a000d7ff20".equals(userId) ||
                         "f6a6843879c949618e4a859140c8a127".equals(userId)) {
                         "f6a6843879c949618e4a859140c8a127".equals(userId)) {
                     List<String> managers = baseMapper.getTtManagers(userId, DateUtils.getDateInteger(dateMap.get("startDate")), DateUtils.getDateInteger(dateMap.get("endDate")));
                     List<String> managers = baseMapper.getTtManagers(userId, DateUtils.getDateInteger(dateMap.get("startDate")), DateUtils.getDateInteger(dateMap.get("endDate")));
                     managenCharge = baseMapper.getTtManageChargeCommission(Arrays.asList(userId), DateUtils.getDateInteger(dateMap.get("startDate")), DateUtils.getDateInteger(dateMap.get("endDate")));
                     managenCharge = baseMapper.getTtManageChargeCommission(Arrays.asList(userId), DateUtils.getDateInteger(dateMap.get("startDate")), DateUtils.getDateInteger(dateMap.get("endDate")));
@@ -1173,8 +1173,8 @@ public class KuaishouOperationReportServiceImpl extends ServiceImpl<KuaishouOper
             String roleName = datum.getString("roleName");
             String roleName = datum.getString("roleName");
             if (roleName.contains("经理")) {
             if (roleName.contains("经理")) {
                 BigDecimal managenCharge = null;
                 BigDecimal managenCharge = null;
-                //兰兰和李超 就这俩人定制化
-                if ("461857c245f54ba5813bcb5900a23092".equals(userId) ||
+                //陈思宇和李超 就这俩人定制化
+                if ("4afe739502ae4258a18c36a000d7ff20".equals(userId) ||
                         "f6a6843879c949618e4a859140c8a127".equals(userId)) {
                         "f6a6843879c949618e4a859140c8a127".equals(userId)) {
                     List<String> managers = baseMapper.getManagers(userId, DateUtils.getDateInteger(dateMap.get("startDate")), DateUtils.getDateInteger(dateMap.get("endDate")));
                     List<String> managers = baseMapper.getManagers(userId, DateUtils.getDateInteger(dateMap.get("startDate")), DateUtils.getDateInteger(dateMap.get("endDate")));
                     managenCharge = baseMapper.getManageChargeCommission(Arrays.asList(userId), DateUtils.getDateInteger(dateMap.get("startDate")), DateUtils.getDateInteger(dateMap.get("endDate")));
                     managenCharge = baseMapper.getManageChargeCommission(Arrays.asList(userId), DateUtils.getDateInteger(dateMap.get("startDate")), DateUtils.getDateInteger(dateMap.get("endDate")));