yanliming 2 лет назад
Родитель
Сommit
00352e2654
24 измененных файлов с 385 добавлено и 62 удалено
  1. 3 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/EnterpriseInfoDAO.java
  2. 2 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/JobEnterpriseRelationDAO.java
  3. 3 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/JobInformationInfoDAO.java
  4. 3 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/PersonInfoDAO.java
  5. 6 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/PersonLoginLogDAO.java
  6. 3 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/RecruitInformationInfoDAO.java
  7. 3 0
      common/src/main/java/com/jpsoft/employment/modules/base/dao/RecruitPersonRelationDAO.java
  8. 1 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/EnterpriseInfoService.java
  9. 1 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/PersonInfoService.java
  10. 5 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/PersonLoginLogService.java
  11. 1 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/RecruitInformationInfoService.java
  12. 1 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/RecruitPersonRelationService.java
  13. 5 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/impl/EnterpriseInfoServiceImpl.java
  14. 5 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/impl/PersonInfoServiceImpl.java
  15. 21 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/impl/PersonLoginLogServiceImpl.java
  16. 5 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/impl/RecruitInformationInfoServiceImpl.java
  17. 5 0
      common/src/main/java/com/jpsoft/employment/modules/base/service/impl/RecruitPersonRelationServiceImpl.java
  18. 16 0
      common/src/main/resources/mapper/base/EnterpriseInfo.xml
  19. 16 0
      common/src/main/resources/mapper/base/JobInformationInfo.xml
  20. 14 0
      common/src/main/resources/mapper/base/PersonInfo.xml
  21. 99 61
      common/src/main/resources/mapper/base/PersonLoginLog.xml
  22. 24 0
      common/src/main/resources/mapper/base/RecruitInformationInfo.xml
  23. 17 0
      common/src/main/resources/mapper/base/RecruitPersonRelation.xml
  24. 126 1
      web/src/main/java/com/jpsoft/employment/modules/base/controller/ReportController.java

+ 3 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/EnterpriseInfoDAO.java

@@ -1,6 +1,8 @@
 package com.jpsoft.employment.modules.base.dao;
 
 import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import com.jpsoft.employment.modules.base.entity.EnterpriseInfo;
 import java.util.Map;
@@ -16,4 +18,5 @@ public interface EnterpriseInfoDAO {
 	List<EnterpriseInfo> list();
 	List<EnterpriseInfo> search(Map<String, Object> searchParams, List<Sort> sortList);
 	EnterpriseInfo findByName(String name);
+	Integer dailyReportList(@Param("searchParams")Map<String, Object> searchParams);
 }

+ 2 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/JobEnterpriseRelationDAO.java

@@ -1,6 +1,8 @@
 package com.jpsoft.employment.modules.base.dao;
 
 import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import com.jpsoft.employment.modules.base.entity.JobEnterpriseRelation;
 import java.util.Map;

+ 3 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/JobInformationInfoDAO.java

@@ -1,6 +1,8 @@
 package com.jpsoft.employment.modules.base.dao;
 
 import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import com.jpsoft.employment.modules.base.entity.JobInformationInfo;
 import java.util.Map;
@@ -18,4 +20,5 @@ public interface JobInformationInfoDAO {
 	List<JobInformationInfo> searchMobile(Map<String, Object> searchParams, List<Sort> sortList);
 
 	JobInformationInfo findByPersonId(String personId);
+
 }

+ 3 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/PersonInfoDAO.java

@@ -1,6 +1,8 @@
 package com.jpsoft.employment.modules.base.dao;
 
 import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import com.jpsoft.employment.modules.base.entity.PersonInfo;
 import java.util.Map;
@@ -19,4 +21,5 @@ public interface PersonInfoDAO {
 	PersonInfo findByOpenId(String openId);
 	int clearOpenId(String id);
 	PersonInfo findByPhone(String phone);
+	Integer dailyReportList(@Param("searchParams") Map<String, Object> searchParams);
 }

+ 6 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/PersonLoginLogDAO.java

@@ -1,6 +1,8 @@
 package com.jpsoft.employment.modules.base.dao;
 
 import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import com.jpsoft.employment.modules.base.entity.PersonLoginLog;
 import java.util.Map;
@@ -15,4 +17,8 @@ public interface PersonLoginLogDAO {
 	int delete(String id);
 	List<PersonLoginLog> list();
 	List<PersonLoginLog> search(Map<String, Object> searchParams, List<Sort> sortList);
+	List<Map> dailyReport(Map<String, Object> searchParams, List<Sort> sortList);
+	Integer dailyReportList(@Param("searchParams") Map<String, Object> searchParams);
+	List<String> totalDailyReportList();
+
 }

+ 3 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/RecruitInformationInfoDAO.java

@@ -1,6 +1,8 @@
 package com.jpsoft.employment.modules.base.dao;
 
 import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import com.jpsoft.employment.modules.base.entity.RecruitInformationInfo;
 import java.util.Map;
@@ -16,4 +18,5 @@ public interface RecruitInformationInfoDAO {
 	List<RecruitInformationInfo> list();
 	List<RecruitInformationInfo> search(Map<String, Object> searchParams, List<Sort> sortList);
 	List<RecruitInformationInfo> searchMobile(Map<String, Object> searchParams, List<Sort> sortList);
+	Integer dailyReportList(@Param("searchParams")Map<String, Object> searchParams);
 }

+ 3 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/RecruitPersonRelationDAO.java

@@ -1,6 +1,8 @@
 package com.jpsoft.employment.modules.base.dao;
 
 import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import com.jpsoft.employment.modules.base.entity.RecruitPersonRelation;
 import java.util.Map;
@@ -24,4 +26,5 @@ public interface RecruitPersonRelationDAO {
 	int findNotReadNumByEnterpriseId(String enterpriseId);
 	int findNotReadNumByPersonId(String personId);
 	RecruitPersonRelation findByPersonIdAndRecruitId(String personId, String recruitId);
+	Integer dailyReportList(@Param("searchParams") Map<String, Object> searchParams);
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/EnterpriseInfoService.java

@@ -15,4 +15,5 @@ public interface EnterpriseInfoService {
 	List<EnterpriseInfo> list();
 	Page<EnterpriseInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
 	EnterpriseInfo findByName(String name);
+	Integer dailyReportList(Map<String, Object> searchParams);
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/PersonInfoService.java

@@ -19,4 +19,5 @@ public interface PersonInfoService {
 	PersonInfo findByOpenId(String openId);
 	int clearOpenId(String id);
 	PersonInfo findByPhone(String phone);
+	Integer dailyReportList(Map<String, Object> searchParams);
 }

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/PersonLoginLogService.java

@@ -14,4 +14,9 @@ public interface PersonLoginLogService {
 	int delete(String id);
 	List<PersonLoginLog> list();
 	Page<PersonLoginLog> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+	Page<Map> dailyReportPage(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+	Integer dailyReportList(Map<String, Object> searchParams);
+	List<String> totalDailyReportList();
+
+
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/RecruitInformationInfoService.java

@@ -15,4 +15,5 @@ public interface RecruitInformationInfoService {
 	List<RecruitInformationInfo> list();
 	Page<RecruitInformationInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
 	Page<RecruitInformationInfo> pageSearchMobile(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+	Integer dailyReportList(Map<String, Object> searchParams);
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/RecruitPersonRelationService.java

@@ -24,4 +24,5 @@ public interface RecruitPersonRelationService {
 	int findNotReadNumByPersonId(String personId);
 
 	RecruitPersonRelation findByPersonIdAndRecruitId(String personId, String recruitId);
+	Integer dailyReportList(Map<String, Object> searchParams);
 }

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/EnterpriseInfoServiceImpl.java

@@ -73,4 +73,9 @@ public class EnterpriseInfoServiceImpl implements EnterpriseInfoService {
         
         return page;
 	}
+
+	@Override
+	public Integer dailyReportList(Map<String, Object> searchParams){
+		return enterpriseInfoDAO.dailyReportList(searchParams);
+	}
 }

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/PersonInfoServiceImpl.java

@@ -82,4 +82,9 @@ public class PersonInfoServiceImpl implements PersonInfoService {
 	public PersonInfo findByPhone(String phone){
 		return personInfoDAO.findByPhone(phone);
 	}
+
+	@Override
+	public Integer dailyReportList(Map<String, Object> searchParams){
+		return personInfoDAO.dailyReportList(searchParams);
+	}
 }

+ 21 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/PersonLoginLogServiceImpl.java

@@ -67,4 +67,25 @@ public class PersonLoginLogServiceImpl implements PersonLoginLogService {
         
         return page;
 	}
+
+	@Override
+	public Page<Map> dailyReportPage(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+		Page<Map> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+			personLoginLogDAO.dailyReport(searchParams,sortList);
+		});
+
+		return page;
+	}
+
+
+	@Override
+	public Integer dailyReportList(Map<String, Object> searchParams){
+		return personLoginLogDAO.dailyReportList(searchParams);
+	}
+
+
+	@Override
+	public List<String> totalDailyReportList(){
+		return personLoginLogDAO.totalDailyReportList();
+	}
 }

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/RecruitInformationInfoServiceImpl.java

@@ -76,4 +76,9 @@ public class RecruitInformationInfoServiceImpl implements RecruitInformationInfo
 
 		return page;
 	}
+
+	@Override
+	public Integer dailyReportList(Map<String, Object> searchParams){
+		return recruitInformationInfoDAO.dailyReportList(searchParams);
+	}
 }

+ 5 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/RecruitPersonRelationServiceImpl.java

@@ -107,4 +107,9 @@ public class RecruitPersonRelationServiceImpl implements RecruitPersonRelationSe
 	public RecruitPersonRelation findByPersonIdAndRecruitId(String personId, String recruitId){
 		return recruitPersonRelationDAO.findByPersonIdAndRecruitId(personId,recruitId);
 	}
+
+	@Override
+	public Integer dailyReportList(Map<String, Object> searchParams){
+		return recruitPersonRelationDAO.dailyReportList(searchParams);
+	}
 }

+ 16 - 0
common/src/main/resources/mapper/base/EnterpriseInfo.xml

@@ -106,4 +106,20 @@
 	        ${sort.name} ${sort.order}
 	 	</foreach>
 	</select>
+	<select id="dailyReportList" parameterType="hashmap" resultType="java.lang.Integer">
+		select count(*) from base_enterprise_info
+		<where>
+			del_flag = false and status_='1'
+			<if test="searchParams.startTime!= null">
+				<![CDATA[
+					and create_time >= #{searchParams.startTime}
+				]]>
+			</if>
+			<if test="searchParams.endTime!= null">
+				<![CDATA[
+					and create_time <= #{searchParams.endTime}
+				]]>
+			</if>
+		</where>
+	</select>
 </mapper>

+ 16 - 0
common/src/main/resources/mapper/base/JobInformationInfo.xml

@@ -223,4 +223,20 @@
 			and person_id = #{personId}
 		limit 1
 	</select>
+	<select id="dailyReportList" parameterType="hashmap" resultType="java.lang.Integer">
+		SELECT count(*) FROM base_job_information_info
+		<where>
+			del_flag = false
+			<if test="searchParams.startTime!= null">
+				<![CDATA[
+					and create_time >= #{searchParams.startTime}
+				]]>
+			</if>
+			<if test="searchParams.endTime!= null">
+				<![CDATA[
+					and create_time <= #{searchParams.endTime}
+				]]>
+			</if>
+		</where>
+	</select>
 </mapper>

+ 14 - 0
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -158,4 +158,18 @@
 	<select id="findByPhone" resultMap="PersonInfoMap">
 		select * from base_person_info where del_flag = 0 and phone_ = #{openId} limit 1
 	</select>
+	<select id="dailyReportList" parameterType="hashmap" resultType="java.lang.Integer">
+		select count(*) from base_person_info
+		where del_flag = 0 and status_ = '1'
+		<if test="searchParams.startTime!= null">
+			<![CDATA[
+				and create_time >= #{searchParams.startTime}
+			]]>
+		</if>
+		<if test="searchParams.endTime!= null">
+			<![CDATA[
+				and create_time <= #{searchParams.endTime}
+			]]>
+		</if>
+	</select>
 </mapper>

+ 99 - 61
common/src/main/resources/mapper/base/PersonLoginLog.xml

@@ -1,25 +1,25 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!-- namespace必须指向DAO接口 -->
 <mapper namespace="com.jpsoft.employment.modules.base.dao.PersonLoginLogDAO">
-	<resultMap id="PersonLoginLogMap" type="PersonLoginLog">
-		<id property="id" column="id_" />
-			<result property="personId" column="person_id" />
-			<result property="remark" column="remark_" />
-			<result property="createBy" column="create_by" />
-			<result property="createTime" column="create_time" />
-			<result property="updateBy" column="update_by" />
-			<result property="updateTime" column="update_time" />
-			<result property="delFlag" column="del_flag" />
-			</resultMap>
-	<insert id="insert" parameterType="PersonLoginLog">
-	<!--
-	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
-		select sys_guid() from dual
-	</selectKey>
-	-->
-	<![CDATA[
+    <resultMap id="PersonLoginLogMap" type="PersonLoginLog">
+        <id property="id" column="id_"/>
+        <result property="personId" column="person_id"/>
+        <result property="remark" column="remark_"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+    </resultMap>
+    <insert id="insert" parameterType="PersonLoginLog">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
 		insert into base_person_login_log
 	    (id_,person_id,remark_,create_by,create_time,update_by,update_time,del_flag)
 		values
@@ -34,58 +34,96 @@
 ,#{delFlag,jdbcType= NUMERIC }
 		)
 	]]>
-	</insert>
-	<delete id="delete" parameterType="string">
+    </insert>
+    <delete id="delete" parameterType="string">
 		delete from base_person_login_log where id_=#{id,jdbcType=VARCHAR}
 	</delete>
-	<update id="update" parameterType="PersonLoginLog">
-		update base_person_login_log
-		<set>
-				<if test="personId!=null">
-		person_id=#{personId,jdbcType=VARCHAR},
-		</if>
-				<if test="remark!=null">
-		remark_=#{remark,jdbcType=VARCHAR},
-		</if>
-				<if test="createBy!=null">
-		create_by=#{createBy,jdbcType=VARCHAR},
-		</if>
-				<if test="createTime!=null">
-		create_time=#{createTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="updateBy!=null">
-		update_by=#{updateBy,jdbcType=VARCHAR},
-		</if>
-				<if test="updateTime!=null">
-		update_time=#{updateTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="delFlag!=null">
-		del_flag=#{delFlag,jdbcType= NUMERIC },
-		</if>
-		</set>
-	where id_=#{id}
-	</update>
-	<select id="get" parameterType="string" resultMap="PersonLoginLogMap">
+    <update id="update" parameterType="PersonLoginLog">
+        update base_person_login_log
+        <set>
+            <if test="personId!=null">
+                person_id=#{personId,jdbcType=VARCHAR},
+            </if>
+            <if test="remark!=null">
+                remark_=#{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="PersonLoginLogMap">
 		select 
 id_,person_id,remark_,create_by,create_time,update_by,update_time,del_flag		from base_person_login_log where id_=#{0}
 	</select>
-	<select id="exist" parameterType="string" resultType="int">
+    <select id="exist" parameterType="string" resultType="int">
 		select count(*) from base_person_login_log where id_=#{0}
 	</select>
-	<select id="list" resultMap="PersonLoginLogMap">
+    <select id="list" resultMap="PersonLoginLogMap">
 		select * from base_person_login_log
 	</select>
-	<select id="search" parameterType="hashmap" resultMap="PersonLoginLogMap">
-		<![CDATA[
+    <select id="dailyReportList" parameterType="hashmap" resultType="java.lang.Integer">
+        <![CDATA[
+			select count(DISTINCT(person_id)) from base_person_login_log
+		]]>
+        <where>
+            del_flag=FALSE
+            <if test="searchParams.startTime!= null">
+                <![CDATA[
+					and create_time >= #{searchParams.startTime}
+				]]>
+            </if>
+            <if test="searchParams.endTime!= null">
+                <![CDATA[
+					and create_time <= #{searchParams.endTime}
+				]]>
+            </if>
+        </where>
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="PersonLoginLogMap">
+        <![CDATA[
 			select * from base_person_login_log
 		]]>
-		<where>
-			<if test="searchParams.id != null">
-				and ID_ like #{searchParams.id}
-			</if>
-		</where>
-		<foreach item="sort" collection="sortList"  open="order by" separator=",">
-	        ${sort.name} ${sort.order}
-	 	</foreach>
+        <where>
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+    <select id="dailyReport" parameterType="hashmap" resultType="hashmap">
+        <![CDATA[
+			select * from base_person_login_log
+		]]>
+        <where>
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+    <select id="totalDailyReportList" resultType="java.lang.String" >
+		<![CDATA[
+			SELECT person_id FROM base_person_login_log
+			WHERE del_flag=FALSE
+			GROUP BY DATE_FORMAT(create_time,"%Y年%m月%d日"),person_id
+ 		]]>
 	</select>
 </mapper>

+ 24 - 0
common/src/main/resources/mapper/base/RecruitInformationInfo.xml

@@ -216,4 +216,28 @@
 			${sort.name} ${sort.order}
 		</foreach>
 	</select>
+	<select id="dailyReportList" parameterType="hashmap" resultType="java.lang.Integer">
+		select count(*) from base_recruit_information_info
+		<where>
+			<if test="searchParams.delFlag!= null">
+				and del_flag = #{searchParams.delFlag}
+			</if>
+			<if test="searchParams.isOnline!= null">
+				and is_online = #{searchParams.isOnline}
+			</if>
+			<if test="searchParams.status!= null">
+				and status_ = #{searchParams.status}
+			</if>
+			<if test="searchParams.startTime!= null">
+				<![CDATA[
+					and create_time >= #{searchParams.startTime}
+				]]>
+			</if>
+			<if test="searchParams.endTime!= null">
+				<![CDATA[
+					and create_time <= #{searchParams.endTime}
+				]]>
+			</if>
+		</where>
+	</select>
 </mapper>

+ 17 - 0
common/src/main/resources/mapper/base/RecruitPersonRelation.xml

@@ -203,4 +203,21 @@
 			limit 1
 		]]>
 	</select>
+
+	<select id="dailyReportList" parameterType="hashmap" resultType="java.lang.Integer">
+		SELECT count(*) FROM base_recruit_person_relation
+		<where>
+			del_flag = false
+			<if test="searchParams.startTime!= null">
+				<![CDATA[
+					and create_time >= #{searchParams.startTime}
+				]]>
+			</if>
+			<if test="searchParams.endTime!= null">
+				<![CDATA[
+					and create_time <= #{searchParams.endTime}
+				]]>
+			</if>
+		</where>
+	</select>
 </mapper>

+ 126 - 1
web/src/main/java/com/jpsoft/employment/modules/base/controller/ReportController.java

@@ -1,11 +1,136 @@
 package com.jpsoft.employment.modules.base.controller;
 
 
+import com.github.pagehelper.Page;
+import com.jpsoft.employment.modules.base.entity.JobInformationInfo;
+import com.jpsoft.employment.modules.base.entity.RecruitInformationInfo;
+import com.jpsoft.employment.modules.base.entity.RecruitPersonRelation;
+import com.jpsoft.employment.modules.base.service.*;
+import com.jpsoft.employment.modules.common.dto.MessageResult;
+import com.jpsoft.employment.modules.common.dto.Sort;
+import com.jpsoft.employment.modules.common.utils.PojoUtils;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 @RestController
-@RequestMapping("/base/report")
+@RequestMapping("/statistical/report")
 public class ReportController {
 
+    @Autowired
+    private PersonLoginLogService personLoginLogService;
+
+    @Autowired
+    private RecruitPersonRelationService recruitPersonRelationService;
+
+    @Autowired
+    private EnterpriseInfoService enterpriseInfoService;
+
+    @Autowired
+    private PersonInfoService personInfoService;
+
+    @Autowired
+    private RecruitInformationInfoService recruitInformationInfoService;
+
+
+    @ApiOperation(value = "日报表")
+    @RequestMapping(value = "dailyReport", method = RequestMethod.POST)
+    public MessageResult<List<Map>> dailyReport(String date) {
+
+        MessageResult<List<Map>> msgResult = new MessageResult<>();
+
+        Map<String, Object> searchParams = new HashMap<>();
+
+        if (StringUtils.isNotEmpty(date)) {
+            String startTime = date + " 00:00:00";
+            String endTime = date + " 23:59:59";
+            searchParams.put("startTime", startTime);
+            searchParams.put("endTime", endTime);
+        }
+
+        Map<String, Object> searchParams1 = new HashMap<>();
+
+        List<Map> mapList = new ArrayList<>();
+
+        Map map = new HashMap();
+
+        //登录人数,新增人数
+        Integer loginNum = personLoginLogService.dailyReportList(searchParams);
+
+        //登录人数,累计人数
+        List<String> personIdList = personLoginLogService.totalDailyReportList();
+        Integer totalLoginNum = personIdList.size();
+
+        //求职登记人数,新增人数
+        Integer personNum = personInfoService.dailyReportList(searchParams);
+
+        //求职登记人数,累计人数
+        Integer totalPersonNum = personInfoService.dailyReportList(searchParams1);
+
+        //认证企业数,新增数
+        Integer enterpriseNum = enterpriseInfoService.dailyReportList(searchParams);
+
+        //认证企业数,累计数
+        Integer totalEnterpriseNum = enterpriseInfoService.dailyReportList(searchParams1);
+
+        //时实岗位数量
+        Integer totalRecruitStatusNum = recruitInformationInfoService.dailyReportList(searchParams1);
+
+        //新增岗位数量
+        searchParams.put("status","1");
+        searchParams.put("is_online",true);
+        searchParams.put("delFlag",true);
+        Integer recruitNum = recruitInformationInfoService.dailyReportList(searchParams);
+
+        //时实岗位数量
+        searchParams1.put("status","1");
+        searchParams1.put("is_online",true);
+        searchParams1.put("delFlag",true);
+        Integer totalRecruitNum = recruitInformationInfoService.dailyReportList(searchParams1);
+
+        //今日报名人数
+        searchParams = new HashMap<>();
+
+        if (StringUtils.isNotEmpty(date)) {
+            String startTime = date + " 00:00:00";
+            String endTime = date + " 23:59:59";
+            searchParams.put("startTime", startTime);
+            searchParams.put("endTime", endTime);
+        }
+        Integer jobInformationNum = recruitPersonRelationService.dailyReportList(searchParams);
+
+        map.put("loginNum", loginNum);
+        map.put("totalLoginNum", totalLoginNum);
+
+        map.put("personNum", personNum);
+        map.put("totalPersonNum", totalPersonNum);
+
+        map.put("enterpriseNum", enterpriseNum);
+        map.put("totalEnterpriseNum", totalEnterpriseNum);
+
+        map.put("recruitNum", recruitNum);
+        map.put("totalRecruitNum", totalRecruitNum);
+        map.put("totalRecruitStatusNum", totalRecruitStatusNum);
+
+        map.put("jobInformationNum", jobInformationNum);
+
+        mapList.add(map);
+
+        msgResult.setResult(true);
+        msgResult.setData(mapList);
+
+        return msgResult;
+    }
+
 }