Prechádzať zdrojové kódy

Merge branch 'zzy' into test

zhouzeyu@c-top.com.cn 3 rokov pred
rodič
commit
9868393e90

+ 18 - 15
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/mapper/xml/MaterialReportOverViewV3Mapper.xml

@@ -697,7 +697,14 @@
         application.app_bytedance_material_info t on t.material_id=t1.signature
         <if test='materialType!=null'>
             LEFT JOIN
-            application.app_material_tag_busi_info t2 on  t.material_id=t1.material_id
+            (select material_id from application.app_material_tag_busi_info where
+            <if test='materialType==0'>
+                 parent_id=60155
+            </if>
+            <if test='materialType==1'>
+                 parent_id=60156
+            </if>
+            GROUP BY material_id) t2 on t.material_id=t2.material_id
         </if>
 
         <where>
@@ -721,13 +728,6 @@
             <if test='materialQuality==1'>
                 and t.effect_date BETWEEN #{startDate} and #{endDate}
             </if>
-
-            <if test='materialType==0'>
-                and t2.parent_id=60155
-            </if>
-            <if test='materialType==1'>
-                and t2.parent_id=60156
-            </if>
             <if test='innovative==0'>
                 and t.material_innovate=2
             </if>
@@ -812,8 +812,16 @@
         application.app_kuaishou_material_info t on  t1.signature=t.material_id
         <if test='materialType!=null'>
             LEFT JOIN
-            application.app_material_tag_busi_info t2 on  t.material_id=t1.material_id
+            (select material_id from application.app_material_tag_busi_info where
+            <if test='materialType==0'>
+                 parent_id=60155
+            </if>
+            <if test='materialType==1'>
+                 parent_id=60156
+            </if>
+            GROUP BY material_id) t2 on t.material_id=t2.material_id
         </if>
+
         <where>
             t1.stat_date BETWEEN #{startDate} and #{endDate}
             <if test='dimension=="project" and projects!=null'>
@@ -837,12 +845,7 @@
                     and t.effect_date BETWEEN #{startDate} and #{endDate}
                 </when>
             </choose>
-            <if test='materialType==0'>
-                and t2.parent_id=60155
-            </if>
-            <if test='materialType==1'>
-                and t2.parent_id=60156
-            </if>
+
             <if test='innovative==0'>
                 and t.material_innovate=2
             </if>

+ 3 - 2
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/service/impl/MaterialReportOverViewV2ServiceImpl.java

@@ -357,7 +357,8 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
             //默认消耗必查
             columns.add("cost");
         }
-        String filed = JsonResourceUtil.joinFiled(AccountReportConstants.getDicMapByVideo(), columns);
+
+        String filed = JsonResourceUtil.joinAllFiled(AccountReportConstants.getDicMapByVideoNew());
         List<String> titles = new ArrayList<>(JsonResourceUtil.joinTitle(AccountReportConstants.getDicMapByVideo(), columns));
 
         titles.add(0, "唯一标识");
@@ -425,7 +426,7 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
             columns2.add(columns2.size(), columns.getString(i));
         }
         List<String> titles = getfileIds(AccountReportConstants.getKuaishouVideoReportDict(), columns2);
-        String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.getKuaishouVideoReportMap());
+        String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.getKuaishouVideoReportMapNew());
         String companyId = materialReportOverViewV3Mapper.getCompanyId(requestBody.getString("userId"));
         List<JSONObject> excelData = materialReportOverViewV3Mapper.queryKuaishouMaterialReport(filedAll,
                 Long.parseLong(requestBody.getString("startDate").replace("-", "")),