Browse Source

新增客户新增判定是否有效

anderx 3 months ago
parent
commit
58fffb866e

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

@@ -8,6 +8,7 @@ public class DepCountBo {
 	private String id;
 	private String name;
 	private Integer userCount;
+	private Integer privateCount;
 	private Integer firstInterviewCount;
 	private Integer receiveCount;
 	private Integer completeCount;
@@ -26,6 +27,14 @@ public class DepCountBo {
 	private List<DepCountBo> list;
 	private List<AdminCustomerBo> aList;
 
+	public Integer getPrivateCount() {
+		return privateCount;
+	}
+
+	public void setPrivateCount(Integer privateCount) {
+		this.privateCount = privateCount;
+	}
+
 	public Integer getFirstInterviewCount() {
 		return firstInterviewCount;
 	}

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

@@ -461,7 +461,6 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 						admin.setIntentionCount(user.getIntentionCount());
 						admin.setKeynoteCount(user.getKeynoteCount());
 						admin.setGeneralCount(user.getGeneralCount());
-
 						admin.setPrivateCount(user.getPrivateCount());
 						break;
 					}
@@ -499,6 +498,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		if (admin.getKeynoteCount()==null)admin.setKeynoteCount(0);
 		if (admin.getGeneralCount()==null)admin.setGeneralCount(0);
 		if (admin.getFirstInterviewCount()==null)admin.setFirstInterviewCount(0);
+		if (admin.getPrivateCount()==null)admin.setPrivateCount(0);
 	}
 
 	//迭代获取所有部门与部门员工并计算出部门数量
@@ -522,7 +522,8 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 	 */
 	public void sumCount(DepCountBo ab) {
 		int completeCount=0,receiveCount=0,userCount=0,signCount=0,channelCount=0,newCount=0,channelNewCount=0,
-				channelCompleteCount=0,transferCount=0,intentionCount=0,keynoteCount=0,generalCount=0,firstInterviewCount=0;
+				channelCompleteCount=0,transferCount=0,intentionCount=0,keynoteCount=0,generalCount=0,
+				firstInterviewCount=0,privateCount=0;
 
 		if (ab.getList()!=null&&!ab.getList().isEmpty()) {
 			for (DepCountBo a : ab.getList()) {
@@ -539,6 +540,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 				if (a.getKeynoteCount()!=null&& a.getKeynoteCount()!=0) keynoteCount+=a.getKeynoteCount();
 				if (a.getGeneralCount()!=null&& a.getGeneralCount()!=0) generalCount=a.getGeneralCount();
 				if (a.getFirstInterviewCount()!=null&& a.getFirstInterviewCount()!=0) firstInterviewCount+=a.getFirstInterviewCount();
+				if (a.getPrivateCount()!=null&& a.getPrivateCount()!=0) privateCount+=a.getPrivateCount();
 			}
 		}
 		if (ab.getaList()!=null&&!ab.getaList().isEmpty()) {
@@ -556,6 +558,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 				if (a.getKeynoteCount()!=null&& a.getKeynoteCount()!=0) keynoteCount+=a.getKeynoteCount();
 				if (a.getGeneralCount()!=null&& a.getGeneralCount()!=0) generalCount=a.getGeneralCount();
 				if (a.getFirstInterviewCount()!=null&& a.getFirstInterviewCount()!=0) firstInterviewCount+=a.getFirstInterviewCount();
+				if (a.getPrivateCount()!=null&& a.getPrivateCount()!=0) privateCount+=a.getPrivateCount();
 			}
 		}
 		ab.setCompleteCount(completeCount);
@@ -571,7 +574,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		ab.setKeynoteCount(keynoteCount);
 		ab.setGeneralCount(generalCount);
 		ab.setFirstInterviewCount(firstInterviewCount);
-
+		ab.setPrivateCount(privateCount);
 	}
 
 	@SuppressWarnings("unchecked")

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

@@ -2356,6 +2356,7 @@ inner join(
 
 	<select id="selectNoChannelByaids" resultType="com.goafanti.admin.bo.AdminCustomerBo">
 		select aid,sum(if( share_type=0 and new_channel=0,1,0))userCount,
+		sum(if( share_type=0 and new_channel=0 and private_valid=1 ,1,0))privateCount,
 		sum(if(share_type=3 and new_channel=1,1,0))channelCount,
 		sum(if( share_type=2 ,1,0))signCount,
 		sum(if(share_type=0 and source =1 and new_channel=0,1,0))newCount,