浏览代码

日报表累计数量规则修改

yanliming 1 年之前
父节点
当前提交
6395e7c1cd

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

@@ -19,6 +19,6 @@ public interface PersonLoginLogDAO {
 	List<PersonLoginLog> search(Map<String, Object> searchParams, List<Sort> sortList);
 	List<PersonLoginLog> search(Map<String, Object> searchParams, List<Sort> sortList);
 	List<Map> dailyReport(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);
 	Integer dailyReportList(@Param("searchParams") Map<String, Object> searchParams);
-	List<String> totalDailyReportList();
+	List<String> totalDailyReportList(@Param("searchParams") Map<String, Object> searchParams);
 
 
 }
 }

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

@@ -16,7 +16,7 @@ public interface PersonLoginLogService {
 	Page<PersonLoginLog> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
 	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);
 	Page<Map> dailyReportPage(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
 	Integer dailyReportList(Map<String, Object> searchParams);
 	Integer dailyReportList(Map<String, Object> searchParams);
-	List<String> totalDailyReportList();
+	List<String> totalDailyReportList(Map<String, Object> searchParams);
 
 
 
 
 }
 }

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

@@ -85,7 +85,7 @@ public class PersonLoginLogServiceImpl implements PersonLoginLogService {
 
 
 
 
 	@Override
 	@Override
-	public List<String> totalDailyReportList(){
-		return personLoginLogDAO.totalDailyReportList();
+	public List<String> totalDailyReportList(Map<String, Object> searchParams){
+		return personLoginLogDAO.totalDailyReportList(searchParams);
 	}
 	}
 }
 }

+ 15 - 3
common/src/main/resources/mapper/base/PersonLoginLog.xml

@@ -119,11 +119,23 @@ id_,person_id,remark_,create_by,create_time,update_by,update_time,del_flag		from
             ${sort.name} ${sort.order}
             ${sort.name} ${sort.order}
         </foreach>
         </foreach>
     </select>
     </select>
-    <select id="totalDailyReportList" resultType="java.lang.String" >
+    <select id="totalDailyReportList" parameterType="hashmap" resultType="java.lang.String" >
 		<![CDATA[
 		<![CDATA[
 			SELECT person_id FROM base_person_login_log
 			SELECT person_id FROM base_person_login_log
-			WHERE del_flag=FALSE
-			GROUP BY DATE_FORMAT(create_time,"%Y年%m月%d日"),person_id
  		]]>
  		]]>
+        <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>
+        GROUP BY DATE_FORMAT(create_time,"%Y年%m月%d日"),person_id
 	</select>
 	</select>
 </mapper>
 </mapper>

+ 7 - 2
web/src/main/java/com/jpsoft/employment/modules/base/controller/ReportController.java

@@ -52,14 +52,19 @@ public class ReportController {
 
 
         Map<String, Object> searchParams = new HashMap<>();
         Map<String, Object> searchParams = new HashMap<>();
 
 
+        Map<String, Object> searchParams1 = new HashMap<>();
+
         if (StringUtils.isNotEmpty(date)) {
         if (StringUtils.isNotEmpty(date)) {
             String startTime = date + " 00:00:00";
             String startTime = date + " 00:00:00";
             String endTime = date + " 23:59:59";
             String endTime = date + " 23:59:59";
             searchParams.put("startTime", startTime);
             searchParams.put("startTime", startTime);
             searchParams.put("endTime", endTime);
             searchParams.put("endTime", endTime);
+
+
+            searchParams1.put("endTime", endTime);
         }
         }
 
 
-        Map<String, Object> searchParams1 = new HashMap<>();
+
 
 
         List<Map> mapList = new ArrayList<>();
         List<Map> mapList = new ArrayList<>();
 
 
@@ -69,7 +74,7 @@ public class ReportController {
         Integer loginNum = personLoginLogService.dailyReportList(searchParams);
         Integer loginNum = personLoginLogService.dailyReportList(searchParams);
 
 
         //登录人数,累计人数
         //登录人数,累计人数
-        List<String> personIdList = personLoginLogService.totalDailyReportList();
+        List<String> personIdList = personLoginLogService.totalDailyReportList(searchParams1);
         Integer totalLoginNum = personIdList.size();
         Integer totalLoginNum = personIdList.size();
 
 
         //求职登记人数,新增人数
         //求职登记人数,新增人数