Pārlūkot izejas kodu

垫款 初版1.3优化修改 头条维度的运营数据详情、运营组数据、项目列表新增一列「项目基建数」

zhaoxian 2 gadi atpakaļ
vecāks
revīzija
c07a1e8a11

+ 4 - 0
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/entity/vo/KuaiShouOperateGroupVo.java

@@ -57,6 +57,10 @@ public class KuaiShouOperateGroupVo implements Serializable {
     @Excel(name = "基建数量",width = 15)
     private long unitNum;//组
 
+    @Excel(name = "新上项目数",width = 15)
+    private Integer newProjectNum;
+
+
 
     public KuaiShouOperateGroupVo() {}
     public KuaiShouOperateGroupVo(String userId,String realname) {

+ 3 - 0
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/entity/vo/KuaiShouOperateProjectVo.java

@@ -122,6 +122,9 @@ public class KuaiShouOperateProjectVo {
     @ApiModelProperty(value = "基建数")
     private Integer newUnitNum;
 
+    @Excel(name = "新上项目数",width = 15)
+    private Integer newProjectNum;
+
     @Excel(name = "上传助手素材数")
     @ApiModelProperty(value = "上传助手素材数")
     private long adspNum;

+ 3 - 0
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/entity/vo/KuaiShouOperateVo.java

@@ -43,6 +43,9 @@ public class KuaiShouOperateVo implements Serializable {
     @Excel(name = "新上组数",width = 15)
     private Integer newUnitNum;
 
+    @Excel(name = "新上项目数",width = 15)
+    private Integer newProjectNum;
+
 
 
 

+ 1 - 0
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/mapper/xml/MaterialStareMapper.xml

@@ -322,6 +322,7 @@
         IFNULL((SUM(abi.new_ad_num) - SUM(abi.trust_campaign_num)),0) as trustUnitNum,
         IFNULL(SUM( abi.new_video_num ),0) AS newVideoNum,
         IFNULL(SUM( abi.new_hot_num ),0) AS newHotNum,
+        IFNULL(SUM( abi.new_cpd_project_num ),0) AS newCpdProjectNum,
         IFNULL(SUM( abi.new_ad_num ),0) AS newUnitNum
         from application.app_bytedance_account_base_info_d abi,
         `jeecg-boot`.ctop_user_allocation u

+ 20 - 16
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/service/impl/MaterialStareServiceImpl.java

@@ -6,19 +6,19 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
 import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
-import com.google.gson.JsonObject;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.Workbook;
-import org.checkerframework.checker.units.qual.A;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.entity.SysUser;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.ctop.material.constants.Check;
-import org.jeecg.ctop.material.entity.vo.*;
+import org.jeecg.ctop.material.entity.vo.KuaiShouAccountPieVo;
+import org.jeecg.ctop.material.entity.vo.KuaiShouOperateAccountVo;
+import org.jeecg.ctop.material.entity.vo.KuaiShouOperateGroupVo;
+import org.jeecg.ctop.material.entity.vo.KuaiShouOperateProjectVo;
+import org.jeecg.ctop.material.entity.vo.KuaiShouOperateVo;
 import org.jeecg.ctop.material.mapper.MaterialStareMapper;
 import org.jeecg.ctop.material.service.MaterialStareService;
-import org.jeecg.ctop.material.utils.FeidNotNullUtils;
 import org.jeecg.ctop.material.utils.LinkUtil;
 import org.jeecg.ctop.material.utils.ListPageUtil;
 import org.springframework.stereotype.Service;
@@ -29,10 +29,14 @@ import java.math.BigDecimal;
 import java.net.URLEncoder;
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import java.util.stream.Collectors;
-import java.util.stream.DoubleStream;
-import java.util.stream.IntStream;
 
 /**
  * 盯盘接口
@@ -493,6 +497,7 @@ public class MaterialStareServiceImpl implements MaterialStareService {
                     //operate.setNewEffectNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newEffectNum"));//有效
                     operate.setNewCampaignNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newCampaignNum"));//计划
                     operate.setNewUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum") + newUnitNumNow);//组
+                    operate.setNewProjectNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newCpdProjectNum"));//组
 
                     //List<KuaiShouOperateVo> userOperate = materialStareMapper.getKuaiShouOperateInfo(lastTimeStart,lastTimeEnd,userSet);
                     List<KuaiShouOperateVo> userOperate = materialStareMapper.getBytedanceOperateInfo(lastTimeStart, lastTimeEnd, ids);
@@ -751,6 +756,7 @@ public class MaterialStareServiceImpl implements MaterialStareService {
                     projectInfo.setNewVideoNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newVideoNum"));//上新
                     projectInfo.setNewHotNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newHotNum"));//爆款
                     projectInfo.setNewUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum"));//基建数
+                    projectInfo.setNewProjectNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newCpdProjectNum"));//基建数
                     //projectInfo.setTrustUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("trustUnitNum"));//智能托管
 
 
@@ -1561,24 +1567,22 @@ public class MaterialStareServiceImpl implements MaterialStareService {
                 //当天
                 int newUnitNumNow = 0;
                 if (startDate == nowDate || entDate == nowDate) {
-                    JSONObject newEffect = new JSONObject();
-                    if (mediaType.equals("1")) {
-                        //查询 当天有效 上新计划 上新组
-                        newEffect = materialStareMapper.getBytedanceAccountBaseByUserId(operatorUserIds, null, null, nowDate, nowDate);
-                    } else {
+                    if (!mediaType.equals("1")) {
                         //查询 当天有效 上新计划 上新组
-                        newEffect = materialStareMapper.getKuaiShouAccountNowBaseByUserId(operatorUserIds, null, null, nowDate, nowDate);
+                        JSONObject newEffect = materialStareMapper.getKuaiShouAccountNowBaseByUserId(operatorUserIds, null, null, nowDate, nowDate);
+                        newUnitNumNow = Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum");//组
                     }
-                    newUnitNumNow = Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum");//组
                 }
 
                 if (mediaType.equals("1")) {
+                    JSONObject newEffect = materialStareMapper.getBytedanceAccountBaseByUserId(operatorUserIds, null, null, startDate, entDate);
+                    newUnitNumNow = Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum");//组
+                    groupVo.setNewProjectNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newCpdProjectNum"));
                 } else {
                     //查询 历史上新组
                     JSONObject newEffect = materialStareMapper.getKuaiShouAccountBaseByUserId(operatorUserIds, null, null, startDate, entDate);
                     newUnitNumNow = Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum") + newUnitNumNow;
                 }
-
                 //基建数量
                 groupVo.setUnitNum(newUnitNumNow);//组
             }

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/finance/payment/mapper/xml/FinancePaymentRechargeApplicationMapper.xml

@@ -20,7 +20,7 @@
                         t1.files,
                         t1.update_time
                  FROM finance_payment_recharge_application t1
-                          LEFT JOIN sys_user_role t3 ON t1.applicanter_id = t3.user_id
+                          LEFT JOIN sys_user_role t3 ON t1.revieweder_id = t3.user_id
                           LEFT JOIN sys_role t4 ON t3.role_id = t4.id
                  WHERE t1.id = #{id}
              ) t