Parcourir la source

Merge branch 'v3.5' of http://git.ycjcjy.com/zhiyuxing/estateagents into v3.5

胡轶钦 il y a 5 ans
Parent
révision
8e2fc8efec

+ 3
- 0
src/main/java/com/huiju/estateagents/controller/TaPointsRecordsController.java Voir le fichier

@@ -128,6 +128,9 @@ public class TaPointsRecordsController extends BaseController {
128 128
                     case CommConstant.POINTS_CHANGE_ACTIVITY_CHECKIN:
129 129
                         result.getRecords().get(i).setRecordName("活动签到");
130 130
                         break;
131
+                    case CommConstant.POINTS_CHANGE_DOCUMENT_VERIFY:
132
+                        result.getRecords().get(i).setRecordName("资料审核");
133
+                        break;
131 134
                 }
132 135
             }
133 136
             responseBean.addSuccess(result);

+ 12
- 3
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java Voir le fichier

@@ -578,13 +578,22 @@ public class TaRecommendCustomerController extends BaseController {
578 578
      * 导出数据(报备客户)
579 579
      */
580 580
     @GetMapping("/admin/customer/recommend/report/export")
581
-    public void reportExport(HttpServletRequest request, HttpServletResponse response) throws IOException {
581
+    public void reportExport(HttpServletRequest request,
582
+                             HttpServletResponse response,
583
+                             @RequestParam(value ="name",required = false) String name,
584
+                             @RequestParam(value ="tel",required = false) String tel,
585
+                             @RequestParam(value ="buildingId",required = false) String buildingId,
586
+                             @RequestParam(value ="consultName",required = false) String consultName,
587
+                             @RequestParam(value ="consultTel",required = false) String consultTel,
588
+                             @RequestParam(value ="entryType",required = false) String entryType,
589
+                             @RequestParam(value ="verifyStatus",required = false) String verifyStatus,
590
+                             @RequestParam(value = "sex",required = false)Integer sex) throws IOException {
582 591
 //        response.setContentType("application/vnd.ms-excel");
583 592
         response.setContentType("application/octet-stream");
584 593
         response.setCharacterEncoding("utf-8");
585 594
         response.setHeader("Content-disposition", "attachment;filename=报备客户.xlsx");
586 595
 
587
-        Integer count = taRecommendCustomerService.getRepCustomerReportCount(getOrgId(request));
596
+        Integer count = taRecommendCustomerService.getRepCustomerReportCount(buildingId,name,tel,consultName,consultTel,entryType,verifyStatus,sex,getOrgId(request));
588 597
 
589 598
         Integer pageCode = 0;
590 599
         Integer pageSize = 100;
@@ -596,7 +605,7 @@ public class TaRecommendCustomerController extends BaseController {
596 605
         WriteSheet writeSheet = EasyExcel.writerSheet("报备客户").build();
597 606
         List<ReporRecommendCustomer> recCustomerExport = null;
598 607
         do {
599
-            recCustomerExport = taRecommendCustomerService.getRepCustomerReportExport(getOrgId(request), pageCode * pageSize, pageSize);
608
+            recCustomerExport = taRecommendCustomerService.getRepCustomerReportExport(buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, getOrgId(request), pageCode * pageSize, pageSize);
600 609
             excelWriter.write(recCustomerExport, writeSheet);
601 610
 
602 611
             pageCode ++;

+ 1
- 1
src/main/java/com/huiju/estateagents/excel/ReporRecommendCustomer.java Voir le fichier

@@ -39,7 +39,7 @@ public class ReporRecommendCustomer {
39 39
      */
40 40
     @ColumnWidth(15)
41 41
     @ExcelProperty(value = "意向项目", index = 3)
42
-    private String intention;
42
+    private String intentionName;
43 43
 
44 44
     /**
45 45
      * 置业顾问

+ 2
- 2
src/main/java/com/huiju/estateagents/mapper/TaRecommendCustomerMapper.java Voir le fichier

@@ -65,14 +65,14 @@ public interface TaRecommendCustomerMapper extends BaseMapper<TaRecommendCustome
65 65
      * @param orgId
66 66
      * @return
67 67
      */
68
-    Integer getRepCustomerReportCount(@Param("orgId")Integer orgId);
68
+    Integer getRepCustomerReportCount(@Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel,@Param("entryType") String entryType,@Param("verifyStatus") String verifyStatus,@Param("sex") Integer sex,@Param("orgId")Integer orgId);
69 69
 
70 70
     /**
71 71
      * 导出数据 获取报备客户数据
72 72
      * @param orgId
73 73
      * @return
74 74
      */
75
-    List<ReporRecommendCustomer> getRepCustomerReportExport(@Param("orgId") Integer orgId, @Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize);
75
+    List<ReporRecommendCustomer> getRepCustomerReportExport(@Param("building") String building, @Param("name") String name, @Param("tel") String tel, @Param("consultName") String consultName, @Param("consultTel") String consultTel,@Param("entryType") String entryType,@Param("verifyStatus") String verifyStatus,@Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("pageCode") Integer pageCode, @Param("pageSize") Integer pageSize);
76 76
 
77 77
     /**
78 78
      * 导出数据 获取经纪人数据 总数

+ 2
- 2
src/main/java/com/huiju/estateagents/service/ITaRecommendCustomerService.java Voir le fichier

@@ -69,7 +69,7 @@ public interface ITaRecommendCustomerService extends IService<TaRecommendCustome
69 69
      * @param orgId
70 70
      * @return
71 71
      */
72
-    Integer getRepCustomerReportCount(Integer orgId);
72
+    Integer getRepCustomerReportCount(String building, String name, String tel, String consultName, String consultTel, String entryType, String verifyStatus, Integer sex, Integer orgId);
73 73
 
74 74
     /**
75 75
      * 导出数据(报备客户)
@@ -78,7 +78,7 @@ public interface ITaRecommendCustomerService extends IService<TaRecommendCustome
78 78
      * @param pageSize
79 79
      * @return
80 80
      */
81
-    List<ReporRecommendCustomer> getRepCustomerReportExport(Integer orgId, Integer pageCode, Integer pageSize);
81
+    List<ReporRecommendCustomer> getRepCustomerReportExport(String building, String name, String tel, String consultName, String consultTel, String entryType, String verifyStatus, Integer sex, Integer orgId, Integer pageCode, Integer pageSize);
82 82
 
83 83
     /**
84 84
      * 导出数据(经纪人) 总数

+ 4
- 4
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java Voir le fichier

@@ -547,13 +547,13 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
547 547
 
548 548
 
549 549
     @Override
550
-    public Integer getRepCustomerReportCount(Integer orgId) {
551
-        return taRecommendCustomerMapper.getRepCustomerReportCount(orgId);
550
+    public Integer getRepCustomerReportCount(String building, String name, String tel, String consultName, String consultTel, String entryType, String verifyStatus, Integer sex,Integer orgId) {
551
+        return taRecommendCustomerMapper.getRepCustomerReportCount(building, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId);
552 552
     }
553 553
 
554 554
     @Override
555
-    public List<ReporRecommendCustomer> getRepCustomerReportExport(Integer orgId, Integer pageCode, Integer pageSize) {
556
-        return taRecommendCustomerMapper.getRepCustomerReportExport(orgId, pageCode, pageSize);
555
+    public List<ReporRecommendCustomer> getRepCustomerReportExport(String building, String name, String tel, String consultName, String consultTel, String entryType, String verifyStatus, Integer sex, Integer orgId, Integer pageCode, Integer pageSize) {
556
+        return taRecommendCustomerMapper.getRepCustomerReportExport(building, name, tel, consultName, consultTel, entryType,verifyStatus,sex, orgId, pageCode, pageSize);
557 557
     }
558 558
 
559 559
 

+ 54
- 1
src/main/resources/mapper/TaRecommendCustomerMapper.xml Voir le fichier

@@ -282,32 +282,85 @@ FROM
282 282
         FROM
283 283
         ta_recommend_customer a
284 284
         LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
285
+        LEFT JOIN ta_building c ON a.building_id = c.building_id
285 286
         <where>
286 287
             a.status > 0
287 288
             and a.report_recommend_status = 1
288 289
             <if test="orgId != null">
289 290
                 and a.org_id = #{orgId}
290 291
             </if>
292
+            <if test="building != null and building !=''">
293
+                and a.building_id = #{building}
294
+            </if>
295
+            <if test="name != null and name !=''">
296
+                and a.name = #{name}
297
+            </if>
298
+            <if test="tel != null and tel!=''">
299
+                and a.phone like concat(concat("%",#{tel}),"%")
300
+            </if>
301
+            <if test="consultName != null and consultName !=''">
302
+                and b.name like CONCAT('%',#{consultName}, '%')
303
+            </if>
304
+            <if test="consultTel != null and consultTel !=''">
305
+                and b.tel = #{consultTel}
306
+            </if>
307
+            <if test="entryType != null and entryType !=''">
308
+                and a.entry_type = #{entryType}
309
+            </if>
310
+            <if test="verifyStatus != null and verifyStatus !=''">
311
+                and a.verify_status = #{verifyStatus}
312
+            </if>
313
+            <if test="sex != null and sex !=''">
314
+                and a.sex = #{sex}
315
+                and a.org_id = #{orgid}
316
+            </if>
291 317
         </where>
318
+        order by a.create_date desc
292 319
     </select>
293 320
 
294 321
     <select id="getRepCustomerReportExport" resultType="com.huiju.estateagents.excel.ReporRecommendCustomer" >
295 322
         SELECT
296 323
         a.name as name,
297 324
         a.phone as phone,
298
-        a.intention as intention,
325
+        c.building_name as intentionName,
299 326
         if(a.sex = 1, '男',if(a.sex = 2, '女', '未知')) as sex,
300 327
         b.NAME AS consultantName,
301 328
         b.tel AS consultTel
302 329
         FROM
303 330
         ta_recommend_customer a
304 331
         LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
332
+        LEFT JOIN ta_building c ON a.building_id = c.building_id
305 333
         <where>
306 334
             a.status > 0
307 335
             and a.report_recommend_status = 1
308 336
             <if test="orgId != null">
309 337
                 and a.org_id = #{orgId}
310 338
             </if>
339
+            <if test="building != null and building !=''">
340
+                and a.building_id = #{building}
341
+            </if>
342
+            <if test="name != null and name !=''">
343
+                and a.name = #{name}
344
+            </if>
345
+            <if test="tel != null and tel!=''">
346
+                and a.phone like concat(concat("%",#{tel}),"%")
347
+            </if>
348
+            <if test="consultName != null and consultName !=''">
349
+                and b.name like CONCAT('%',#{consultName}, '%')
350
+            </if>
351
+            <if test="consultTel != null and consultTel !=''">
352
+                and b.tel = #{consultTel}
353
+            </if>
354
+            <if test="entryType != null and entryType !=''">
355
+                and a.entry_type = #{entryType}
356
+            </if>
357
+            <if test="verifyStatus != null and verifyStatus !=''">
358
+                and a.verify_status = #{verifyStatus}
359
+            </if>
360
+            <if test="sex != null and sex !=''">
361
+                and a.sex = #{sex}
362
+                and a.org_id = #{orgid}
363
+            </if>
311 364
         </where>
312 365
         order by a.create_date desc
313 366
         limit #{pageCode}, #{pageSize}