Ver código fonte

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

胡轶钦 5 anos atrás
pai
commit
8e2fc8efec

+ 3
- 0
src/main/java/com/huiju/estateagents/controller/TaPointsRecordsController.java Ver arquivo

128
                     case CommConstant.POINTS_CHANGE_ACTIVITY_CHECKIN:
128
                     case CommConstant.POINTS_CHANGE_ACTIVITY_CHECKIN:
129
                         result.getRecords().get(i).setRecordName("活动签到");
129
                         result.getRecords().get(i).setRecordName("活动签到");
130
                         break;
130
                         break;
131
+                    case CommConstant.POINTS_CHANGE_DOCUMENT_VERIFY:
132
+                        result.getRecords().get(i).setRecordName("资料审核");
133
+                        break;
131
                 }
134
                 }
132
             }
135
             }
133
             responseBean.addSuccess(result);
136
             responseBean.addSuccess(result);

+ 12
- 3
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java Ver arquivo

578
      * 导出数据(报备客户)
578
      * 导出数据(报备客户)
579
      */
579
      */
580
     @GetMapping("/admin/customer/recommend/report/export")
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
 //        response.setContentType("application/vnd.ms-excel");
591
 //        response.setContentType("application/vnd.ms-excel");
583
         response.setContentType("application/octet-stream");
592
         response.setContentType("application/octet-stream");
584
         response.setCharacterEncoding("utf-8");
593
         response.setCharacterEncoding("utf-8");
585
         response.setHeader("Content-disposition", "attachment;filename=报备客户.xlsx");
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
         Integer pageCode = 0;
598
         Integer pageCode = 0;
590
         Integer pageSize = 100;
599
         Integer pageSize = 100;
596
         WriteSheet writeSheet = EasyExcel.writerSheet("报备客户").build();
605
         WriteSheet writeSheet = EasyExcel.writerSheet("报备客户").build();
597
         List<ReporRecommendCustomer> recCustomerExport = null;
606
         List<ReporRecommendCustomer> recCustomerExport = null;
598
         do {
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
             excelWriter.write(recCustomerExport, writeSheet);
609
             excelWriter.write(recCustomerExport, writeSheet);
601
 
610
 
602
             pageCode ++;
611
             pageCode ++;

+ 1
- 1
src/main/java/com/huiju/estateagents/excel/ReporRecommendCustomer.java Ver arquivo

39
      */
39
      */
40
     @ColumnWidth(15)
40
     @ColumnWidth(15)
41
     @ExcelProperty(value = "意向项目", index = 3)
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 Ver arquivo

65
      * @param orgId
65
      * @param orgId
66
      * @return
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
      * @param orgId
72
      * @param orgId
73
      * @return
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 Ver arquivo

69
      * @param orgId
69
      * @param orgId
70
      * @return
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
      * @param pageSize
78
      * @param pageSize
79
      * @return
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 Ver arquivo

547
 
547
 
548
 
548
 
549
     @Override
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
     @Override
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 Ver arquivo

282
         FROM
282
         FROM
283
         ta_recommend_customer a
283
         ta_recommend_customer a
284
         LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
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
         <where>
286
         <where>
286
             a.status > 0
287
             a.status > 0
287
             and a.report_recommend_status = 1
288
             and a.report_recommend_status = 1
288
             <if test="orgId != null">
289
             <if test="orgId != null">
289
                 and a.org_id = #{orgId}
290
                 and a.org_id = #{orgId}
290
             </if>
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
         </where>
317
         </where>
318
+        order by a.create_date desc
292
     </select>
319
     </select>
293
 
320
 
294
     <select id="getRepCustomerReportExport" resultType="com.huiju.estateagents.excel.ReporRecommendCustomer" >
321
     <select id="getRepCustomerReportExport" resultType="com.huiju.estateagents.excel.ReporRecommendCustomer" >
295
         SELECT
322
         SELECT
296
         a.name as name,
323
         a.name as name,
297
         a.phone as phone,
324
         a.phone as phone,
298
-        a.intention as intention,
325
+        c.building_name as intentionName,
299
         if(a.sex = 1, '男',if(a.sex = 2, '女', '未知')) as sex,
326
         if(a.sex = 1, '男',if(a.sex = 2, '女', '未知')) as sex,
300
         b.NAME AS consultantName,
327
         b.NAME AS consultantName,
301
         b.tel AS consultTel
328
         b.tel AS consultTel
302
         FROM
329
         FROM
303
         ta_recommend_customer a
330
         ta_recommend_customer a
304
         LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
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
         <where>
333
         <where>
306
             a.status > 0
334
             a.status > 0
307
             and a.report_recommend_status = 1
335
             and a.report_recommend_status = 1
308
             <if test="orgId != null">
336
             <if test="orgId != null">
309
                 and a.org_id = #{orgId}
337
                 and a.org_id = #{orgId}
310
             </if>
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
         </where>
364
         </where>
312
         order by a.create_date desc
365
         order by a.create_date desc
313
         limit #{pageCode}, #{pageSize}
366
         limit #{pageCode}, #{pageSize}