Browse Source

客户统计新增转交数据

anderx 1 year ago
parent
commit
3141a752c5

+ 11 - 3
src/main/java/com/goafanti/admin/bo/AdminCustomerBo.java

@@ -22,9 +22,17 @@ public class AdminCustomerBo {
 	private Integer channelCompleteCount;
 	/** 私有领取数 */
 	private Integer receiveCount;
-	
-	
-	
+	/** 私有转交数 */
+	private Integer transferCount;
+
+	public Integer getTransferCount() {
+		return transferCount;
+	}
+
+	public void setTransferCount(Integer transferCount) {
+		this.transferCount = transferCount;
+	}
+
 	public Integer getChannelCount() {
 		return channelCount;
 	}

+ 10 - 0
src/main/java/com/goafanti/admin/bo/DepCountBo.java

@@ -13,11 +13,20 @@ public class DepCountBo {
 	private Integer signCount;
 	private Integer channelCount;
 	private Integer newCount;
+	private Integer transferCount;
 	private Integer channelNewCount;
 	private Integer channelCompleteCount;
 	private List<DepCountBo> list;
 	private List<AdminCustomerBo> aList;
 
+	public Integer getTransferCount() {
+		return transferCount;
+	}
+
+	public void setTransferCount(Integer transferCount) {
+		this.transferCount = transferCount;
+	}
+
 	public DepCountBo() {
 		userCount = 0;
 		receiveCount = 0;
@@ -27,6 +36,7 @@ public class DepCountBo {
 		newCount = 0;
 		channelCompleteCount = 0;
 		channelNewCount = 0;
+		transferCount=0;
 		list=new ArrayList<>();
 		aList=new ArrayList<>();
 	}

+ 6 - 1
src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java

@@ -444,6 +444,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 						admin.setNewCount(user.getNewCount());
 						admin.setChannelNewCount(user.getChannelNewCount());
 						admin.setReceiveCount(user.getReceiveCount());
+						admin.setTransferCount(user.getTransferCount());
 						break;
 					}
 				}
@@ -469,6 +470,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		if (admin.getReceiveCount()==null) admin.setReceiveCount(0);
 		if (admin.getCompleteCount()==null) admin.setCompleteCount(0);
 		if (admin.getChannelCompleteCount()==null) admin.setChannelCompleteCount(0);
+		if (admin.getTransferCount()==null)admin.setTransferCount(0);
 	}
 
 	//迭代获取所有部门与部门员工并计算出部门数量
@@ -491,7 +493,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 	 * @param ab
 	 */
 	public void sumCount(DepCountBo ab) {
-		int completeCount=0,receiveCount=0,userCount=0,signCount=0,channelCount=0,newCount=0,channelNewCount=0,channelCompleteCount=0;
+		int completeCount=0,receiveCount=0,userCount=0,signCount=0,channelCount=0,newCount=0,channelNewCount=0,channelCompleteCount=0,transferCount=0;
 		if (ab.getList()!=null&&!ab.getList().isEmpty()) {
 			for (DepCountBo a : ab.getList()) {
 				if (a.getCompleteCount()!=null&& a.getCompleteCount()!=0) completeCount+=a.getCompleteCount();
@@ -502,6 +504,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 				if (a.getNewCount()!=null&& a.getNewCount()!=0) newCount+=a.getNewCount();
 				if (a.getChannelNewCount()!=null&& a.getChannelNewCount()!=0) channelNewCount+=a.getChannelNewCount();
 				if (a.getChannelCompleteCount()!=null&& a.getChannelCompleteCount()!=0) channelCompleteCount+=a.getChannelCompleteCount();
+				if (a.getTransferCount()!=null&& a.getTransferCount()!=0)transferCount+=a.getTransferCount();
 			}
 		}
 		if (ab.getaList()!=null&&!ab.getaList().isEmpty()) {
@@ -514,6 +517,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 				if (a.getNewCount()!=null&& a.getNewCount()!=0) newCount+=a.getNewCount();
 				if (a.getChannelNewCount()!=null&& a.getChannelNewCount()!=0) channelNewCount+=a.getChannelNewCount();
 				if (a.getChannelCompleteCount()!=null&& a.getChannelCompleteCount()!=0) channelCompleteCount+=a.getChannelCompleteCount();
+				if (a.getTransferCount()!=null&& a.getTransferCount()!=0)transferCount+=a.getTransferCount();
 			}
 		}
 		ab.setCompleteCount(completeCount);
@@ -524,6 +528,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		ab.setNewCount(newCount);
 		ab.setChannelNewCount(channelNewCount);
 		ab.setChannelCompleteCount(channelCompleteCount);
+		ab.setTransferCount(transferCount);
 
 	}
 

+ 3 - 1
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -2310,7 +2310,9 @@ inner join(
 	<select id="selectNoChannelByaids" resultType="com.goafanti.admin.bo.AdminCustomerBo">
 		select aid,sum(if( share_type=0 and channel=0,1,0))userCount,
 		sum(if(share_type=3 and channel=1,1,0))channelCount, sum(if( share_type=2 ,1,0))signCount,
-		sum(if(share_type=0 and source =1 and channel=0,1,0))newCount, sum(if(share_type=0 and source =1 and channel=1,1,0))channelNewCount,
+		sum(if(share_type=0 and source =1 and channel=0,1,0))newCount,
+		sum(if(share_type=0 and source =3 and channel=0,1,0))transferCount,
+		sum(if(share_type=0 and source =1 and channel=1,1,0))channelNewCount,
 		sum(if(share_type=0 and source =2 and channel=0,1,0))receiveCount from `user` where `type` =1 and new_channel=0
 		<if test="startTime != null and endTime != null">
 			and  transfer_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}