Kaynağa Gözat

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

魏超 5 yıl önce
ebeveyn
işleme
fe3f04b703

+ 14
- 0
src/main/java/com/huiju/estateagents/excel/PrivateCustomerExport.java Dosyayı Görüntüle

@@ -86,4 +86,18 @@ public class PrivateCustomerExport {
86 86
     @ColumnWidth(15)
87 87
     @ExcelProperty(value = "意向度(意向值)", index = 8)
88 88
     private String intention ;
89
+
90
+    /**
91
+     * 意向度
92
+     */
93
+    @ColumnWidth(15)
94
+    @ExcelProperty(value = "推广人员", index = 10)
95
+    private String sharePersonName ;
96
+
97
+    /**
98
+     * 意向度
99
+     */
100
+    @ColumnWidth(15)
101
+    @ExcelProperty(value = "积分值", index = 11)
102
+    private String points ;
89 103
 }

+ 14
- 0
src/main/java/com/huiju/estateagents/excel/PublicCustomerExport.java Dosyayı Görüntüle

@@ -72,4 +72,18 @@ public class PublicCustomerExport {
72 72
     @ColumnWidth(15)
73 73
     @ExcelProperty(value = "项目名称", index = 3)
74 74
     private String buildingName;
75
+
76
+    /**
77
+     * 意向度
78
+     */
79
+    @ColumnWidth(15)
80
+    @ExcelProperty(value = "推广人员", index = 8)
81
+    private String sharePersonName ;
82
+
83
+    /**
84
+     * 意向度
85
+     */
86
+    @ColumnWidth(15)
87
+    @ExcelProperty(value = "积分值", index = 9)
88
+    private String points ;
75 89
 }

+ 11
- 4
src/main/resources/mapper/TaRecommendCustomerMapper.xml Dosyayı Görüntüle

@@ -551,11 +551,15 @@ FROM
551 551
           concat(b.country, b.province) as province,
552 552
           z.intention,
553 553
           d.scene_alias as sceneType,
554
-          t.building_name
554
+          t.building_name,
555
+          ifnull( c.nickname, c.NAME ) AS sharePersonName ,
556
+          s.points
555 557
         FROM
556 558
         ta_person b
557 559
         LEFT JOIN ta_person_from_record r ON b.person_id = r.person_id AND r.is_first_time = 1 and r.org_id = #{orgId}
558 560
         left join ta_building t on b.building_id = t.building_id
561
+        LEFT JOIN ta_person c ON b.recommend_person = c.person_id AND c.org_id = #{orgId}
562
+        left JOIN (select sum(points_amount) as points,person_id from ta_points_records where org_id = #{orgId} GROUP BY person_id) s on b.person_id = s.person_id
559 563
         left join (select sum(t.intention) as intention,t.person_id From ta_person_intention_record t where t.org_id = #{orgId} group by t.person_id) z on z.person_id = b.person_id
560 564
         left join td_wx_dict d on r.scene_id = d.scene_id
561 565
         <where>
@@ -591,7 +595,7 @@ FROM
591 595
             <if test="consultTel != null and consultTel !=''">
592 596
                 and b.tel like CONCAT('%',#{consultTel}, '%')
593 597
             </if>
594
-            and NOT EXISTS ( select * from ta_recommend_customer a where a.org_id = #{orgId} and a.recommend_person = b.person_id)
598
+<!--            and NOT EXISTS ( select * from ta_recommend_customer a where a.org_id = #{orgId} and a.recommend_person = b.person_id)-->
595 599
             AND b.person_id not IN ( SELECT c.person_id FROM ta_recommend_customer c WHERE c.org_id = #{orgId} AND person_id is not null AND person_id != ''  )
596 600
         </where>
597 601
         order by b.create_date desc
@@ -667,15 +671,18 @@ FROM
667 671
         z.intention,
668 672
         a.create_date,
669 673
         concat(a.country,a.province) as province,
670
-        w.scene_alias as scene_type
674
+        w.scene_alias as scene_type,
675
+        IFNULL( c.NAME, c.nickname ) AS sharePersonName,
676
+        s.points
671 677
         FROM
672 678
         ta_recommend_customer a
673 679
         LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
674
-        LEFT JOIN ta_person c ON a.realty_consultant = c.user_id
675 680
         LEFT JOIN ta_user d on d.user_id = a.realty_consultant
676 681
         LEFT JOIN ta_person_from_record p ON a.person_id = p.person_id AND p.is_first_time = 1 and p.org_id = #{orgId}
682
+        LEFT JOIN ta_person c ON p.share_person_id = c.person_id
677 683
         left join ta_building t on a.building_id = t.building_id
678 684
         LEFT JOIN td_wx_dict w ON p.scene_id = w.scene_id
685
+        left JOIN (select sum(points_amount) as points,person_id from ta_points_records where org_id = #{orgId} GROUP BY person_id) s on a.person_id = s.person_id
679 686
         left join (select sum(t.intention) as intention,t.person_id From ta_person_intention_record t where t.org_id = #{orgId} group by t.person_id) z on z.person_id = a.person_id
680 687
         <where>
681 688
             a.status > 0