傅行帆 5 years ago
parent
commit
24c5c3cb91

+ 14
- 14
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java View File

@@ -791,15 +791,15 @@ public class TaRecommendCustomerController extends BaseController {
791 791
             // 设置 sheet, 同一个sheet只需要设置一次
792 792
             WriteSheet writeSheet = EasyExcel.writerSheet("客户列表-公客").build();
793 793
 
794
-            Integer count = taRecommendCustomerMapper.getPublicCustomerExportListCount(name, tel,  entryType, verifyStatus, sex, orgId,consultTel);
795
-            pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
796
-            List<PublicCustomerExport> publicList = null;
797
-            do {
798
-                publicList = taRecommendCustomerMapper.getPublicCustomerExportList(pageCode * pageSize, pageSize, name, tel,  entryType, verifyStatus, sex, orgId,consultTel);
794
+//            Integer count = taRecommendCustomerMapper.getPublicCustomerExportListCount(name, tel,  entryType, verifyStatus, sex, orgId,consultTel);
795
+//            pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
796
+//            List<PublicCustomerExport> publicList = null;
797
+//            do {
798
+                List<PublicCustomerExport> publicList = taRecommendCustomerMapper.getPublicCustomerExportList(pageCode * pageSize, pageSize, name, tel,  entryType, verifyStatus, sex, orgId,consultTel);
799 799
                 excelWriter.write(publicList, writeSheet);
800 800
 
801
-                pageCode ++;
802
-            } while (pageCode <= pageCount);
801
+//                pageCode ++;
802
+//            } while (pageCode <= pageCount);
803 803
 
804 804
             // finish 会帮忙关闭流
805 805
             excelWriter.finish();
@@ -813,15 +813,15 @@ public class TaRecommendCustomerController extends BaseController {
813 813
             // 设置 sheet, 同一个sheet只需要设置一次
814 814
             WriteSheet writeSheet = EasyExcel.writerSheet("客户列表-私客").build();
815 815
 
816
-            Integer count = taRecommendCustomerMapper.getCustomerExportListCount(buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId,status,getTaPersonBuildingListByUserId(request));
817
-            pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
818
-            List<PrivateCustomerExport> privateList = null;
819
-            do {
820
-                privateList = taRecommendCustomerMapper.getCustomerExportList(pageCode *  pageSize, pageSize, buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId,status,getTaPersonBuildingListByUserId(request));
816
+//            Integer count = taRecommendCustomerMapper.getCustomerExportListCount(buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId,status,getTaPersonBuildingListByUserId(request));
817
+//            pageCount = count % pageSize == 0 ? count / pageSize : (count / pageSize) + 1;
818
+//            List<PrivateCustomerExport> privateList = null;
819
+//            do {
820
+                List<PrivateCustomerExport> privateList = taRecommendCustomerMapper.getCustomerExportList(pageCode *  pageSize, pageSize, buildingId, name, tel, consultName, consultTel, entryType, verifyStatus, sex, orgId,status,getTaPersonBuildingListByUserId(request));
821 821
                 excelWriter.write(privateList, writeSheet);
822 822
 
823
-                pageCode ++;
824
-            } while (pageCode <= pageCount);
823
+//                pageCode ++;
824
+//            } while (pageCode <= pageCount);
825 825
             // finish 会帮忙关闭流
826 826
             excelWriter.finish();
827 827
 

+ 3
- 3
src/main/resources/mapper/TaRecommendCustomerMapper.xml View File

@@ -547,12 +547,12 @@ FROM
547 547
             <if test="consultTel != null and consultTel !=''">
548 548
                 and b.tel like CONCAT('%',#{consultTel}, '%')
549 549
             </if>
550
-            and NOT EXISTS ( select * from ta_recommend_customer a where a.recommend_person = b.person_id)
550
+            and NOT EXISTS ( select * from ta_recommend_customer a where a.org_id = #{orgId} and a.recommend_person = b.person_id)
551 551
             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 != ''  )
552 552
         </where>
553 553
         order by b.create_date desc
554
-        limit #{pageCode}, #{pageSize}
555 554
     </select>
555
+    <!--        limit #{pageCode}, #{pageSize}-->
556 556
 
557 557
     <select id="getCustomerExportListCount" resultType="Integer" >
558 558
         SELECT
@@ -671,8 +671,8 @@ FROM
671 671
         </where>
672 672
         group by a.customer_id,a.building_id
673 673
         order by a.create_date desc
674
-        limit #{pageCode}, #{pageSize}
675 674
     </select>
675
+    <!--        limit #{pageCode}, #{pageSize}-->
676 676
 
677 677
     <select id="getMyCustStatistics" resultType="java.util.Map">
678 678
         SELECT