魏超 5 vuotta sitten
vanhempi
commit
ec853a798f

+ 16
- 0
src/main/java/com/huiju/estateagents/service/impl/TaPersonVisitRecordServiceImpl.java Näytä tiedosto

@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
10 10
 import com.baomidou.mybatisplus.core.metadata.IPage;
11 11
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
12 12
 import com.huiju.estateagents.common.CommConstant;
13
+import com.huiju.estateagents.common.StringUtils;
13 14
 import com.huiju.estateagents.drainage.entity.TaDrainage;
14 15
 import com.huiju.estateagents.drainage.mapper.TaDrainageMapper;
15 16
 import com.huiju.estateagents.entity.*;
@@ -123,6 +124,21 @@ public class TaPersonVisitRecordServiceImpl extends ServiceImpl<TaPersonVisitRec
123 124
 		IPage<TaPersonVisitRecord> taPersonVisitRecordIPage = personVisitRecordMapper.getDrainageVisitRecord(pg, orgId, activityName, eventType, shareName, shareTel, buildingId, personType, taPersonBuildingList);
124 125
 		List<TaPersonVisitRecord> taPersonVisitRecords = taPersonVisitRecordIPage.getRecords();
125 126
 		taPersonVisitRecords.forEach(e -> {
127
+			if (!StringUtils.isEmpty(e.getDrainageName())){
128
+				e.setActivityName(e.getDrainageName());
129
+			}
130
+			if (!StringUtils.isEmpty(e.getBuildingName())){
131
+				e.setActivityName(e.getBuildingName());
132
+			}
133
+			if (!StringUtils.isEmpty(e.getNewsName())){
134
+				e.setActivityName(e.getNewsName());
135
+			}
136
+			if (!StringUtils.isEmpty(e.getHelpActivityName())){
137
+				e.setActivityName(e.getHelpActivityName());
138
+			}
139
+			if (!StringUtils.isEmpty(e.getGroupActivityName())){
140
+				e.setActivityName(e.getGroupActivityName());
141
+			}
126 142
 			TaPerson personInfo = taPersonMapper.selectById(e.getPersonId());
127 143
 			if (personInfo != null){
128 144
 				e.setUserName(personInfo.getNickname());

+ 7
- 3
src/main/resources/mapper/TaPersonVisitRecordMapper.xml Näytä tiedosto

@@ -141,7 +141,8 @@
141 141
             left join ta_building_dynamic tbd on t.target_id = tbd.dynamic_id
142 142
             left join ta_person c on t.share_person_id = c.person_id
143 143
             where
144
-            t.share_person_id is not null
144
+            1=1
145
+--             t.share_person_id is not null
145 146
             <if test="orgId != null and orgId != ''">
146 147
                 and t.org_id = #{orgId}
147 148
             </if>
@@ -149,7 +150,10 @@
149 150
                 and t.event_type = #{eventType}
150 151
             </if>
151 152
             <if test="activityName !=null and activityName != ''">
152
-                and b.name like concat('%',#{activityName},'%')
153
+                and (
154
+                b.name like concat('%',#{activityName},'%') or d.name like concat('%',#{activityName},'%') or tn.news_name like concat('%',#{activityName},'%')
155
+                or tha.title like concat( '%', #{activityName}, '%' )  or tsa.activity_name like concat('%',#{activityName},'%') or tbd.title like concat('%',#{activityName},'%')
156
+                )
153 157
             </if>
154 158
             <if test="shareName !=null and shareName != ''">
155 159
                 and c.nickname like concat('%',#{shareName},'%')
@@ -164,7 +168,7 @@
164 168
                 and t.consultant_id is null
165 169
             </if>
166 170
             <if test="buildingId !=null and buildingId != ''">
167
-                and d.building_id = #{buildingId}
171
+                and t.building_id = #{buildingId}
168 172
             </if>
169 173
             <if test="personBuildingList != null and personBuildingList.size > 0">
170 174
                 AND t.building_id in