浏览代码

报警倒叙,在线设备查询,电子围栏权限取消

zhengjie 1 年之前
父节点
当前提交
56f81b80bf

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TFallSolveController.java

@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.TRailSolve;
 import com.ruoyi.system.domain.TSosSolve;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -56,6 +57,7 @@ public class TFallSolveController extends BaseController {
             salve.setAlarmMsg("跌倒告警求助:" + salve.getName() + "于" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, salve.getCreatetime()) + "发起跌倒告警求助");
         }
         List<TFallSolve> collect = list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<TFallSolve>(Comparator.comparing(TFallSolve::getAid))), ArrayList::new));
+        collect = collect.stream().sorted(Comparator.comparing(TFallSolve::getCreatetime).reversed()).collect(Collectors.toList());
         return getDataTable(collect);
     }
 

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/THealthSolveController.java

@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.TFallSolve;
 import com.ruoyi.system.domain.TRailSolve;
 import com.ruoyi.system.domain.TSosSolve;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -59,6 +60,7 @@ public class THealthSolveController extends BaseController
             salve.setAlarmMsg("健康告警求助:" + salve.getName() + "于" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,salve.getCreatetime()) + "发起健康告警求助");
         }
         List<THealthSolve> collect=list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()->new TreeSet<THealthSolve>(Comparator.comparing(THealthSolve::getAid))), ArrayList::new));
+        collect = collect.stream().sorted(Comparator.comparing(THealthSolve::getCreatetime).reversed()).collect(Collectors.toList());
         return getDataTable(collect);
     }
 

+ 1 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TOtherSolveController.java

@@ -58,6 +58,7 @@ public class TOtherSolveController extends BaseController
             salve.setAlarmMsg("其他告警求助:" + salve.getName() + "于" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,salve.getCreatetime()) + "发起其他告警求助");
         }
         List<TOtherSolve> collect=list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()->new TreeSet<TOtherSolve>(Comparator.comparing(TOtherSolve::getAid))), ArrayList::new));
+        collect = collect.stream().sorted(Comparator.comparing(TOtherSolve::getCreatetime).reversed()).collect(Collectors.toList());
         return getDataTable(collect);
     }
 

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TRailSolveController.java

@@ -11,6 +11,7 @@ import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.TFallSolve;
 import com.ruoyi.system.domain.TOtherSolve;
+import com.ruoyi.system.domain.TSosSolve;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -59,6 +60,7 @@ public class TRailSolveController extends BaseController
             salve.setAlarmMsg("围栏告警求助:" + salve.getName() + "于" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,salve.getCreatetime()) + "发起围栏告警求助");
         }
         List<TRailSolve> collect=list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()->new TreeSet<TRailSolve>(Comparator.comparing(TRailSolve::getAid))), ArrayList::new));
+        collect = collect.stream().sorted(Comparator.comparing(TRailSolve::getCreatetime).reversed()).collect(Collectors.toList());
         return getDataTable(collect);
     }
 

+ 0 - 6
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TSearchLocationInfoController.java

@@ -66,7 +66,6 @@ public class TSearchLocationInfoController extends BaseController {
     /**
      * 搜索【请填写功能名称】列表
      */
-    @PreAuthorize("@ss.hasPermi('system:info:search')")
     @GetMapping("/search")
     public TableDataInfo search(TSearchLocationInfo tSearchLocationInfo) {
         tSearchLocationInfo.setUserId(getUserId());
@@ -78,7 +77,6 @@ public class TSearchLocationInfoController extends BaseController {
     /**
      * 导出【请填写功能名称】列表
      */
-    @PreAuthorize("@ss.hasPermi('system:info:export')")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, TSearchLocationInfo tSearchLocationInfo) {
@@ -90,7 +88,6 @@ public class TSearchLocationInfoController extends BaseController {
     /**
      * 获取【请填写功能名称】详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:info:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(tSearchLocationInfoService.selectTSearchLocationInfoById(id));
@@ -99,7 +96,6 @@ public class TSearchLocationInfoController extends BaseController {
     /**
      * 新增【请填写功能名称】
      */
-    @PreAuthorize("@ss.hasPermi('system:info:add')")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TSearchLocationInfo tSearchLocationInfo) {
@@ -109,7 +105,6 @@ public class TSearchLocationInfoController extends BaseController {
     /**
      * 修改【请填写功能名称】
      */
-    @PreAuthorize("@ss.hasPermi('system:info:edit')")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TSearchLocationInfo tSearchLocationInfo) {
@@ -119,7 +114,6 @@ public class TSearchLocationInfoController extends BaseController {
     /**
      * 删除【请填写功能名称】
      */
-    @PreAuthorize("@ss.hasPermi('system:info:remove')")
     @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TSosSolveController.java

@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.dto.AddDeviceDto;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -54,6 +55,7 @@ public class TSosSolveController extends BaseController
             salve.setAlarmMsg("SOS紧急求助:" + salve.getName() + "于" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,salve.getCreatetime()) + "发起SOS紧急求助");
         }
         List<TSosSolve> collect=list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()->new TreeSet<TSosSolve>(Comparator.comparing(TSosSolve::getAid))), ArrayList::new));
+        collect = collect.stream().sorted(Comparator.comparing(TSosSolve::getCreatetime).reversed()).collect(Collectors.toList());
         return getDataTable(collect);
     }
 

+ 2 - 1
ruoyi-system/src/main/resources/mapper/system/TDeviceListMapper.xml

@@ -68,7 +68,8 @@
             <if test="price != null  and price != ''">and a.price = #{price}</if>
             <if test="cost != null  and cost != ''">and a.cost = #{cost}</if>
             <if test="payment != null ">and a.payment = #{payment}</if>
-            <if test="createTime != null ">and a.createtime = #{createTime}</if>
+            <if test="online_statis != null ">and d.online_statis = #{online_statis}</if>
+            <if test="offlinetime != null ">and d.offlinetime = #{offlinetime}</if>
         </where>
     </select>
 

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/TFallSolveMapper.xml

@@ -53,6 +53,7 @@
             <if test="solve_status != null">and f.solve_status = #{solve_status}</if>
             and d.alarm_type=21
         </where>
+        order by d.createtime desc
     </select>
 
     <select id="selectTFallSolveById" parameterType="Integer" resultMap="TFallSolveResult">

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/THealthSolveMapper.xml

@@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="solve_status != null"> and f.solve_status = #{solve_status}</if>
             and d.alarm_type in (22,23,24,25)
         </where>
+        order by d.createtime desc
     </select>
     
     <select id="selectTHealthSolveById" parameterType="Integer" resultMap="THealthSolveResult">

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/TOtherSolveMapper.xml

@@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="solve_status != null"> and f.solve_status = #{solve_status}</if>
             and d.alarm_type not in (0,16,17,20,21,22,23,24,25)
         </where>
+        order by d.createtime desc
     </select>
     
     <select id="selectTOtherSolveById" parameterType="Integer" resultMap="TOtherSolveResult">

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/TRailSolveMapper.xml

@@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="solve_status != null"> and f.solve_status = #{solve_status}</if>
             and d.status_type=2
         </where>
+        order by d.createtime desc
     </select>
     
     <select id="selectTRailSolveById" parameterType="Integer" resultMap="TRailSolveResult">

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/TSosSolveMapper.xml

@@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="solve_status != null"> and f.solve_status = #{solve_status}</if>
             and d.alarm_type=16
         </where>
+        order by d.createtime desc
     </select>
     
     <select id="selectTSosSolveById" parameterType="Integer" resultMap="TSosSolveResult">