Browse Source

Merge branch 'master' into test

yumeng 2 years ago
parent
commit
a24b11d93f

+ 1 - 1
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/policy/controller/CwjsPolicyInfoController.java

@@ -397,7 +397,7 @@ public class CwjsPolicyInfoController {
 
 
 		List<String> userIds = new ArrayList<>();
-		if ("admin".equalsIgnoreCase(roleCode) || "finance".equalsIgnoreCase(roleCode) ){
+		if ("admin".equalsIgnoreCase(roleCode) || "finance".equalsIgnoreCase(roleCode) || "financialReview".equalsIgnoreCase(roleCode)){
 
 		}else if("saleDirector".equalsIgnoreCase(roleCode)){
 			//总监看下属

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

@@ -283,50 +283,55 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
         cell.setCellStyle(style);
 
         cell = row.createCell(5);
-        cell.setCellValue("充值花费");
+        cell.setCellValue("财务流水");
         cell.setCellStyle(style);
 
+
         cell = row.createCell(6);
-        cell.setCellValue("框返花费");
+        cell.setCellValue("充值花费");
         cell.setCellStyle(style);
 
         cell = row.createCell(7);
-        cell.setCellValue("激励花费");
+        cell.setCellValue("框返花费");
         cell.setCellStyle(style);
 
         cell = row.createCell(8);
-        cell.setCellValue("充值转入");
+        cell.setCellValue("激励花费");
         cell.setCellStyle(style);
 
         cell = row.createCell(9);
-        cell.setCellValue("框返转入");
+        cell.setCellValue("充值转入");
         cell.setCellStyle(style);
 
         cell = row.createCell(10);
-        cell.setCellValue("激励转入");
+        cell.setCellValue("框返转入");
         cell.setCellStyle(style);
 
         cell = row.createCell(11);
-        cell.setCellValue("转入");
+        cell.setCellValue("激励转入");
         cell.setCellStyle(style);
 
         cell = row.createCell(12);
-        cell.setCellValue("转出");
+        cell.setCellValue("总转入");
         cell.setCellStyle(style);
 
         cell = row.createCell(13);
-        cell.setCellValue("日终结余");
+        cell.setCellValue("转出");
         cell.setCellStyle(style);
 
         cell = row.createCell(14);
-        cell.setCellValue("返点类型");
+        cell.setCellValue("日终结余");
         cell.setCellStyle(style);
 
         cell = row.createCell(15);
-        cell.setCellValue("返点比例");
+        cell.setCellValue("返点类型");
         cell.setCellStyle(style);
 
         cell = row.createCell(16);
+        cell.setCellValue("返点比例");
+        cell.setCellStyle(style);
+
+        cell = row.createCell(17);
         cell.setCellValue("政策时间");
         cell.setCellStyle(style);
 
@@ -392,6 +397,7 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
 
                     listInfo.removeAll(Collections.singleton(null));
                     vo.setDailyCharge(listInfo.stream().filter(v -> !Check.isNull(v.getDailyCharge())).map(SheetKuaiShouVo::getDailyCharge).reduce(BigDecimal.ZERO, BigDecimal::add));
+                    vo.setFlowDailyCharge(listInfo.stream().filter(v -> !Check.isNull(v.getFlowDailyCharge())).map(SheetKuaiShouVo::getFlowDailyCharge).reduce(BigDecimal.ZERO, BigDecimal::add));
                     vo.setRealCharged(listInfo.stream().filter(v -> !Check.isNull(v.getRealCharged())).map(SheetKuaiShouVo::getRealCharged).reduce(BigDecimal.ZERO, BigDecimal::add));
                     vo.setContractRebateRealCharged(listInfo.stream().filter(v -> !Check.isNull(v.getContractRebateRealCharged())).map(SheetKuaiShouVo::getContractRebateRealCharged).reduce(BigDecimal.ZERO, BigDecimal::add));
                     vo.setDirectRebateRealCharged(listInfo.stream().filter(v -> !Check.isNull(v.getDirectRebateRealCharged())).map(SheetKuaiShouVo::getDirectRebateRealCharged).reduce(BigDecimal.ZERO, BigDecimal::add));
@@ -426,6 +432,7 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
                 List<SheetKuaiShouVo>  listInfo = reportSettlementMapper.getTransactionDayKuaiShouSheet(map.get("accountId") + "", stringMap.get("startDate"), stringMap.get("endDate"));
                 listInfo.removeAll(Collections.singleton(null));
                 vo.setDailyCharge(listInfo.stream().filter(v -> !Check.isNull(v.getDailyCharge())).map(SheetKuaiShouVo::getDailyCharge).reduce(BigDecimal.ZERO, BigDecimal::add));
+                vo.setFlowDailyCharge(listInfo.stream().filter(v -> !Check.isNull(v.getFlowDailyCharge())).map(SheetKuaiShouVo::getFlowDailyCharge).reduce(BigDecimal.ZERO, BigDecimal::add));
                 vo.setRealCharged(listInfo.stream().filter(v -> !Check.isNull(v.getRealCharged())).map(SheetKuaiShouVo::getRealCharged).reduce(BigDecimal.ZERO, BigDecimal::add));
                 vo.setContractRebateRealCharged(listInfo.stream().filter(v -> !Check.isNull(v.getContractRebateRealCharged())).map(SheetKuaiShouVo::getContractRebateRealCharged).reduce(BigDecimal.ZERO, BigDecimal::add));
                 vo.setDirectRebateRealCharged(listInfo.stream().filter(v -> !Check.isNull(v.getDirectRebateRealCharged())).map(SheetKuaiShouVo::getDirectRebateRealCharged).reduce(BigDecimal.ZERO, BigDecimal::add));
@@ -454,18 +461,19 @@ public class CreateSheetServiceImpl implements ICreateSheetService {
             row.createCell(2).setCellValue(vo.getAccountId());
             row.createCell(3).setCellValue(vo.getAccountName());
             row.createCell(4).setCellValue(sf.format(vo.getDailyCharge()));
-            row.createCell(5).setCellValue(sf.format(vo.getRealCharged()));
-            row.createCell(6).setCellValue(sf.format(vo.getContractRebateRealCharged()));
-            row.createCell(7).setCellValue(sf.format(vo.getDirectRebateRealCharged()));
-            row.createCell(8).setCellValue(sf.format(vo.getRealRecharged()));
-            row.createCell(9).setCellValue(sf.format(vo.getContractRebateRealRecharged()));
-            row.createCell(10).setCellValue(sf.format(vo.getDirectRebateRealRecharged()));
-            row.createCell(11).setCellValue(sf.format(vo.getDailyTransferIn()));
-            row.createCell(12).setCellValue(sf.format(vo.getDailyTransferOut()));
-            row.createCell(13).setCellValue(sf.format(vo.getBalance()));
-            row.createCell(14).setCellValue(vo.getRebateType());
-            row.createCell(15).setCellValue(vo.getRebateRate());
-            row.createCell(16).setCellValue(vo.getTime());
+            row.createCell(5).setCellValue(sf.format(vo.getFlowDailyCharge()));
+            row.createCell(6).setCellValue(sf.format(vo.getRealCharged()));
+            row.createCell(7).setCellValue(sf.format(vo.getContractRebateRealCharged()));
+            row.createCell(8).setCellValue(sf.format(vo.getDirectRebateRealCharged()));
+            row.createCell(9).setCellValue(sf.format(vo.getRealRecharged()));
+            row.createCell(10).setCellValue(sf.format(vo.getContractRebateRealRecharged()));
+            row.createCell(11).setCellValue(sf.format(vo.getDirectRebateRealRecharged()));
+            row.createCell(12).setCellValue(sf.format(vo.getDailyTransferIn()));
+            row.createCell(13).setCellValue(sf.format(vo.getDailyTransferOut()));
+            row.createCell(14).setCellValue(sf.format(vo.getBalance()));
+            row.createCell(15).setCellValue(vo.getRebateType());
+            row.createCell(16).setCellValue(vo.getRebateRate());
+            row.createCell(17).setCellValue(vo.getTime());
         }
     }
 

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

@@ -37,6 +37,7 @@ public class SettlementReportKuaiShouVo implements Serializable {
      */
     @ApiModelProperty(value = "总花费(元)")
     private String dailyCharge;
+    private String flowDailyCharge;
     /**
      * 充值话费(元)
      */

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

@@ -23,6 +23,7 @@ public class SheetKuaiShouVo implements Serializable {
 
     @ApiModelProperty(value = "总花费(元)")
     private BigDecimal dailyCharge;
+    private BigDecimal flowDailyCharge;
 
     @ApiModelProperty(value = "充值花费(元)")
     private BigDecimal realCharged;

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

@@ -4,7 +4,8 @@
 
 
     <!-- 获取快手 账户 日流水信息  代理商 和 账户 维度-->
-    <select id="getTransactionDayKuaiShouAgentAndAccountInrtanet" resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportKuaiShouVo">
+    <select id="getTransactionDayKuaiShouAgentAndAccountInrtanet"
+            resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportKuaiShouVo">
 
         SELECT
             *
@@ -44,6 +45,7 @@
                     (
                         SELECT
                             advertiser_id AS accountIdF,
+                            daily_charge as flowDailyCharge,
                             date,
                             daily_transfer_in as dailyTransferIn,
                             daily_transfer_out as dailyTransferOut,

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

@@ -3,7 +3,8 @@
 <mapper namespace="org.jeecg.ctop.finance.settlement.mapper.ReportSettlementMapper">
 
     <!-- 获取头条 账户 日流水信息 -->
-    <select id="getAccountTransactionDayBytedance" resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportBytedanceVo">
+    <select id="getAccountTransactionDayBytedance"
+            resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportBytedanceVo">
         select t.*,c.auth_name as accountName from (select id,
         advertiser_id,
         date,DATE_FORMAT(date,'%Y-%m') as uploadYears,
@@ -35,31 +36,33 @@
         where uploadYears = #{uploadYears}
         ORDER BY date
     </select>
-<!-- 获取头条 账户 日流水信息 汇总页数据 -->
+    <!-- 获取头条 账户 日流水信息 汇总页数据 -->
     <select id="getAccountTransactionDayBytedanceSheet" resultType="java.util.LinkedHashMap">
         SELECT
-            t.advertiser_id accountId,
+        t.advertiser_id accountId,
         ua.auth_name accountName,
         ROUND( SUM( t.balance ), 3 ) balance,
-            ROUND( SUM( t.cash_cost ), 3 ) cash_cost,
-            ROUND( SUM( t.cost ), 3 ) cost,
-            ROUND( SUM( t.frozen ), 3 ) frozen,
-            ROUND( SUM( t.income ), 3 ) income,
-            ROUND( SUM( t.reward_cost ), 3 ) reward_cost,
-            ROUND( SUM( t.shared_wallet_cost ), 3 ) shared_wallet_cost,
-            ROUND( SUM( t.transfer_in ), 3 ) transfer_in,
-            ROUND( SUM( t.transfer_out ), 3 ) transfer_out,
-            ag.agent_id agentId,
-            ag.NAME agentName,
+        ROUND( SUM( t.cash_cost ), 3 ) cash_cost,
+        ROUND( SUM( t.cost ), 3 ) cost,
+        ROUND( SUM( t.frozen ), 3 ) frozen,
+        ROUND( SUM( t.income ), 3 ) income,
+        ROUND( SUM( t.reward_cost ), 3 ) reward_cost,
+        ROUND( SUM( t.shared_wallet_cost ), 3 ) shared_wallet_cost,
+        ROUND( SUM( t.transfer_in ), 3 ) transfer_in,
+        ROUND( SUM( t.transfer_out ), 3 ) transfer_out,
+        ag.agent_id agentId,
+        ag.NAME agentName,
         ua.project_id,
         (SELECT ad.id from ctop_advertiser ad WHERE ad.id = ua.advertiser_id) advertiserId,
         (SELECT ad.name from ctop_advertiser ad WHERE ad.id = ua.advertiser_id) advertiserName,
-        (SELECT pd.id from ctop_project pr, ctop_product pd WHERE ua.project_id = pr.id and pr.product_id = pd.id) productId,
-        (SELECT pd.product_name from ctop_project pr, ctop_product pd WHERE ua.project_id = pr.id and pr.product_id = pd.id) productName
+        (SELECT pd.id from ctop_project pr, ctop_product pd WHERE ua.project_id = pr.id and pr.product_id = pd.id)
+        productId,
+        (SELECT pd.product_name from ctop_project pr, ctop_product pd WHERE ua.project_id = pr.id and pr.product_id =
+        pd.id) productName
 
 
         FROM
-            ctop_account_transaction_day t
+        ctop_account_transaction_day t
         LEFT JOIN (SELECT DISTINCT account_id,agent_id from ctop_agent_account where 1 = 1
         <if test='accountIds != null and accountIds.size() > 0'>
             AND account_id in
@@ -68,12 +71,12 @@
                 #{item}
             </foreach>
         </if>
-            ) ac ON t.advertiser_id = ac.account_id
-                LEFT JOIN ctop_cwjs_agent_info ag ON ag.agent_id = ac.agent_id
-                LEFT JOIN ctop_user_allocation ua on ua.account_id = t.advertiser_id
+        ) ac ON t.advertiser_id = ac.account_id
+        LEFT JOIN ctop_cwjs_agent_info ag ON ag.agent_id = ac.agent_id
+        LEFT JOIN ctop_user_allocation ua on ua.account_id = t.advertiser_id
         WHERE
-            t.cost > 0
-          AND DATE_FORMAT( t.date, '%Y-%m' ) = #{uploadYears}
+        t.cost > 0
+        AND DATE_FORMAT( t.date, '%Y-%m' ) = #{uploadYears}
         <if test='accountIds != null and accountIds.size() > 0'>
             AND t.advertiser_id in
             <foreach collection="accountIds" item="item" separator=","
@@ -82,7 +85,7 @@
             </foreach>
         </if>
         GROUP BY
-            t.advertiser_id
+        t.advertiser_id
     </select>
 
     <!-- 查询 头条 账户id-->
@@ -125,16 +128,16 @@
         ctop_account_transaction_day
         WHERE
         cost > 0
-    <if test="uploadYears !=null and uploadYears != ''">
-        AND DATE_FORMAT( date, '%Y-%m' ) =  #{uploadYears}
-    </if>
-    <if test='accountIds !=null and accountIds.size() >0'>
-        AND advertiser_id in
-        <foreach collection="accountIds" item="item" separator=","
-                 open="(" close=")">
-            #{item}
-        </foreach>
-    </if>
+        <if test="uploadYears !=null and uploadYears != ''">
+            AND DATE_FORMAT( date, '%Y-%m' ) = #{uploadYears}
+        </if>
+        <if test='accountIds !=null and accountIds.size() >0'>
+            AND advertiser_id in
+            <foreach collection="accountIds" item="item" separator=","
+                     open="(" close=")">
+                #{item}
+            </foreach>
+        </if>
         GROUP BY
         advertiser_id
     </select>
@@ -147,30 +150,21 @@
         ctop_kuaishou_daily_agent
         WHERE
         total_charged_in_yuan > 0
-     <if test="uploadYears !=null and uploadYears != ''">
-        AND DATE_FORMAT( date_time, '%Y-%m' ) =  #{uploadYears}
-    </if>
-    <if test='accountIds != null and accountIds.size() > 0'>
-        AND account_id in
-        <foreach collection="accountIds" item="item" separator=","
-                 open="(" close=")">
-            #{item}
-        </foreach>
-    </if>
+        <if test="uploadYears !=null and uploadYears != ''">
+            AND DATE_FORMAT( date_time, '%Y-%m' ) = #{uploadYears}
+        </if>
+        <if test='accountIds != null and accountIds.size() > 0'>
+            AND account_id in
+            <foreach collection="accountIds" item="item" separator=","
+                     open="(" close=")">
+                #{item}
+            </foreach>
+        </if>
         GROUP BY
         account_id
     </select>
 
 
-
-
-
-
-
-
-
-
-
     <!-- 查询 头条 账户 图片-->
     <select id="getAccountImagesBytedance" resultType="java.lang.String">
         SELECT
@@ -183,7 +177,8 @@
     </select>
 
     <!-- 获取快手 账户 日流水信息  账户维度-->
-    <select id="getAccountTransactionDayKuaiShou" resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportKuaiShouVo">
+    <select id="getAccountTransactionDayKuaiShou"
+            resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportKuaiShouVo">
         select t.*,c.auth_name as accountName,
                base.user_id as ksId from (select id,
                                                            account_id,
@@ -202,7 +197,8 @@
     </select>
 
     <!-- 获取快手 账户 日流水信息  代理商维度-->
-    <select id="getAccountTransactionDayKuaiShouAgent" resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportKuaiShouVo">
+    <select id="getAccountTransactionDayKuaiShouAgent"
+            resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportKuaiShouVo">
 
         SELECT
             t.*
@@ -231,7 +227,8 @@
     </select>
 
     <!-- 获取快手 账户 日流水信息  代理商 和 账户 维度-->
-    <select id="getTransactionDayKuaiShouAgentAndAccount" resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportKuaiShouVo">
+    <select id="getTransactionDayKuaiShouAgentAndAccount"
+            resultType="org.jeecg.ctop.finance.settlement.entity.vo.SettlementReportKuaiShouVo">
         SELECT
             *
         FROM
@@ -303,14 +300,14 @@
         FROM
         ctop_account_transaction_day d
         WHERE d.cost >0
-    <if test="startTime !=null and startTime != ''">
-        AND d.date &gt;= #{startTime}
-    </if>
-    <if test="endTime !=null and endTime != ''">
-        AND d.date &lt;= #{endTime}
-    </if>
+        <if test="startTime !=null and startTime != ''">
+            AND d.date &gt;= #{startTime}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            AND d.date &lt;= #{endTime}
+        </if>
         GROUP BY d.advertiser_id;
-</select>
+    </select>
 
     <!-- 查询 头条利润表 所用账户-->
     <select id="getProfitBytedanceAccountCost" resultType="java.util.LinkedHashMap">
@@ -319,30 +316,34 @@
         ROUND(SUM( d.cost ),2) AS cost,
         ROUND(SUM( d.cash_cost ),2) AS cashCost,
         ROUND(SUM( d.reward_cost ),2) as rewardCost,
-        IFNULL((SELECT a.name from ctop_user_allocation u,ctop_advertiser a where d.advertiser_id = u.account_id and u.advertiser_id = a.id),(SELECT a.name
-        from ctop_cwjs_settlement_info c ,ctop_advertiser a where c.account_id = d.advertiser_id and c.advertiser_id = a.id)) as advertiserName,
+        IFNULL((SELECT a.name from ctop_user_allocation u,ctop_advertiser a where d.advertiser_id = u.account_id and
+        u.advertiser_id = a.id),(SELECT a.name
+        from ctop_cwjs_settlement_info c ,ctop_advertiser a where c.account_id = d.advertiser_id and c.advertiser_id =
+        a.id)) as advertiserName,
         IFNULL((SELECT
         p.product_name
-        FROM ctop_user_allocation u,ctop_project pj,ctop_product p where d.advertiser_id = u.account_id and u.project_id = pj.id and pj.product_id = p.id
+        FROM ctop_user_allocation u,ctop_project pj,ctop_product p where d.advertiser_id = u.account_id and u.project_id
+        = pj.id and pj.product_id = p.id
         ),(SELECT p.product_name
-        FROM ctop_cwjs_settlement_info c,ctop_product p where d.advertiser_id = c.account_id and c.product_id = p.id)) productName
+        FROM ctop_cwjs_settlement_info c,ctop_product p where d.advertiser_id = c.account_id and c.product_id = p.id))
+        productName
         FROM
         ctop_account_transaction_day d
-<where>
-    <if test="accountId !=null and accountId != ''">
-        AND d.advertiser_id = #{accountId}
-    </if>
-    <if test="startTime !=null and startTime != ''">
-        AND d.date &gt;= #{startTime}
-    </if>
-    <if test="endTime !=null and endTime != ''">
-        AND d.date &lt;= #{endTime}
-    </if>
-</where>
+        <where>
+            <if test="accountId !=null and accountId != ''">
+                AND d.advertiser_id = #{accountId}
+            </if>
+            <if test="startTime !=null and startTime != ''">
+                AND d.date &gt;= #{startTime}
+            </if>
+            <if test="endTime !=null and endTime != ''">
+                AND d.date &lt;= #{endTime}
+            </if>
+        </where>
         GROUP BY d.advertiser_id
         limit 1
 
-</select>
+    </select>
 
     <!-- 查询 头条利润表 总花费-->
     <select id="getProfitBytedanceCost" resultType="java.util.LinkedHashMap">
@@ -374,7 +375,6 @@
     </select>
 
 
-
     <!-- 查询 头条利润表  返点类型和比列-->
     <select id="getProfitBytedance" resultType="java.util.LinkedHashMap">
         SELECT t.* from (
@@ -394,13 +394,13 @@
         <if test="mediaType !=null and mediaType != ''">
             AND cp.media_type = #{mediaType}
         </if>
-            AND r.advertiser_name = #{advertiserName}
-            AND r.product_name = #{productName}
+        AND r.advertiser_name = #{advertiserName}
+        AND r.product_name = #{productName}
         <if test="saleId !=null and saleId != ''">
             AND r.create_user_id = #{saleId}
         </if>
         <if test="startTime !=null and startTime != ''">
-            AND  r.policy_date &gt;= #{startTime}
+            AND r.policy_date &gt;= #{startTime}
         </if>
         <if test="endTime !=null and endTime != ''">
             AND r.policy_date &lt;= #{endTime}
@@ -426,12 +426,12 @@
         </if>
         AND r.advertiser_name = #{advertiserName}
         AND r.product_name = #{productName}
-          <if test="saleId !=null and saleId != ''">
-              AND r.create_user_id = #{saleId}
-          </if>
+        <if test="saleId !=null and saleId != ''">
+            AND r.create_user_id = #{saleId}
+        </if>
 
         <if test="startTime !=null and startTime != ''">
-            AND  r.policy_date &gt;= #{startTime}
+            AND r.policy_date &gt;= #{startTime}
         </if>
         <if test="endTime !=null and endTime != ''">
             AND r.policy_date &lt;= #{endTime}
@@ -493,12 +493,12 @@
         SELECT k.* from
         ctop_kuaishou_daily_agent k
         where k.total_charged_in_yuan !=0
-            <if test="startTime !=null and startTime != ''">
-                AND k.date_time &gt;= #{startTime}
-            </if>
-            <if test="endTime !=null and endTime != ''">
-                AND k.date_time &lt;= #{endTime}
-            </if>
+        <if test="startTime !=null and startTime != ''">
+            AND k.date_time &gt;= #{startTime}
+        </if>
+        <if test="endTime !=null and endTime != ''">
+            AND k.date_time &lt;= #{endTime}
+        </if>
         GROUP BY k.account_id
     </select>
 
@@ -508,14 +508,19 @@
         d.account_id as accountId,
         d.user_id AS ksId,
         round(SUM(d.total_charged_in_yuan),3) AS cost,
-        round(SUM((d.real_charged_in_yuan + d.total_rebate_real_charged_in_yuan + d.credit_real_charged_in_yuan)),3) as cashCost,
-        IFNULL((SELECT a.name from ctop_user_allocation u,ctop_advertiser a where d.account_id = u.account_id and u.advertiser_id = a.id),(SELECT a.name
-        from ctop_cwjs_settlement_info c ,ctop_advertiser a where c.account_id = d.account_id and c.advertiser_id = a.id)) as advertiserName,
+        round(SUM((d.real_charged_in_yuan + d.total_rebate_real_charged_in_yuan + d.credit_real_charged_in_yuan)),3) as
+        cashCost,
+        IFNULL((SELECT a.name from ctop_user_allocation u,ctop_advertiser a where d.account_id = u.account_id and
+        u.advertiser_id = a.id),(SELECT a.name
+        from ctop_cwjs_settlement_info c ,ctop_advertiser a where c.account_id = d.account_id and c.advertiser_id =
+        a.id)) as advertiserName,
         IFNULL((SELECT
         p.product_name
-        FROM ctop_user_allocation u,ctop_project pj,ctop_product p where d.account_id = u.account_id and u.project_id = pj.id and pj.product_id = p.id
+        FROM ctop_user_allocation u,ctop_project pj,ctop_product p where d.account_id = u.account_id and u.project_id =
+        pj.id and pj.product_id = p.id
         ),(SELECT p.product_name
-        FROM ctop_cwjs_settlement_info c,ctop_product p where d.account_id = c.account_id and c.product_id = p.id)) productName
+        FROM ctop_cwjs_settlement_info c,ctop_product p where d.account_id = c.account_id and c.product_id = p.id))
+        productName
         FROM
         ctop_kuaishou_daily_agent d
         <where>
@@ -542,14 +547,19 @@
         (SELECT ua.auth_name from ctop_user_allocation ua where ua.account_id = d.account_id) as accountName,
         d.user_id AS ksId,
         round(SUM(d.total_charged_in_yuan),3) AS cost,
-        round(SUM((d.real_charged_in_yuan + d.total_rebate_real_charged_in_yuan + d.credit_real_charged_in_yuan)),3) as cashCost,
-        IFNULL((SELECT a.name from ctop_user_allocation u,ctop_advertiser a where d.account_id = u.account_id and u.advertiser_id = a.id),(SELECT a.name
-        from ctop_cwjs_settlement_info c ,ctop_advertiser a where c.account_id = d.account_id and c.advertiser_id = a.id)) as advertiserName,
+        round(SUM((d.real_charged_in_yuan + d.total_rebate_real_charged_in_yuan + d.credit_real_charged_in_yuan)),3) as
+        cashCost,
+        IFNULL((SELECT a.name from ctop_user_allocation u,ctop_advertiser a where d.account_id = u.account_id and
+        u.advertiser_id = a.id),(SELECT a.name
+        from ctop_cwjs_settlement_info c ,ctop_advertiser a where c.account_id = d.account_id and c.advertiser_id =
+        a.id)) as advertiserName,
         IFNULL((SELECT
         p.product_name
-        FROM ctop_user_allocation u,ctop_project pj,ctop_product p where d.account_id = u.account_id and u.project_id = pj.id and pj.product_id = p.id
+        FROM ctop_user_allocation u,ctop_project pj,ctop_product p where d.account_id = u.account_id and u.project_id =
+        pj.id and pj.product_id = p.id
         ),(SELECT p.product_name
-        FROM ctop_cwjs_settlement_info c,ctop_product p where d.account_id = c.account_id and c.product_id = p.id)) productName
+        FROM ctop_cwjs_settlement_info c,ctop_product p where d.account_id = c.account_id and c.product_id = p.id))
+        productName
         FROM
         ctop_kuaishou_daily_agent d
         <where>
@@ -663,11 +673,9 @@
     </select>
 
 
-
-
-
     <!-- 获取快手 账户 日流水信息  代理商 和 账户 结算单 -汇总页-->
-    <select id="getTransactionDayKuaiShouSheet" resultType="org.jeecg.ctop.finance.settlement.entity.vo.SheetKuaiShouVo">
+    <select id="getTransactionDayKuaiShouSheet"
+            resultType="org.jeecg.ctop.finance.settlement.entity.vo.SheetKuaiShouVo">
         SELECT
             *,
             IFNULL(b.balance1,0) as balance
@@ -708,6 +716,7 @@
                     (
                         SELECT
                             account_id AS accountIdF,
+                             daily_charge as flowDailyCharge,
                             date,
                             daily_transfer_in as dailyTransferIn,
                             daily_transfer_out as dailyTransferOut,
@@ -735,10 +744,4 @@
     </select>
 
 
-
-
-
-
-
-
 </mapper>

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

@@ -422,38 +422,42 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
                 cell.setCellStyle(style);
 
                 cell = row.createCell(4);
-                cell.setCellValue("充值花费");
+                cell.setCellValue("财务流水");
                 cell.setCellStyle(style);
 
                 cell = row.createCell(5);
-                cell.setCellValue("框返花费");
+                cell.setCellValue("充值花费");
                 cell.setCellStyle(style);
 
                 cell = row.createCell(6);
-                cell.setCellValue("激励花费");
+                cell.setCellValue("框返花费");
                 cell.setCellStyle(style);
 
                 cell = row.createCell(7);
-                cell.setCellValue("充值转入");
+                cell.setCellValue("激励花费");
                 cell.setCellStyle(style);
 
                 cell = row.createCell(8);
-                cell.setCellValue("框返转入");
+                cell.setCellValue("充值转入");
                 cell.setCellStyle(style);
 
                 cell = row.createCell(9);
-                cell.setCellValue("激励转入");
+                cell.setCellValue("框返转入");
                 cell.setCellStyle(style);
 
                 cell = row.createCell(10);
-                cell.setCellValue("转入");
+                cell.setCellValue("激励转入");
                 cell.setCellStyle(style);
 
                 cell = row.createCell(11);
-                cell.setCellValue("转出");
+                cell.setCellValue("总转入");
                 cell.setCellStyle(style);
 
                 cell = row.createCell(12);
+                cell.setCellValue("转出");
+                cell.setCellStyle(style);
+
+                cell = row.createCell(13);
                 cell.setCellValue("日终结余");
                 cell.setCellStyle(style);
 
@@ -469,15 +473,16 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
                     row.createCell(1).setCellValue(vo.getKsId());
                     row.createCell(2).setCellValue(vo.getAccountId());
                     row.createCell(3).setCellValue(vo.getDailyCharge());
-                    row.createCell(4).setCellValue(vo.getRealCharged());
-                    row.createCell(5).setCellValue(vo.getContractRebateRealCharged());
-                    row.createCell(6).setCellValue(vo.getDirectRebateRealCharged());
-                    row.createCell(7).setCellValue(vo.getRealRecharged());
-                    row.createCell(8).setCellValue(vo.getContractRebateRealRecharged());
-                    row.createCell(9).setCellValue(vo.getDirectRebateRealRecharged());
-                    row.createCell(10).setCellValue(vo.getDailyTransferIn());
-                    row.createCell(11).setCellValue(vo.getDailyTransferOut());
-                    row.createCell(12).setCellValue(vo.getBalance());
+                    row.createCell(4).setCellValue(vo.getFlowDailyCharge());
+                    row.createCell(5).setCellValue(vo.getRealCharged());
+                    row.createCell(6).setCellValue(vo.getContractRebateRealCharged());
+                    row.createCell(7).setCellValue(vo.getDirectRebateRealCharged());
+                    row.createCell(8).setCellValue(vo.getRealRecharged());
+                    row.createCell(9).setCellValue(vo.getContractRebateRealRecharged());
+                    row.createCell(10).setCellValue(vo.getDirectRebateRealRecharged());
+                    row.createCell(11).setCellValue(vo.getDailyTransferIn());
+                    row.createCell(12).setCellValue(vo.getDailyTransferOut());
+                    row.createCell(13).setCellValue(vo.getBalance());
                 }
 
 

+ 0 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -987,8 +987,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             headers.put("Content-Type", " application/json");
             String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), headers);
             JSONObject resultJson = JSONObject.parseObject(result);
-            System.out.println("入参:"+requestJson.toJSONString());
-            System.out.println("返回:"+resultJson);
             log.info("【快手】建组返回,accountId:{},---结果:{}", advertiserId, resultJson);
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");
@@ -2179,8 +2177,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             header.put("Access-Token", accessToken);
             String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), header);
             JSONObject resultJson = JSONObject.parseObject(result);
-            System.out.println("创意入参:"+requestJson.toJSONString());
-            System.out.println("创意返回:"+resultJson);
             log.info("【快手】建创意返回,accountId:{},---结果:{}", advertiserId, resultJson);
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");