Bläddra i källkod

导出控制在1000条数据

tchao 2 år sedan
förälder
incheckning
94a21f38d6

+ 1 - 1
mybusiness/src/main/java/com/business/slfh/manager/firemanager/controller/TUEventFireController.java

@@ -90,7 +90,7 @@ public class TUEventFireController extends BaseController
     @ResponseBody
     public AjaxResult export(TUEventFire tUEventFire)
     {
-        List<TUEventFire> list = tUEventFireService.selectTUEventFireList(tUEventFire);
+        List<TUEventFire> list = tUEventFireService.selectTUEventFireListLimit1000(tUEventFire);
         ExcelUtil<TUEventFire> util = new ExcelUtil<TUEventFire>(TUEventFire.class);
         return util.exportExcel(list, "森林防火");
     }

+ 1 - 0
mybusiness/src/main/java/com/business/slfh/manager/firemanager/mapper/TUEventFireMapper.java

@@ -30,6 +30,7 @@ public interface TUEventFireMapper
      * @return 【请填写功能名称】集合
      */
     public List<TUEventFire> selectTUEventFireList(TUEventFire tUEventFire);
+    public List<TUEventFire> selectTUEventFireListLimit1000(TUEventFire tUEventFire);
 
     /**
      * 查询未归档【请填写功能名称】列表

+ 1 - 1
mybusiness/src/main/java/com/business/slfh/manager/firemanager/service/ITUEventFireService.java

@@ -28,7 +28,7 @@ public interface ITUEventFireService
      * @return 【请填写功能名称】集合
      */
     public List<TUEventFire> selectTUEventFireList(TUEventFire tUEventFire);
-
+    public List<TUEventFire> selectTUEventFireListLimit1000(TUEventFire tUEventFire);
     /**
      * 新增【请填写功能名称】
      * 

+ 16 - 0
mybusiness/src/main/java/com/business/slfh/manager/firemanager/service/impl/TUEventFireServiceImpl.java

@@ -72,6 +72,22 @@ public class TUEventFireServiceImpl extends BaseService implements ITUEventFireS
         }
         return tUEventFireMapper.selectTUEventFireList(tUEventFire);
     }
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param tUEventFire 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    @DataScope(deptAlias = "t")
+    public List<TUEventFire> selectTUEventFireListLimit1000(TUEventFire tUEventFire) {
+        SysUser sysUser = userInfoUtil.getLoginUserInfo();
+        if(sysUser.getDept().getForestdeptType().equals("11")){//如果是委办局并且是林业局 查所有火险
+            tUEventFire.setParams(null);
+        }
+        return tUEventFireMapper.selectTUEventFireListLimit1000(tUEventFire);
+    }
+
 
     /**
      * 新增【请填写功能名称】

+ 1 - 1
mybusiness/src/main/java/com/business/slfh/manager/othersmanager/controller/TUEventOthersController.java

@@ -173,7 +173,7 @@ public class TUEventOthersController extends BaseController
     @ResponseBody
     public AjaxResult export(TUEventOthers tUEventOthers)
     {
-        List<TUEventOthers> list = tUEventOthersService.selectTUEventOthersList(tUEventOthers);
+        List<TUEventOthers> list = tUEventOthersService.selectTUEventOthersListLimit1000(tUEventOthers);
         ExcelUtil<TUEventOthers> util = new ExcelUtil<TUEventOthers>(TUEventOthers.class);
         return util.exportExcel(list, "others");
     }

+ 1 - 0
mybusiness/src/main/java/com/business/slfh/manager/othersmanager/mapper/TUEventOthersMapper.java

@@ -32,6 +32,7 @@ public interface TUEventOthersMapper
      * @return 【请填写功能名称】集合
      */
     public List<TUEventOthers> selectTUEventOthersList(TUEventOthers tUEventOthers);
+    public List<TUEventOthers> selectTUEventOthersListLimit1000(TUEventOthers tUEventOthers);
 
     /**
      * 新增【请填写功能名称】

+ 1 - 0
mybusiness/src/main/java/com/business/slfh/manager/othersmanager/service/ITUEventOthersService.java

@@ -28,6 +28,7 @@ public interface ITUEventOthersService
      * @return 【请填写功能名称】集合
      */
     public List<TUEventOthers> selectTUEventOthersList(TUEventOthers tUEventOthers);
+    public List<TUEventOthers> selectTUEventOthersListLimit1000(TUEventOthers tUEventOthers);
 
     /**
      * 新增【请填写功能名称】

+ 17 - 0
mybusiness/src/main/java/com/business/slfh/manager/othersmanager/service/impl/TUEventOthersServiceImpl.java

@@ -72,6 +72,23 @@ public class TUEventOthersServiceImpl extends BaseService implements ITUEventOth
         }
         return tUEventOthersMapper.selectTUEventOthersList(tUEventOthers);
     }
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param tUEventOthers 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    @DataScope(deptAlias = "t")
+    public List<TUEventOthers> selectTUEventOthersListLimit1000(TUEventOthers tUEventOthers)
+    {
+        SysUser sysUser = userInfoUtil.getLoginUserInfo();
+        if(sysUser.getDept().getForestdeptType().equals("11")){//如果是委办局并且是林业局 查所有火险
+            tUEventOthers.setParams(null);
+            tUEventOthers.setReserveplan_types(getReserveplanType(sysUser));
+        }
+        return tUEventOthersMapper.selectTUEventOthersListLimit1000(tUEventOthers);
+    }
 
     /**
      * 新增【请填写功能名称】

+ 33 - 1
mybusiness/src/main/resources/mapper/grid/manager/TUEventFireMapper.xml

@@ -100,7 +100,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createUserId != null  and createUserId != ''"> and create_user_id = #{createUserId}</if>
             <if test="params != null "> ${params.dataScope}</if>
         </where>
-        order by report_time desc  LIMIT 1000
+        order by report_time desc
+    </select>
+
+
+    <select id="selectTUEventFireListLimit1000" parameterType="TUEventFire" resultMap="TUEventFireResult">
+        <include refid="selectTUEventFireVo"/>
+        <where>
+            1=1
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="reportType != null  and reportType != ''"> and report_type = #{reportType}</if>
+            <if test="reportContent != null  and reportContent != ''"> and report_content like concat('%', #{reportContent}, '%')</if>
+            <if test="params.beginReportTime != null and params.beginReportTime != ''"><!-- 开始时间检索 -->
+                AND date_format(report_time,'%y%m%d') &gt;= date_format(#{params.beginReportTime},'%y%m%d')
+            </if>
+            <if test="params.endReportTime != null and params.endReportTime != ''"><!-- 结束时间检索 -->
+                AND date_format(report_time,'%y%m%d') &lt;= date_format(#{params.endReportTime},'%y%m%d')
+            </if>
+            <!--<if test="reportTime != null "> and report_time = #{reportTime}</if>-->
+            <if test="reportor != null  and reportor != ''"> and reportor like concat('%', #{reportor}, '%')</if>
+            <if test="longitude != null  and longitude != ''"> and longitude = #{longitude}</if>
+            <if test="latitude != null  and latitude != ''"> and latitude = #{latitude}</if>
+            <if test="eventStatus != null  and eventStatus != ''"> and event_status = #{eventStatus}</if>
+            <if test="eventLevel != null  and eventLevel != ''"> and event_level = #{eventLevel}</if>
+            <if test="isUpgraded != null  and isUpgraded != ''"> and is_upgraded = #{isUpgraded}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="cameraId != null "> and camera_id = #{cameraId}</if>
+            <if test="needhelp != null "> and needhelp = #{needhelp}</if>
+            <if test="deptIds != null "> and dept_id in (${deptIds})</if>
+            <if test="createUserId != null  and createUserId != ''"> and create_user_id = #{createUserId}</if>
+            <if test="params != null "> ${params.dataScope}</if>
+        </where>
+        order by report_time desc LIMIT 1000
     </select>
 
     <select id="selectTUEventFireById" parameterType="String" resultMap="TUEventFireResult">

+ 42 - 0
mybusiness/src/main/resources/mapper/grid/manager/TUEventOthersMapper.xml

@@ -102,6 +102,48 @@
             </foreach>
         </if>
         ${params.dataScope}
+        order by report_time desc
+    </select>
+
+
+    <select id="selectTUEventOthersListLimit1000" parameterType="TUEventOthers" resultMap="TUEventOthersResult">
+        <include refid="selectTUEventOthersVo"/>
+        <where>
+            1=1
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="reportType != null  and reportType != ''"> and report_type = #{reportType}</if>
+            <if test="reportArea != null  and reportArea != ''"> and report_area = #{reportArea}</if>
+            <if test="reportContent != null  and reportContent != ''"> and report_content like concat('%', #{reportContent}, '%')</if>
+            <if test="params.beginReportTime != null and params.beginReportTime != ''"><!-- 开始时间检索 -->
+                AND date_format(report_time,'%y%m%d') &gt;= date_format(#{params.beginReportTime},'%y%m%d')
+            </if>
+            <if test="params.endReportTime != null and params.endReportTime != ''"><!-- 结束时间检索 -->
+                AND date_format(report_time,'%y%m%d') &lt;= date_format(#{params.endReportTime},'%y%m%d')
+            </if>
+            <!--<if test="reportTime != null "> and report_time = #{reportTime}</if>-->
+            <if test="reportor != null  and reportor != ''"> and reportor like concat('%', #{reportor}, '%')</if>
+            <if test="longitude != null  and longitude != ''"> and longitude = #{longitude}</if>
+            <if test="latitude != null  and latitude != ''"> and latitude = #{latitude}</if>
+            <if test="eventStatus != null  and eventStatus != ''"> and event_status = #{eventStatus}</if>
+            <if test="eventLevel != null  and eventLevel != ''"> and event_level = #{eventLevel}</if>
+            <if test="isUpgraded != null  and isUpgraded != ''"> and is_upgraded = #{isUpgraded}</if>
+            <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="cameraId != null "> and camera_id = #{cameraId}</if>
+            <if test="needhelp != null "> and needhelp = #{needhelp}</if>
+            <if test="reserveplanType != null  and reserveplanType != ''"> and reserveplan_type = #{reserveplanType}</if>
+            <if test="deptIds != null "> and dept_id in (${deptIds})</if>
+            <if test="createUserId != null  and createUserId != ''"> and create_user_id = #{createUserId}</if>
+        </where>
+        <!-- 数据范围过滤 -->
+        <if test="reserveplan_types != null">
+            AND t.reserveplan_type IN
+            <foreach item="item" collection="reserveplan_types" separator="," open="(" close=")" index="">
+                #{item}
+            </foreach>
+        </if>
+        ${params.dataScope}
         order by report_time desc LIMIT 1000
     </select>