Преглед на файлове

Merge remote-tracking branch 'origin/dev' into dev

顾绍勇 преди 5 години
родител
ревизия
4de6b9233e

+ 7
- 0
src/main/java/com/huiju/estateagents/excel/ActivityStatistics/TsChannelDaily.java Целия файл

1
 package com.huiju.estateagents.excel.ActivityStatistics;
1
 package com.huiju.estateagents.excel.ActivityStatistics;
2
 
2
 
3
+import com.alibaba.excel.annotation.ExcelIgnore;
3
 import com.alibaba.excel.annotation.ExcelProperty;
4
 import com.alibaba.excel.annotation.ExcelProperty;
4
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
5
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
5
 import lombok.Data;
6
 import lombok.Data;
48
     @ExcelProperty(value = "访问次数", index = 5)
49
     @ExcelProperty(value = "访问次数", index = 5)
49
     private Integer visitNum;
50
     private Integer visitNum;
50
 
51
 
52
+    /**
53
+     * 活动ID
54
+     */
55
+    @ExcelIgnore
56
+    private String targetId;
57
+
51
 }
58
 }

+ 8
- 0
src/main/java/com/huiju/estateagents/service/impl/TaChannelServiceImpl.java Целия файл

60
             orderType = "desc";
60
             orderType = "desc";
61
         }
61
         }
62
         IPage<TsActivityDaily> data = taChannelMapper.getChannelIntroductionList(pg, orgId,startDate,endDate,channelType,buildingId, channelId, sortField, orderType,taPersonBuildings);
62
         IPage<TsActivityDaily> data = taChannelMapper.getChannelIntroductionList(pg, orgId,startDate,endDate,channelType,buildingId, channelId, sortField, orderType,taPersonBuildings);
63
+        List<TsActivityDaily> records = data.getRecords();
64
+        records.forEach(e -> {
65
+            List<ChannelVisitPersonNum> channelPersonNumListExport = taChannelMapper.getChannelPersonNumListExport(orgId, channelId, e.getTargetId(), e.getTargetType(), buildingId, startDate, endDate);
66
+            e.setVisitPersons(channelPersonNumListExport.size());
67
+        });
63
         return ResponseBean.success(data);
68
         return ResponseBean.success(data);
64
     }
69
     }
65
 
70
 
135
     public List<TsChannelDaily> getChannelIntroductionListExport(Integer orgId, LocalDate startDate, LocalDate endDate, String channelType, String buildingId, Integer channelId, List<TaPersonBuilding> taPersonBuildings) {
140
     public List<TsChannelDaily> getChannelIntroductionListExport(Integer orgId, LocalDate startDate, LocalDate endDate, String channelType, String buildingId, Integer channelId, List<TaPersonBuilding> taPersonBuildings) {
136
         List<TsChannelDaily> channelIntroductionListExport = taChannelMapper.getChannelIntroductionListExport(orgId, startDate, endDate, channelType, buildingId, channelId,taPersonBuildings);
141
         List<TsChannelDaily> channelIntroductionListExport = taChannelMapper.getChannelIntroductionListExport(orgId, startDate, endDate, channelType, buildingId, channelId,taPersonBuildings);
137
         channelIntroductionListExport.forEach(e -> {
142
         channelIntroductionListExport.forEach(e -> {
143
+            List<ChannelVisitPersonNum> channelPersonNumListExport = taChannelMapper.getChannelPersonNumListExport(orgId, channelId, e.getTargetId(), e.getTargetType(), buildingId, startDate, endDate);
144
+            e.setVisitPersons(channelPersonNumListExport.size());
145
+
138
             String message = "";
146
             String message = "";
139
             switch (e.getTargetType()){
147
             switch (e.getTargetType()){
140
                 case "building":
148
                 case "building":