anderx 4 anos atrás
pai
commit
1fb4689a0a

+ 7 - 0
src/main/java/com/goafanti/admin/bo/AdminCustomerBo.java

@@ -11,6 +11,7 @@ public class AdminCustomerBo {
 	private Integer receiveCount;
 	private Integer completeCount;
 	private Integer interviewCount;
+	private Integer signCount;
 	
 	
 	public String getAid() {
@@ -68,5 +69,11 @@ public class AdminCustomerBo {
 	public void setDepId(String depId) {
 		this.depId = depId;
 	}
+	public Integer getSignCount() {
+		return signCount;
+	}
+	public void setSignCount(Integer signCount) {
+		this.signCount = signCount;
+	}
 	
 }

+ 27 - 13
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -1051,22 +1051,28 @@
   
    <select id="selectAdminCustomerList"  resultType="com.goafanti.admin.bo.AdminCustomerBo">
   	select a.id as aid,a.name as aName,d.name as depName,ifnull(b.userCount,0) as userCount,ifnull(c.timeCount,0) as inputCount,
-  	ifnull(d.timeCount,0) as receiveCount from admin a 
+  	ifnull(d.timeCount,0) as receiveCount,ifnull(g.timeCount,0) as signCount from admin a 
 	left join (select aid,count(aid) as userCount from user where aid is not null  
 	and  share_type=0 and source !=0 and type=1
 	group by aid) b on a.id=b.aid
 	left join (select aid,count(aid) as timeCount from `user` where aid is not null  
-	and  share_type=0 and source =1 and type=1
-     <if test="startTime != null and endTime != null"> 
-    and  create_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
+	and  share_type in (0,2) and source =1 and type=1
+	<if test="startTime != null and endTime != null"> 
+    and  transfer_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
     </if>
 	group by aid) c on a.id=c.aid
 	left join (select aid,count(aid) as timeCount from `user` where aid is not null  
-	and  share_type=0 and source =2 and type=1
-	 <if test="startTime != null and endTime != null"> 
+	and  share_type in (0,2) and source =2 and type=1
+	<if test="startTime != null and endTime != null"> 
     and  transfer_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
     </if>
 	group by aid) d on a.id=d.aid
+	left join (select aid,count(aid) as timeCount from `user` where aid is not null  
+	and share_type =2 and type=1
+	<if test="startTime != null and endTime != null"> 
+    and  transfer_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
+    </if>
+	group by aid) g on a.id=g.aid
 	left join department d on a.department_id=d.id
 	left join user_role e on a.id=e.uid
 	left join `role` f on e.rid=f.id
@@ -1119,10 +1125,14 @@ select a.id,a.nickname as name,a.source,c.name contacts,c.mobile as contactMobil
 	and d.aid=  #{aid,jdbcType=VARCHAR}
     </if>
     <if test="type == 0">
-    and a.source in (1,2,3) 
+    and a.source in (1,2,3)
+    and  a.share_type = 0 
     </if>
-     <if test="type==0 or type==1 or type==2 ">
-    and  a.share_type=0
+     <if test="type==1 or type==2 ">
+    and  a.share_type in (0,2)
+    </if>
+    <if test="type == 5">
+    and  a.share_type = 2
     </if>
 	<if test="type == 1">
     and a.source =1
@@ -1160,17 +1170,21 @@ select a.id,a.nickname as name,a.source,c.name contacts,c.mobile as contactMobil
 	group by aid,uid)d on a.id=d.uid
 	</if>
 	where  a.type=1
-    <if test=" type !=3 and type !=4 and aid != null"> 
+   <if test=" type !=3 and type !=4 and aid != null"> 
 	and a.aid=  #{aid,jdbcType=VARCHAR}
     </if>
     <if test=" (type ==3 or type ==4) and aid != null"> 
 	and d.aid=  #{aid,jdbcType=VARCHAR}
     </if>
     <if test="type == 0">
-    and a.source in (1,2,3) and  a.share_type=0
+    and a.source in (1,2,3)
+    and  a.share_type = 0 
+    </if>
+     <if test="type==1 or type==2 ">
+    and  a.share_type in (0,2)
     </if>
-     <if test="type==0 or type==1 or type==2 ">
-    and  a.share_type=0
+    <if test="type == 5">
+    and  a.share_type = 2
     </if>
 	<if test="type == 1">
     and a.source =1  

+ 1 - 0
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -1223,6 +1223,7 @@ public class AdminCustomerApiController extends BaseApiController{
 	 * @param depId
 	 * @param startTime
 	 * @param endTime
+	 * @param type
 	 * @param pageSize
 	 * @param pageNo
 	 * @return