魏超 před 5 roky
rodič
revize
ec853a798f

+ 16
- 0
src/main/java/com/huiju/estateagents/service/impl/TaPersonVisitRecordServiceImpl.java Zobrazit soubor

10
 import com.baomidou.mybatisplus.core.metadata.IPage;
10
 import com.baomidou.mybatisplus.core.metadata.IPage;
11
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
11
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
12
 import com.huiju.estateagents.common.CommConstant;
12
 import com.huiju.estateagents.common.CommConstant;
13
+import com.huiju.estateagents.common.StringUtils;
13
 import com.huiju.estateagents.drainage.entity.TaDrainage;
14
 import com.huiju.estateagents.drainage.entity.TaDrainage;
14
 import com.huiju.estateagents.drainage.mapper.TaDrainageMapper;
15
 import com.huiju.estateagents.drainage.mapper.TaDrainageMapper;
15
 import com.huiju.estateagents.entity.*;
16
 import com.huiju.estateagents.entity.*;
123
 		IPage<TaPersonVisitRecord> taPersonVisitRecordIPage = personVisitRecordMapper.getDrainageVisitRecord(pg, orgId, activityName, eventType, shareName, shareTel, buildingId, personType, taPersonBuildingList);
124
 		IPage<TaPersonVisitRecord> taPersonVisitRecordIPage = personVisitRecordMapper.getDrainageVisitRecord(pg, orgId, activityName, eventType, shareName, shareTel, buildingId, personType, taPersonBuildingList);
124
 		List<TaPersonVisitRecord> taPersonVisitRecords = taPersonVisitRecordIPage.getRecords();
125
 		List<TaPersonVisitRecord> taPersonVisitRecords = taPersonVisitRecordIPage.getRecords();
125
 		taPersonVisitRecords.forEach(e -> {
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
 			TaPerson personInfo = taPersonMapper.selectById(e.getPersonId());
142
 			TaPerson personInfo = taPersonMapper.selectById(e.getPersonId());
127
 			if (personInfo != null){
143
 			if (personInfo != null){
128
 				e.setUserName(personInfo.getNickname());
144
 				e.setUserName(personInfo.getNickname());

+ 7
- 3
src/main/resources/mapper/TaPersonVisitRecordMapper.xml Zobrazit soubor

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