Browse Source

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

胡轶钦 5 years ago
parent
commit
71e2679a88

+ 4
- 1
src/main/java/com/huiju/estateagents/statistic/mapper/TsCustomerGenderStatisticMapper.java View File

4
 import com.huiju.estateagents.statistic.entity.GenderStatistic;
4
 import com.huiju.estateagents.statistic.entity.GenderStatistic;
5
 import com.huiju.estateagents.statistic.entity.TsCustomerGenderStatistic;
5
 import com.huiju.estateagents.statistic.entity.TsCustomerGenderStatistic;
6
 import org.apache.ibatis.annotations.Mapper;
6
 import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
7
 
8
 
9
+import java.time.LocalDateTime;
8
 import java.util.List;
10
 import java.util.List;
9
 
11
 
10
 /**
12
 /**
21
 	/**
23
 	/**
22
 	 * 获取新增客户的男女性别比
24
 	 * 获取新增客户的男女性别比
23
 	 * @return
25
 	 * @return
26
+	 * @param nowDate
24
 	 */
27
 	 */
25
-	List<GenderStatistic> getNewCustomerSexCount();
28
+	List<GenderStatistic> getNewCustomerSexCount(@Param("nowDate") LocalDateTime nowDate);
26
 	
29
 	
27
 	/**
30
 	/**
28
 	 * 获取跟进客户的男女性别比
31
 	 * 获取跟进客户的男女性别比

+ 1
- 1
src/main/java/com/huiju/estateagents/statistic/service/impl/TsCustomerGenderStatisticServiceImpl.java View File

36
 	@Override
36
 	@Override
37
 	public void newCustomerSexStatisticDaily(LocalDateTime nowDate) {
37
 	public void newCustomerSexStatisticDaily(LocalDateTime nowDate) {
38
 		//获取新增客户的男女性别比和性别数
38
 		//获取新增客户的男女性别比和性别数
39
-		List<GenderStatistic> newCustomerSexList = customerGenderStatisticMapper.getNewCustomerSexCount();
39
+		List<GenderStatistic> newCustomerSexList = customerGenderStatisticMapper.getNewCustomerSexCount(nowDate);
40
 		//批量保存
40
 		//批量保存
41
 		saveBatchCustomerSexData(newCustomerSexList,nowDate,CommConstant.CUSTOMER_TYPE_NEW);
41
 		saveBatchCustomerSexData(newCustomerSexList,nowDate,CommConstant.CUSTOMER_TYPE_NEW);
42
 	}
42
 	}

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

608
     <select id="getMyCustStatistics" resultType="java.util.Map">
608
     <select id="getMyCustStatistics" resultType="java.util.Map">
609
         SELECT
609
         SELECT
610
             sum( IF ( STATUS = 4, 1, 0 ) ) AS clinchSum,
610
             sum( IF ( STATUS = 4, 1, 0 ) ) AS clinchSum,
611
-            sum( IF ( STATUS != 4 AND STATUS != 4, 1, 0 ) ) AS followSum
611
+            sum( IF ( STATUS != 4 AND verify_status = 1, 1, 0 ) ) AS followSum
612
         FROM
612
         FROM
613
             ta_recommend_customer
613
             ta_recommend_customer
614
         WHERE
614
         WHERE
630
         AND ( realty_consultant = #{personId} OR realty_consultant = #{userId} )
630
         AND ( realty_consultant = #{personId} OR realty_consultant = #{userId} )
631
         <if test="type == 'follow'">
631
         <if test="type == 'follow'">
632
           AND STATUS != 4
632
           AND STATUS != 4
633
+          AND verify_status = 1
633
             <if test="name != null and name !=''">
634
             <if test="name != null and name !=''">
634
                 and (`name` like CONCAT('%',#{name}, '%') or phone like CONCAT('%',#{name}, '%'))
635
                 and (`name` like CONCAT('%',#{name}, '%') or phone like CONCAT('%',#{name}, '%'))
635
             </if>
636
             </if>

+ 1
- 1
src/main/resources/mapper/statistic/TsCustomerGenderStatisticMapper.xml View File

14
         FROM
14
         FROM
15
             ta_recommend_customer
15
             ta_recommend_customer
16
         WHERE
16
         WHERE
17
-            `STATUS` = 1
17
+            date_format( create_date, '%Y-%m-%d' ) = date_format( #{nowDate}, '%Y-%m-%d' )
18
             GROUP BY org_id,realty_consultant
18
             GROUP BY org_id,realty_consultant
19
     </select>
19
     </select>
20
     <select id="getFollowUpSexCount" resultType="com.huiju.estateagents.statistic.entity.GenderStatistic">
20
     <select id="getFollowUpSexCount" resultType="com.huiju.estateagents.statistic.entity.GenderStatistic">

+ 1
- 2
src/main/resources/mapper/statistic/TsCustomerStatisticDailyMapper.xml View File

29
         FROM
29
         FROM
30
             ta_recommend_customer
30
             ta_recommend_customer
31
         WHERE
31
         WHERE
32
-            `STATUS` = #{status}
33
-            AND date_format( create_date, '%Y-%m-%d' ) = date_format( #{nowDate}, '%Y-%m-%d' )
32
+             date_format( create_date, '%Y-%m-%d' ) = date_format( #{nowDate}, '%Y-%m-%d' )
34
         GROUP BY
33
         GROUP BY
35
             org_id,realty_consultant
34
             org_id,realty_consultant
36
     </select>
35
     </select>

+ 1
- 2
src/main/resources/mapper/statistic/TsCustomerStatisticMonthlyMapper.xml View File

11
         FROM
11
         FROM
12
             ta_recommend_customer
12
             ta_recommend_customer
13
         WHERE
13
         WHERE
14
-            `STATUS` = #{status}
15
-            AND date_format( create_date, '%Y-%m' ) = date_format( #{nowDate}, '%Y-%m' )
14
+            date_format( create_date, '%Y-%m' ) = date_format( #{nowDate}, '%Y-%m' )
16
         GROUP BY
15
         GROUP BY
17
             org_id,realty_consultant
16
             org_id,realty_consultant
18
     </select>
17
     </select>