wenhongquan 3 years ago
parent
commit
f5a84b8001
1 changed files with 6 additions and 0 deletions
  1. 6 0
      ruoyi-system/src/main/resources/mapper/system/TblTaskMapper.xml

+ 6 - 0
ruoyi-system/src/main/resources/mapper/system/TblTaskMapper.xml

@@ -62,6 +62,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="taskDeptRange != null  and taskDeptRange != ''"> and task_dept_range = #{taskDeptRange}</if>
             <if test="taskFacilitieCode != null  and taskFacilitieCode != ''"> and task_facilitie_code = #{taskFacilitieCode}</if>
             <if test="taskArea != null  and taskArea != ''"> and task_area = #{taskArea}</if>
+            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+                and date_format(task_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+            </if>
+            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+                and date_format(task_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+            </if>
         </where>
     </select>