Browse Source

Merge branch 'test' of jishutao/aft into prod

gitadmin 8 years ago
parent
commit
f9609b484c

+ 1 - 1
src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java

@@ -71,7 +71,7 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 			pNo = 1;
 		}
 
-		if (pSize == null || pSize < 0 || pSize > 10) {
+		if (pSize == null || pSize < 0 ) {
 			pSize = 10;
 		} 	
 		Pagination<BusinessProjectBo> pt=(Pagination<BusinessProjectBo>)findPage("findProjectListByPage", "findProjectListCount",

+ 19 - 0
src/main/java/com/goafanti/common/dao/DailySalesReportMapper.java

@@ -2,13 +2,18 @@ package com.goafanti.common.dao;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.ibatis.annotations.Param;
 import org.springframework.ui.ModelMap;
 
 import com.goafanti.common.model.DailySalesReport;
+import com.goafanti.report.bo.CountDepMarketingStatisticsBo;
+import com.goafanti.report.bo.CountMarketingStatisticsBo;
 import com.goafanti.report.bo.DepartmentSalesReportBO;
 import com.goafanti.report.bo.PersonalSalesReportBO;
+import com.goafanti.report.bo.SomeTimeMarketingBo;
+import com.goafanti.report.bo.marketingESBo;
 
 public interface DailySalesReportMapper {
 
@@ -45,4 +50,18 @@ public interface DailySalesReportMapper {
 
 	List<ModelMap> selectSalesDepartmentExtraReports(@Param("startTime") Date startTime,
 			@Param("endTime") Date endTime);
+
+	List<marketingESBo> findmarketingStatisticsList(@Param("depId")String depId);
+
+	List<marketingESBo> marketingDepStatisticsList(@Param("depId")String depId);
+
+	CountMarketingStatisticsBo privateCustomersCount(@Param("depId")String depId);
+
+	CountDepMarketingStatisticsBo privateCustomersDepCount(@Param("depId")String depId);
+
+	List<SomeTimeMarketingBo> sometimeMarketingStatistics(@Param("depId")String depId, @Param("startTime")String startTime, @Param("endTime")String endTime);
+
+	List<SomeTimeMarketingBo> sometimeMarketingDepStatistics(@Param("depId")String depId, @Param("startTime")String startTime, @Param("endTime")String endTime);
+
+	SomeTimeMarketingBo countsometimeMarketingStatistics(@Param("depId")String depId, @Param("startTime")String startTime, @Param("endTime")String endTime);
 }

+ 9 - 0
src/main/java/com/goafanti/common/dao/UserMapper.java

@@ -1,5 +1,6 @@
 package com.goafanti.common.dao;
 
+import java.util.Date;
 import java.util.List;
 
 import org.apache.ibatis.annotations.Param;
@@ -20,6 +21,8 @@ import com.goafanti.customer.bo.CustomerPersonalDetailBo;
 import com.goafanti.customer.bo.CustomerSimpleBo;
 import com.goafanti.customer.bo.FollowBusinessBo;
 import com.goafanti.customer.bo.LockingReleaseBo;
+import com.goafanti.report.bo.CountMarketingStatisticsBo;
+import com.goafanti.report.bo.marketingESBo;
 
 public interface UserMapper {
 	/**
@@ -227,4 +230,10 @@ public interface UserMapper {
 	List<User> selectUserByRoleName(@Param("roleName")String roleName);
 	
 	void updateReleaseLock(List<LockingReleaseBo> list);
+
+	marketingESBo marketingStatistics(@Param("id")String id, @Param("dailyStart")String dailyStart, @Param("dailyEnd")String dailyEnd);
+
+	marketingESBo marketingDepStatistics(@Param("depId")String depId, @Param("dailyStart")String dailyStart, @Param("dailyEnd")String dailyEnd);
+
+	CountMarketingStatisticsBo countmarketingDepStatistics(@Param("depId")String depId, @Param("dailyStart")String dailyStart, @Param("dailyEnd")String dailyEnd);
 }

+ 220 - 0
src/main/java/com/goafanti/common/mapper/DailySalesReportMapper.xml

@@ -165,4 +165,224 @@
 		and a.position like concat(#{position,jdbcType=VARCHAR},'%')
 	</if>
   </select>
+  
+   <select id="findmarketingStatisticsList" parameterType="String" resultType="com.goafanti.report.bo.marketingESBo">
+		select a.id ,a.name,a.department_id as departmentId,d.name as departmentName,d.manager_id,f.name as departmentManagerName,
+				c.role_name as roleName,ifnull(e.privateCustomersCount,0)as privateCustomersCount,a.create_time as entryTime
+		from admin a left join user_role b
+		on a.id=b.uid left join role c
+		on b.rid=c.id left join department_management d
+		on a.department_id=d.id left join (select aid,count(0) as privateCustomersCount from user group by aid)e
+		on a.id=e.aid left join admin f
+		on d.manager_id=f.id
+		where 1=1
+		and (c.role_name='营销员' or c.role_name='营销经理'or c.role_name='营销管理员')
+	<if test="depId != null">
+		and a.department_id = #{depId,jdbcType=VARCHAR}
+	</if>
+	order by a.name desc
+ </select>
+  
+  <select id="marketingDepStatisticsList" parameterType="String" resultType="com.goafanti.report.bo.marketingESBo">
+	select
+	a.department_id as departmentId,
+	b.name as departmentName,
+	b.manager_id,
+	c.name as departmentManagerName,
+	a.count2 as privateCustomersCount,
+	d.count3 as departmentNumber
+from
+	(
+		select
+			z.department_id,
+			sum( y.count1 ) as count2
+		from
+			(
+				select
+					a.id,
+					count( a.id ) as count1
+				from
+					admin a left join user b on
+					a.id = b.aid 
+				group by
+					a.id
+			) y left join admin z on
+			y.id = z.id
+		group by
+			z.department_id
+	) a left join department_management b 
+	on a.department_id = b.id left join admin c
+	on b.manager_id=c.id left join (select department_id,count(0) as count3 from admin   	group by department_id)d
+	on a.department_id = d.department_id
+	where 1=1
+	<if test="depId != null">
+		and a.department_id = #{depId,jdbcType=VARCHAR}
+	</if>
+	order by b.name desc
+		
+	</select>
+  <select id="privateCustomersCount" parameterType="string" resultType="com.goafanti.report.bo.CountMarketingStatisticsBo">
+	select sum(e.privateCustomersCount) as privateCustomersCount
+	from admin a left join user_role b
+	on a.id=b.uid left join role c
+	on b.rid=c.id left join department_management d
+	on a.department_id=d.id left join (select aid,count(0) as privateCustomersCount from user group by aid)e
+	on a.id=e.aid  where 1=1
+	<if test="depId != null">
+		and a.department_id = #{depId,jdbcType=VARCHAR}
+	</if>
+	and (c.role_name='营销员' or c.role_name='营销经理'or c.role_name='营销管理员')
+	</select>
+  
+  <select id="privateCustomersDepCount" parameterType="String" resultType="com.goafanti.report.bo.CountDepMarketingStatisticsBo">
+	select
+	sum(a.count2) as privateCustomersCount,
+	sum(d.count3) as departmentNumber
+from
+	(
+		select
+			z.department_id,
+			sum( y.count1 ) as count2
+		from
+			(
+				select
+					a.id,
+					count( a.id ) as count1
+				from
+					admin a left join user b on
+					a.id = b.aid 
+				group by
+					a.id
+			) y left join admin z on
+			y.id = z.id
+		group by
+			z.department_id
+	) a left join department_management b 
+	on a.department_id = b.id left join admin c
+	on b.manager_id=c.id left join (select department_id,count(0) as count3 from admin   	group by department_id)d
+	on a.department_id = d.department_id
+	where 1=1
+<if test="depId != null">
+and a.department_id = #{depId,jdbcType=VARCHAR}
+</if>
+</select>
+
+
+<select id="sometimeMarketingStatistics" parameterType="String" resultType="com.goafanti.report.bo.SomeTimeMarketingBo">
+select a.id,a.name,d.name as departmentName,role_name as roleName,ifnull(e.telNo,0)as countTelNo,
+	ifnull(e.visitNo,0)as countVisitNo,ifnull(e.followNo,0)as countFollowNo
+	<if test="startTime !=null and endTime !=null">
+	,countFollowNo/datediff(#{endTime,jdbcType=VARCHAR},#{startTime,jdbcType=VARCHAR}) as AVG
+	</if>
+	from admin a left join user_role b on
+	a.id = b.uid left join role c on
+	b.rid = c.id left join department_management d on
+	a.department_id = d.id left join (		select
+		a.aid,
+		count( 0 ) as followNo,
+		ifnull(
+			sum( case when a.contact_type = 0 then 1 else 0 end ),
+			0
+		) as visitNo,
+		ifnull(
+			sum( case when a.contact_type = 1 then 1 else 0 end ),
+			0
+			) as telNo
+	from user_follow a 
+	where
+		1 = 1
+	<if test="startTime !=null">
+	and a.create_time &gt;  #{startTime,jdbcType=VARCHAR}
+	</if>
+	<if test="endTime !=null">
+	and a.create_time &lt;  #{endTime,jdbcType=VARCHAR}
+	</if>
+		GROUP BY a.aid)e on a.id=e.aid
+	where
+	1 = 1
+	and(
+		c.role_name = '营销员'
+		or c.role_name = '营销经理'
+		or c.role_name = '营销管理员'
+	)
+	<if test="depId != null">
+	and a.department_id= #{depId,jdbcType=VARCHAR}
+	</if>
+</select>
+<select id="sometimeMarketingDepStatistics" parameterType="String" resultType="com.goafanti.report.bo.SomeTimeMarketingBo">
+	select
+	a.department_id as departmentId,
+	d.name as  departmentName,
+	f.name as departmentManagerName,
+	d.manager_id,
+	ifnull(e.telNo,0) as countTelNo,
+	ifnull(e.visitNo,0) as countVisitNo,
+	ifnull(e.followNo,0) as countFollowNo
+	<if test="startTime !=null and endTime !=null">
+			,e.followNo/datediff(#{endTime,jdbcType=VARCHAR},#{startTime,jdbcType=VARCHAR}) as AVG
+			</if>
+	from admin a left join user_role b on
+	a.id = b.uid left join role c on
+	b.rid = c.id left join department_management d on
+	a.department_id = d.id left join admin f on 
+	d.manager_id=f.id left join (select
+		b.department_id,
+		count( 0 ) as followNo,
+		ifnull(
+			sum( case when a.contact_type = 0 then 1 else 0 end ),
+			0
+		) as visitNo,
+		ifnull(
+			sum( case when a.contact_type = 1 then 1 else 0 end ),
+			0
+			) as telNo
+	from user_follow a left join admin b on a.aid=b.id
+	left join department_management c on b.department_id=c.id
+	where
+		1 = 1
+	<if test="startTime !=null">
+	and a.create_time &gt;  #{startTime,jdbcType=VARCHAR}
+	</if>
+	<if test="endTime !=null">
+	and a.create_time &lt;  #{endTime,jdbcType=VARCHAR}
+	</if>
+		GROUP BY b.department_id)e on a.department_id=e.department_id
+	where
+	1 = 1
+	and(
+		c.role_name = '营销员'
+		or c.role_name = '营销经理'
+		or c.role_name = '营销管理员'
+	)
+	<if test="depId != null">
+	and a.department_id= #{depId,jdbcType=VARCHAR}
+	</if>
+	group by a.department_id
+	</select>
+	<select id="countsometimeMarketingStatistics" parameterType="String" resultType="com.goafanti.report.bo.SomeTimeMarketingBo">
+		select
+			count( 0 ) as countFollowNo,
+			ifnull(
+				sum( case when a.contact_type = 0 then 1 else 0 end ),
+				0
+			) as countVisitNo,
+			ifnull(
+				sum( case when a.contact_type = 1 then 1 else 0 end ),
+				0
+			) as countTelNo
+			<if test="startTime !=null and endTime !=null">
+			,count( 0 )/datediff(#{endTime,jdbcType=VARCHAR},#{startTime,jdbcType=VARCHAR}) as A
+			</if>
+		from
+			user_follow a left join admin b on
+			a.aid = b.id left join department_management c on
+			b.department_id = c.id left join user_role d on
+			b.id = d.uid left join role e on
+			d.rid = e.id
+		where 1 = 1
+		and( e.role_name = '营销员' or e.role_name = '营销经理' or e.role_name = '营销管理员')
+		<if test="depId != null">
+		and a.department_id= #{depId,jdbcType=VARCHAR}
+		</if>
+	</select>
 </mapper>

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

@@ -1598,4 +1598,61 @@
 			#{item.uid}
 		</foreach>
     </update>
+    
+    <select id="marketingStatistics" parameterType="java.lang.String" resultType="com.goafanti.report.bo.marketingESBo">
+   	 		select
+			aid,
+			count(0) as yearFollowNo,
+			ifnull(sum(case when contact_type = 0 then 1 else 0 end) ,0)as yearVisitNo, 
+			ifnull(sum(case when contact_type = 1 then 1 else 0 end) ,0)as yearTelNo
+			from user_follow where 1=1
+			and aid = #{id,jdbcType=VARCHAR}
+			and create_time &gt; #{dailyStart,jdbcType=VARCHAR}
+			and create_time &lt; #{dailyEnd,jdbcType=VARCHAR}
+			GROUP BY aid
+	</select>
+	<select id="marketingDepStatistics" parameterType="java.lang.String" resultType="com.goafanti.report.bo.marketingESBo">
+	   	 select
+		b.department_id,
+		count( 0 ) as yearFollowNo,
+		ifnull(
+			sum( case when a.contact_type = 0 then 1 else 0 end ),
+			0
+		) as yearVisitNo,
+		ifnull(
+			sum( case when a.contact_type = 1 then 1 else 0 end ),
+			0
+			) as yearTelNo
+	from user_follow a left join admin b on a.aid =b.id
+	where
+		1 = 1
+		<if test="depId !=null">
+		and b.department_id = #{depId,jdbcType=VARCHAR}
+		</if>
+		and a.create_time &gt; #{dailyStart,jdbcType=VARCHAR}
+		and a.create_time &lt; #{dailyEnd,jdbcType=VARCHAR}
+		GROUP BY b.department_id
+	</select>
+	
+	<select id="countmarketingDepStatistics" parameterType="java.lang.String" resultType="com.goafanti.report.bo.CountMarketingStatisticsBo">
+	   	 					select
+		count( 0 ) as yearFollowNo,
+		ifnull(
+			sum( case when a.contact_type = 0 then 1 else 0 end ),
+			0
+		) as yearVisitNo,
+		ifnull(
+			sum( case when a.contact_type = 1 then 1 else 0 end ),
+			0
+		) as yearTelNo
+	from user_follow a left join admin b on a.aid =b.id
+	where
+		1 = 1
+		<if test="depId !=null">
+		and b.department_id = #{depId,jdbcType=VARCHAR}
+		</if>
+		and a.create_time &gt; #{dailyStart,jdbcType=VARCHAR}
+		and a.create_time &lt; #{dailyEnd,jdbcType=VARCHAR}
+		
+	</select>
 </mapper>

+ 66 - 0
src/main/java/com/goafanti/report/bo/CountDepMarketingStatisticsBo.java

@@ -0,0 +1,66 @@
+package com.goafanti.report.bo;
+
+
+
+public class CountDepMarketingStatisticsBo extends CountMarketingStatisticsBo{
+		private String departmentNumber;
+		private String dailyAVG;
+		private String weeklyAVG;
+		private String monthAVG;
+		private String yearAVG;
+		public String getDailyAVG() {
+			if (null==dailyAVG) {
+				return "0";
+			}
+			return dailyAVG;
+		}
+
+		public void setDailyAVG(String dailyAVG) {
+			this.dailyAVG = dailyAVG;
+		}
+		
+		public String getWeeklyAVG() {
+			if (null==weeklyAVG) {
+				return "0";
+			}
+			return weeklyAVG;
+		}
+
+		public void setWeeklyAVG(String weeklyAVG) {
+			this.weeklyAVG = weeklyAVG;
+		}
+		
+
+		public String getMonthAVG() {
+			if (null==monthAVG) {
+				return "0";
+			}
+			return monthAVG;
+		}
+
+		public void setMonthAVG(String monthAVG) {
+			this.monthAVG = monthAVG;
+		}
+
+		public String getYearAVG() {
+			if (null==yearAVG) {
+				return "0";
+			}
+			return yearAVG;
+		}
+
+		public void setYearAVG(String yearAVG) {
+			this.yearAVG = yearAVG;
+		}
+
+		public String getDepartmentNumber() {
+			if (null==departmentNumber) {
+				return "0";
+			}
+			return departmentNumber;
+		}
+
+		public void setDepartmentNumber(String departmentNumber) {
+			this.departmentNumber = departmentNumber;
+		}
+}

+ 135 - 0
src/main/java/com/goafanti/report/bo/CountMarketingStatisticsBo.java

@@ -0,0 +1,135 @@
+package com.goafanti.report.bo;
+
+public class CountMarketingStatisticsBo {
+	private String privateCustomersCount;
+	private String dailyVisitNo;
+	private String dailyTelNo;
+	private String dailyFollowNo;
+	private String weeklyVisitNo;
+	private String weeklyTelNo;
+	private String weeklyFollowNo;
+	private String monthVisitNo;
+	private String monthTelNo;
+	private String monthFollowNo;
+	private String yearVisitNo;
+	private String yearTelNo;
+	private String yearFollowNo;
+	public String getPrivateCustomersCount() {
+		if (null==privateCustomersCount) {
+			return "0";
+		}
+		return privateCustomersCount;
+	}
+	public void setPrivateCustomersCount(String privateCustomersCount) {
+		this.privateCustomersCount = privateCustomersCount;
+	}
+	public String getDailyVisitNo() {
+		if (null==dailyVisitNo) {
+			return "0";
+		}
+		return dailyVisitNo;
+	}
+	public void setDailyVisitNo(String dailyVisitNo) {
+		this.dailyVisitNo = dailyVisitNo;
+	}
+	public String getDailyTelNo() {
+		if (null==dailyTelNo) {
+			return "0";
+		}
+		return dailyTelNo;
+	}
+	public void setDailyTelNo(String dailyTelNo) {
+		this.dailyTelNo = dailyTelNo;
+	}
+	public String getDailyFollowNo() {
+		if (null==dailyFollowNo) {
+			return "0";
+		}
+		return dailyFollowNo;
+	}
+	public void setDailyFollowNo(String dailyFollowNo) {
+		this.dailyFollowNo = dailyFollowNo;
+	}
+	public String getWeeklyVisitNo() {
+		if (null==weeklyVisitNo) {
+			return "0";
+		}
+		return weeklyVisitNo;
+	}
+	public void setWeeklyVisitNo(String weeklyVisitNo) {
+		this.weeklyVisitNo = weeklyVisitNo;
+	}
+	public String getWeeklyTelNo() {
+		if (null==weeklyTelNo) {
+			return "0";
+		}
+		return weeklyTelNo;
+	}
+	public void setWeeklyTelNo(String weeklyTelNo) {
+		this.weeklyTelNo = weeklyTelNo;
+	}
+	public String getWeeklyFollowNo() {
+		if (null==weeklyFollowNo) {
+			return "0";
+		}
+		return weeklyFollowNo;
+	}
+	public void setWeeklyFollowNo(String weeklyFollowNo) {
+		this.weeklyFollowNo = weeklyFollowNo;
+	}
+	public String getMonthVisitNo() {
+		if (null==monthVisitNo) {
+			return "0";
+		}
+		return monthVisitNo;
+	}
+	public void setMonthVisitNo(String monthVisitNo) {
+		this.monthVisitNo = monthVisitNo;
+	}
+	public String getMonthTelNo() {
+		if (null==monthTelNo) {
+			return "0";
+		}
+		return monthTelNo;
+	}
+	public void setMonthTelNo(String monthTelNo) {
+		this.monthTelNo = monthTelNo;
+	}
+	public String getMonthFollowNo() {
+		if (null==monthFollowNo) {
+			return "0";
+		}
+		return monthFollowNo;
+	}
+	public void setMonthFollowNo(String monthFollowNo) {
+		this.monthFollowNo = monthFollowNo;
+	}
+	public String getYearVisitNo() {
+		if (null==yearVisitNo) {
+			return "0";
+		}
+		return yearVisitNo;
+	}
+	public void setYearVisitNo(String yearVisitNo) {
+		this.yearVisitNo = yearVisitNo;
+	}
+	public String getYearTelNo() {
+		if (null==yearTelNo) {
+			return "0";
+		}
+		return yearTelNo;
+	}
+	public void setYearTelNo(String yearTelNo) {
+		this.yearTelNo = yearTelNo;
+	}
+	public String getYearFollowNo() {
+		if (null==yearFollowNo) {
+			return "0";
+		}
+		return yearFollowNo;
+	}
+	public void setYearFollowNo(String yearFollowNo) {
+		this.yearFollowNo = yearFollowNo;
+	}
+
+}

+ 34 - 1
src/main/java/com/goafanti/report/bo/ReportDate.java

@@ -3,6 +3,9 @@ package com.goafanti.report.bo;
 import java.util.Calendar;
 import java.util.Date;
 
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.utils.DateUtils;
 
 public class ReportDate {
@@ -114,5 +117,35 @@ public class ReportDate {
 	public void setYearEnd(Date yearEnd) {
 		this.yearEnd = yearEnd;
 	}
-
+	public String getStringDailyEnd() {
+		return DateFormatUtils.format(this.getDailyEnd(), AFTConstants.YYYYMMDDHHMMSS);
+	}
+	public String getStringDailyStart() {
+		return DateFormatUtils.format(this.getDailyStart(), AFTConstants.YYYYMMDDHHMMSS);
+	}
+	public String getStringWeeklyStart() {
+		return DateFormatUtils.format(this.getWeeklyStart(), AFTConstants.YYYYMMDDHHMMSS);
+	}
+	public String getStringWeeklyEnd() {
+		return DateFormatUtils.format(this.getWeeklyEnd(), AFTConstants.YYYYMMDDHHMMSS);
+	}
+	public String getStringMonthStart() {
+		return DateFormatUtils.format(this.getMonthStart(), AFTConstants.YYYYMMDDHHMMSS);
+	}
+	public String getStringMonthEnd() {
+		return DateFormatUtils.format(this.getMonthEnd(), AFTConstants.YYYYMMDDHHMMSS);
+	}
+	public String getStringYearStart() {
+		return DateFormatUtils.format(this.getYearStart(), AFTConstants.YYYYMMDDHHMMSS);
+	}
+	public String getStringYearEnd() {
+		return DateFormatUtils.format(this.getYearEnd(), AFTConstants.YYYYMMDDHHMMSS);
+	}
+	public String getStringQuarterStart() {
+		return DateFormatUtils.format(this.getQuarterStart(), AFTConstants.YYYYMMDDHHMMSS);
+	}
+	public String getStringQuarterEnd() {
+		return DateFormatUtils.format(this.getQuarterEnd(), AFTConstants.YYYYMMDDHHMMSS);
+	}
+	
 }

+ 75 - 0
src/main/java/com/goafanti/report/bo/SomeTimeMarketingBo.java

@@ -0,0 +1,75 @@
+package com.goafanti.report.bo;
+
+public class SomeTimeMarketingBo {
+		private String id;
+		private String name;
+		private String departmentId;
+		private String departmentManagerName;
+		private String departmentName;
+		private String roleName;
+		private String countVisitNo;
+		private String countTelNo;
+		private String countFollowNo;
+		private String AVG;
+		public String getId() {
+			return id;
+		}
+		public void setId(String id) {
+			this.id = id;
+		}
+		public String getName() {
+			return name;
+		}
+		public void setName(String name) {
+			this.name = name;
+		}
+		public String getDepartmentName() {
+			return departmentName;
+		}
+		public void setDepartmentName(String departmentName) {
+			this.departmentName = departmentName;
+		}
+		public String getRoleName() {
+			return roleName;
+		}
+		public void setRoleName(String roleName) {
+			this.roleName = roleName;
+		}
+		public String getCountVisitNo() {
+			return countVisitNo;
+		}
+		public void setCountVisitNo(String countVisitNo) {
+			this.countVisitNo = countVisitNo;
+		}
+		public String getCountTelNo() {
+			return countTelNo;
+		}
+		public void setCountTelNo(String countTelNo) {
+			this.countTelNo = countTelNo;
+		}
+		public String getCountFollowNo() {
+			return countFollowNo;
+		}
+		public void setCountFollowNo(String countFollowNo) {
+			this.countFollowNo = countFollowNo;
+		}
+		public String getDepartmentId() {
+			return departmentId;
+		}
+		public void setDepartmentId(String departmentId) {
+			this.departmentId = departmentId;
+		}
+		public String getDepartmentManagerName() {
+			return departmentManagerName;
+		}
+		public void setDepartmentManagerName(String departmentManagerName) {
+			this.departmentManagerName = departmentManagerName;
+		}
+		public String getAVG() {
+			return AVG;
+		}
+		public void setAVG(String aVG) {
+			AVG = aVG;
+		}
+		
+}

+ 100 - 0
src/main/java/com/goafanti/report/bo/marketingESBo.java

@@ -0,0 +1,100 @@
+package com.goafanti.report.bo;
+
+import java.util.Map;
+
+public class marketingESBo {
+		private String id;
+		private String name;
+		private String departmentName;
+		private String departmentNumber;
+		private String departmentId;
+		private String departmentManagerName;
+		private String roleName;
+		private String entryTime;
+		private String privateCustomersCount;
+		private Map<String,Object> values;
+		private String yearVisitNo;
+		private String yearTelNo;
+		private String yearFollowNo;
+		public String getName() {
+			return name;
+		}
+		public void setName(String name) {
+			this.name = name;
+		}
+		public String getDepartmentName() {
+			return departmentName;
+		}
+		public void setDepartmentName(String departmentName) {
+			this.departmentName = departmentName;
+		}
+		public String getRoleName() {
+			return roleName;
+		}
+		public void setRoleName(String roleName) {
+			this.roleName = roleName;
+		}
+		public String getEntryTime() {
+			return entryTime;
+		}
+		public void setEntryTime(String entryTime) {
+			this.entryTime = entryTime;
+		}
+		public String getPrivateCustomersCount() {
+			return privateCustomersCount;
+		}
+		public void setPrivateCustomersCount(String privateCustomersCount) {
+			this.privateCustomersCount = privateCustomersCount;
+		}
+		public String getYearVisitNo() {
+			if (null==yearVisitNo)	return "0";
+			return yearVisitNo;
+		}
+		public void setYearVisitNo(String yearVisitNo) {
+			this.yearVisitNo = yearVisitNo;
+		}
+		public String getYearTelNo() {
+			if (null==yearTelNo)	return "0";
+			return yearTelNo;
+		}
+		public void setYearTelNo(String yearTelNo) {
+			this.yearTelNo = yearTelNo;
+		}
+		public String getYearFollowNo() {
+			if (null==yearFollowNo)	return "0";
+			return yearFollowNo;
+		}
+		public void setYearFollowNo(String yearFollowNo) {
+			this.yearFollowNo = yearFollowNo;
+		}
+		public String getDepartmentManagerName() {
+			return departmentManagerName;
+		}
+		public void setDepartmentManagerName(String departmentManagerName) {
+			this.departmentManagerName = departmentManagerName;
+		}
+		public String getDepartmentId() {
+			return departmentId;
+		}
+		public void setDepartmentId(String departmentId) {
+			this.departmentId = departmentId;
+		}
+		public String getId() {
+			return id;
+		}
+		public void setId(String id) {
+			this.id = id;
+		}
+		public String getDepartmentNumber() {
+			return departmentNumber;
+		}
+		public void setDepartmentNumber(String departmentNumber) {
+			this.departmentNumber = departmentNumber;
+		}
+		public Map<String,Object> getValues() {
+			return values;
+		}
+		public void setValues(Map<String,Object> values) {
+			this.values = values;
+		}
+}

+ 98 - 0
src/main/java/com/goafanti/report/controller/ReportApiController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.report.enums.OrderBy;
@@ -107,5 +108,102 @@ public class ReportApiController extends BaseApiController {
 		// 统计从指定日期前一天的17点到指定日期17点的数据,算作改日期数据
 		return res().data(reportService.insertDailyReports(start, now.getTime()));
 	}
+	/**
+	 * 客户营销统计表
+	 * @param depId
+	 * @param type
+	 * @return
+	 */
+	@RequestMapping(value = "/sales/marketingStatistics", method = RequestMethod.GET)
+	public Result marketingStatistics(String depId,Integer type) {
+		Result res=new Result();
+		
+		if (null==type||type>1) {
+			 res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "参数错误", "参数"));
+	            return res;
+		}
+		if (Integer.valueOf(type)==0) {
+			return res.data(reportService.marketingStatistics(depId));
+		}else {
+			return res.data(reportService.marketingDepStatistics(depId));
+		}
+	}
+	/**
+	 * 客户营销统计表(总计)
+	 * @param depId
+	 * @param type
+	 * @return
+	 */
+	@RequestMapping(value = "/sales/countMarketingStatistics", method = RequestMethod.GET)
+	public Result countMarketingStatistics(String depId,Integer type) {
+		Result res=new Result();
+		
+		if (null==type||type>1) {
+			 res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "参数错误", "参数"));
+	            return res;
+		}
+		if (Integer.valueOf(type)==0) {
+			return res.data(reportService.countMarketingStatistics(depId));
+		}else {
+			return res.data(reportService.countMarketingDepStatistics(depId));
+		}
+	}
+	
+	/**
+	 * 客户营销时段统计表
+	 * @param depId
+	 * @param type
+	 * @return
+	 */
+	@RequestMapping(value = "/sales/sometimeMarketingStatistics", method = RequestMethod.GET)
+	public Result sometimeMarketingStatistics(String depId,Integer timeType,Integer type,String startTime,String endTime) {
+		Result res=new Result();
+		if (null==type||type>1) {
+			 res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "参数错误", "参数"));
+	            return res;
+		}
+		if (null==timeType||timeType>4) {
+			 res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "日期类型参数参数错误", "日期类型参数"));
+	            return res;
+	    }
+	   if (timeType==4&&null==startTime&&null==endTime) {
+			 res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "日期类型参数参数错误", "日期类型参数"));
+	            return res;
+		}
+		if (Integer.valueOf(type)==0) {
+			return res.data(reportService.sometimeMarketingStatistics(depId,timeType,startTime,endTime));
+		}else {
+			return res.data(reportService.sometimeMarketingDepStatistics(depId,timeType,startTime,endTime));
+		}
+	}
+	/**
+	 * 客户营销时段统计表(总计)
+	 * @param depId
+	 * @param type
+	 * @return
+	 */
+	@RequestMapping(value = "/sales/countsometimeMarketingStatistics", method = RequestMethod.GET)
+	public Result countsometimeMarketingStatistics(String depId,Integer timeType,Integer type,String startTime,String endTime) {
+		Result res=new Result();
+		if (null==type||type>1) {
+			 res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "参数错误", "参数"));
+	            return res;
+		}
+		if (null==timeType||timeType>4) {
+			 res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "日期类型参数参数错误", "日期类型参数"));
+	            return res;
+	    }
+	   if (timeType==4&&null==startTime&&null==endTime) {
+			 res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "日期类型参数参数错误", "日期类型参数"));
+	            return res;
+		}
+	   if (Integer.valueOf(type)==0) {
+			return res.data(reportService.countSometimeMarketingStatistics(depId,timeType,startTime,endTime));
+		}else {
+			return res.data(reportService.countSometimeMarketingDepStatistics(depId,timeType,startTime,endTime));
+		}
+	}
+	
+	
 
 }

+ 47 - 0
src/main/java/com/goafanti/report/enums/TimeType.java

@@ -0,0 +1,47 @@
+package com.goafanti.report.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum TimeType {
+	WEEKLY(0, "本周"),
+	MONTH(1, "本月"),
+	QTR(2, "本季"),
+	YEAR(3, "本年"),
+	ZS(4, "自选");
+
+	private TimeType(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, TimeType> status = new HashMap<Integer, TimeType>();
+
+	static {
+		for (TimeType value : TimeType.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static TimeType getField(String code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return ZS;
+	}
+
+	public static boolean containsType(String code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+}

+ 233 - 0
src/main/java/com/goafanti/report/service/SalesReportServiceImpl.java

@@ -1,6 +1,7 @@
 package com.goafanti.report.service;
 
 import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.Date;
 import java.util.HashMap;
@@ -10,27 +11,38 @@ import java.util.Optional;
 import java.util.stream.Collectors;
 
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.ui.ModelMap;
 
+import com.alibaba.druid.sql.visitor.functions.If;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.DailySalesReportMapper;
+import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.DailySalesReport;
 import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.report.bo.CountDepMarketingStatisticsBo;
+import com.goafanti.report.bo.CountMarketingStatisticsBo;
 import com.goafanti.report.bo.DepartmentSalesReportBO;
 import com.goafanti.report.bo.PersonalSalesReportBO;
 import com.goafanti.report.bo.ReportDate;
 import com.goafanti.report.bo.SalesValues;
+import com.goafanti.report.bo.SomeTimeMarketingBo;
+import com.goafanti.report.bo.marketingESBo;
 import com.goafanti.report.enums.OrderBy;
 import com.goafanti.report.enums.SalesReportOrderField;
+import com.goafanti.report.enums.TimeType;
 
 @Service
 public class SalesReportServiceImpl extends BaseMybatisDao<DailySalesReportMapper> {
 
 	@Autowired
 	DailySalesReportMapper salesReportMapper;
+	@Autowired
+	UserMapper userMapper;
 
 	public int insertDailyReports(Date startTime, Date endTime) {
 		List<DailySalesReport> list = salesReportMapper.selectAdmins();
@@ -243,4 +255,225 @@ public class SalesReportServiceImpl extends BaseMybatisDao<DailySalesReportMappe
 		}
 	}
 
+	
+	public List<marketingESBo> marketingStatistics(String depId) {
+		List<marketingESBo> list=salesReportMapper.findmarketingStatisticsList(depId);
+		ReportDate rd = new ReportDate(new Date());
+		for (marketingESBo m : list) {
+				Map<String,Object> map=new HashMap<>();
+				marketingESBo day=userMapper.marketingStatistics(m.getId(),DateFormatUtils.format(rd.getDailyStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getDailyEnd(), AFTConstants.YYYYMMDDHHMMSS));
+				Map<String,String> daily =valuesloading(day);
+				map.put("daily", daily);
+				marketingESBo weekly=userMapper.marketingStatistics(m.getId(),DateFormatUtils.format(rd.getWeeklyStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getWeeklyEnd(), AFTConstants.YYYYMMDDHHMMSS));
+					Map<String,String> week =valuesloading(weekly);
+					map.put("week", week);
+				marketingESBo month=userMapper.marketingStatistics(m.getId(),DateFormatUtils.format(rd.getMonthStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getMonthEnd(), AFTConstants.YYYYMMDDHHMMSS));
+					Map<String,String> months =valuesloading(month);
+					map.put("months", months);
+				marketingESBo year=userMapper.marketingStatistics(m.getId(),DateFormatUtils.format(rd.getYearStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getYearEnd(), AFTConstants.YYYYMMDDHHMMSS));
+					Map<String,String> annual =valuesloading(year);
+					map.put("annual", annual);
+				m.setValues(map);
+			}
+			return list;
+	}
+
+	
+	private Map<String, String> valuesloading(marketingESBo day) {
+		Map<String, String> map=new HashMap<>();
+		if (null!=day) {
+			map.put("VisitNo", day.getYearVisitNo());
+			map.put("TelNo", day.getYearTelNo());
+			map.put("FollowNo", day.getYearFollowNo());
+		}else {
+			map.put("VisitNo", "0");
+			map.put("TelNo", "0");
+			map.put("FollowNo", "0");
+		}
+		
+		return map;
+	}
+
+	public List<marketingESBo> marketingDepStatistics(String depId) {
+		List<marketingESBo> list=salesReportMapper.marketingDepStatisticsList(depId);
+		ReportDate rd = new ReportDate(new Date());
+			for (marketingESBo m : list) {
+				Map<String,Object> map=new HashMap<>();
+				marketingESBo day=null;
+				if(null!=m.getDepartmentId())day=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getDailyStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getDailyEnd(), AFTConstants.YYYYMMDDHHMMSS));
+					Map<String,String> daily =valuesloading(day);
+					if (null==day||null==day.getYearFollowNo()||null==m.getDepartmentNumber()) {
+					daily.put("AVG", "0");
+					}else {
+						daily.put("AVG", calculateAVG(day.getYearFollowNo(),m.getDepartmentNumber()));
+					}
+					map.put("daily", daily);
+				marketingESBo weekly=null;
+				if(null!=m.getDepartmentId())weekly=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getWeeklyStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getWeeklyEnd(), AFTConstants.YYYYMMDDHHMMSS));
+					Map<String,String> week =valuesloading(weekly);
+					map.put("week", week);
+				marketingESBo month=null;
+				if(null!=m.getDepartmentId())month=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getMonthStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getMonthEnd(), AFTConstants.YYYYMMDDHHMMSS));
+					Map<String,String> months =valuesloading(month);
+					map.put("months", months);
+				marketingESBo year=null;
+				if(null!=m.getDepartmentId())year=userMapper.marketingDepStatistics(m.getDepartmentId(),DateFormatUtils.format(rd.getYearStart(), AFTConstants.YYYYMMDDHHMMSS),DateFormatUtils.format(rd.getYearEnd(), AFTConstants.YYYYMMDDHHMMSS));
+					Map<String,String> annual =valuesloading(year);
+					map.put("annual", annual);
+				m.setValues(map);
+			}
+				
+		return list;
+	}
+
+	public CountMarketingStatisticsBo countMarketingStatistics(String depId) {
+		CountMarketingStatisticsBo count=salesReportMapper.privateCustomersCount(depId);
+		if (null==count) {
+			count=new CountMarketingStatisticsBo();
+		}
+		ReportDate rd = new ReportDate(new Date());
+		CountMarketingStatisticsBo d=userMapper.countmarketingDepStatistics(depId,rd.getStringDailyStart(),rd.getStringDailyEnd());
+		if (null!=d.getYearFollowNo()) {
+			count.setDailyFollowNo(d.getYearFollowNo());
+			count.setDailyTelNo(d.getYearTelNo());
+			count.setDailyVisitNo(d.getYearVisitNo());	
+		}
+		CountMarketingStatisticsBo w=userMapper.countmarketingDepStatistics(depId,rd.getStringWeeklyStart(),rd.getStringWeeklyEnd());
+		if (null!=w) {
+		count.setWeeklyFollowNo(w.getYearFollowNo());
+		count.setWeeklyTelNo(w.getYearTelNo());
+		count.setWeeklyVisitNo(w.getYearVisitNo());
+		}
+		CountMarketingStatisticsBo m=userMapper.countmarketingDepStatistics(depId,rd.getStringMonthStart(),rd.getStringMonthEnd());
+		if (null!=d) {
+		count.setMonthFollowNo(m.getYearFollowNo());
+		count.setMonthTelNo(m.getYearTelNo());
+		count.setMonthVisitNo(m.getYearVisitNo());
+		}
+		CountMarketingStatisticsBo y=userMapper.countmarketingDepStatistics(depId,rd.getStringYearStart(),rd.getStringYearEnd());
+		if (null!=d) {
+		count.setYearFollowNo(y.getYearFollowNo());
+		count.setYearTelNo(y.getYearTelNo());
+		count.setYearVisitNo(y.getYearVisitNo());
+		}
+		return count;
+	}
+
+	public CountMarketingStatisticsBo countMarketingDepStatistics(String depId) {
+		
+		CountDepMarketingStatisticsBo count=salesReportMapper.privateCustomersDepCount(depId);
+		if (null==count) {
+			return new CountDepMarketingStatisticsBo();
+		}
+		ReportDate rd = new ReportDate(new Date());
+		CountMarketingStatisticsBo d=userMapper.countmarketingDepStatistics(depId,rd.getStringDailyStart(),rd.getStringDailyEnd());
+		if (null!=d) {
+		count.setDailyFollowNo(d.getYearFollowNo());
+		count.setDailyTelNo(d.getYearTelNo());
+		count.setDailyVisitNo(d.getYearVisitNo());
+		count.setDailyAVG(calculateAVG(count.getDailyFollowNo(),count.getDepartmentNumber()));
+		}
+		CountMarketingStatisticsBo w=userMapper.countmarketingDepStatistics(depId,rd.getStringWeeklyStart(),rd.getStringWeeklyEnd());
+		if (null!=w) {
+		count.setWeeklyFollowNo(w.getYearFollowNo());
+		count.setWeeklyTelNo(w.getYearTelNo());
+		count.setWeeklyVisitNo(w.getYearVisitNo());
+		count.setWeeklyAVG(calculateAVG(count.getWeeklyFollowNo(),count.getDepartmentNumber()));
+		}
+		CountMarketingStatisticsBo m=userMapper.countmarketingDepStatistics(depId,rd.getStringMonthStart(),rd.getStringMonthEnd());
+		if (null!=m) {
+		count.setMonthFollowNo(m.getYearFollowNo());
+		count.setMonthTelNo(m.getYearTelNo());
+		count.setMonthVisitNo(m.getYearVisitNo());
+		count.setMonthAVG(calculateAVG(count.getMonthFollowNo(),count.getDepartmentNumber()));
+		}
+		CountMarketingStatisticsBo y=userMapper.countmarketingDepStatistics(depId,rd.getStringYearStart(),rd.getStringYearEnd());
+		if (null!=y) {
+		count.setYearFollowNo(y.getYearFollowNo());
+		count.setYearTelNo(y.getYearTelNo());
+		count.setYearVisitNo(y.getYearVisitNo());
+		count.setYearAVG(calculateAVG(count.getYearFollowNo(),count.getDepartmentNumber()));
+		}
+		return count;
+	}
+
+	public String calculateAVG(String a, String b) {
+		if (StringUtils.isNumeric(a)&&StringUtils.isNumeric(b)) {
+			if ((float)Integer.valueOf(a)==0||(float)Integer.valueOf(b)==0)return "0"; 
+			float f=(float)Integer.valueOf(a)/(float)Integer.valueOf(b);
+			return String.valueOf(f);	
+		}else {
+			return"0";
+		}
+	}
+
+	public List<SomeTimeMarketingBo> sometimeMarketingStatistics(String depId, Integer timeType, String startTime, String endTime) {
+		List<SomeTimeMarketingBo> list = null;
+		ReportDate rd = new ReportDate(new Date());
+		if (TimeType.WEEKLY.getCode()==timeType) {
+			list=salesReportMapper.sometimeMarketingStatistics(depId,rd.getStringWeeklyStart(),rd.getStringWeeklyEnd());
+		}
+		if (TimeType.MONTH.getCode()==timeType) {
+			list=salesReportMapper.sometimeMarketingStatistics(depId,rd.getStringMonthStart(),rd.getStringMonthEnd());
+		}
+		if (TimeType.QTR.getCode()==timeType) {
+			list=salesReportMapper.sometimeMarketingStatistics(depId,rd.getStringQuarterStart(),rd.getStringQuarterEnd());
+		}
+		if (TimeType.YEAR.getCode()==timeType) {
+			list=salesReportMapper.sometimeMarketingStatistics(depId,rd.getStringYearStart(),rd.getStringYearEnd());
+		}
+		if (TimeType.ZS.getCode()==timeType) {
+			list=salesReportMapper.sometimeMarketingStatistics(depId,startTime,endTime);
+		}
+		return list;
+	}
+
+	public List<SomeTimeMarketingBo> sometimeMarketingDepStatistics(String depId, Integer timeType, String startTime, String endTime) {
+		List<SomeTimeMarketingBo> list = null;
+		ReportDate rd = new ReportDate(new Date());
+		if (TimeType.WEEKLY.getCode()==timeType) {
+			list=salesReportMapper.sometimeMarketingDepStatistics(depId,rd.getStringWeeklyStart(),rd.getStringWeeklyEnd());
+		}
+		if (TimeType.MONTH.getCode()==timeType) {
+			list=salesReportMapper.sometimeMarketingDepStatistics(depId,rd.getStringMonthStart(),rd.getStringMonthEnd());
+		}
+		if (TimeType.QTR.getCode()==timeType) {
+			list=salesReportMapper.sometimeMarketingDepStatistics(depId,rd.getStringQuarterStart(),rd.getStringQuarterEnd());
+		}
+		if (TimeType.YEAR.getCode()==timeType) {
+			list=salesReportMapper.sometimeMarketingDepStatistics(depId,rd.getStringYearStart(),rd.getStringYearEnd());
+		}
+		if (TimeType.ZS.getCode()==timeType) {
+			list=salesReportMapper.sometimeMarketingDepStatistics(depId,startTime,endTime);
+		}
+		return list;
+	}
+
+	public SomeTimeMarketingBo countSometimeMarketingStatistics(String depId, Integer timeType, String startTime, String endTime) {
+		ReportDate rd = new ReportDate(new Date());
+		if (TimeType.WEEKLY.getCode()==timeType) {
+			return salesReportMapper.countsometimeMarketingStatistics(depId,rd.getStringWeeklyStart(),rd.getStringWeeklyEnd());
+		}
+		if (TimeType.MONTH.getCode()==timeType) {
+			return salesReportMapper.countsometimeMarketingStatistics(depId,rd.getStringMonthStart(),rd.getStringMonthEnd());
+		}
+		if (TimeType.QTR.getCode()==timeType) {
+			return salesReportMapper.countsometimeMarketingStatistics(depId,rd.getStringQuarterStart(),rd.getStringQuarterEnd());
+		}
+		if (TimeType.YEAR.getCode()==timeType) {
+			return salesReportMapper.countsometimeMarketingStatistics(depId,rd.getStringYearStart(),rd.getStringYearEnd());
+		}
+		if (TimeType.ZS.getCode()==timeType) {
+			return salesReportMapper.countsometimeMarketingStatistics(depId,startTime,endTime);
+		}
+		return null;
+	}
+
+	public SomeTimeMarketingBo countSometimeMarketingDepStatistics(String depId, Integer timeType, String startTime,
+			String endTime) {
+		
+		return null;
+	}
+	
+
 }