yq 3 gadi atpakaļ
vecāks
revīzija
0177d19841
20 mainītis faili ar 89 papildinājumiem un 56 dzēšanām
  1. 8 3
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/DeviceAjController.java
  2. 8 4
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/DeviceController.java
  3. 2 2
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/DeviceInfoController.java
  4. 4 2
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/XfzWxzController.java
  5. 5 1
      mhfire-mapping/src/main/java/com/bizmatics/mhfire/persistence/mapper/DeviceMapper.java
  6. 3 0
      mhfire-mapping/src/main/resources/mapper/mysql/DeviceMapper.xml
  7. 2 2
      mhfire-model/src/main/java/com/bizmatics/mhfire/model/Device.java
  8. 3 3
      mhfire-model/src/main/java/com/bizmatics/mhfire/model/DeviceAj.java
  9. 3 3
      mhfire-model/src/main/java/com/bizmatics/mhfire/model/DeviceAlert.java
  10. 3 3
      mhfire-model/src/main/java/com/bizmatics/mhfire/model/DeviceInfo.java
  11. 9 8
      mhfire-model/src/main/java/com/bizmatics/mhfire/model/WlClxx.java
  12. 7 6
      mhfire-model/src/main/java/com/bizmatics/mhfire/model/ZskTeam.java
  13. 3 1
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/DeviceAjService.java
  14. 3 2
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/DeviceService.java
  15. 2 1
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/XfzWxzService.java
  16. 6 2
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/DeviceAjServiceImpl.java
  17. 7 4
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/DeviceServiceImpl.java
  18. 5 7
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/JcjAjxxServiceImpl.java
  19. 5 2
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/XfzWxzServiceImpl.java
  20. 1 0
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/ZskTeamServiceImpl.java

+ 8 - 3
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/DeviceAjController.java

@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Date;
+
 /**
 
  * 设备案件
@@ -34,10 +36,13 @@ public class DeviceAjController {
      * @return
      */
     @GetMapping("/page")
-    public ApiResult<CommonPage<DeviceAj>> page(@RequestParam String deviceType,
+    public ApiResult<CommonPage<DeviceAj>> page(@RequestParam(required = false) String deviceType,
                                                 @RequestParam Integer current,
-                                                @RequestParam Integer size){
-        return ApiResult.success(deviceAjService.page(deviceType,current,size));
+                                                @RequestParam Integer size,
+                                                @RequestParam(required = false) Date startTime,
+                                                @RequestParam(required = false) Date endTime
+                                                ){
+        return ApiResult.success(deviceAjService.page(deviceType,current,size,startTime,endTime));
     }
 }
 

+ 8 - 4
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/DeviceController.java

@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -36,8 +37,9 @@ public class DeviceController {
      * @return
      */
     @GetMapping("/mapList")
-    public ApiResult<List<DeviceMapVO>> getMapList(){
-        return ApiResult.success(deviceService.getMapList());
+    public ApiResult<List<DeviceMapVO>> getMapList(@RequestParam(required = false) Date startTime,
+                                                   @RequestParam(required = false)Date endTime){
+        return ApiResult.success(deviceService.getMapList(startTime,endTime));
     }
 
 
@@ -53,8 +55,10 @@ public class DeviceController {
     public ApiResult<CommonPage<DeviceCollectVO>> getCollect(@RequestParam Integer current,
                                                              @RequestParam Integer size,
                                                              @RequestParam(required = false) String deviceType,
-                                                             @RequestParam(required = false) String deviceCode){
-        return ApiResult.success(deviceService.getCollect(current,size,deviceType,deviceCode));
+                                                             @RequestParam(required = false) String deviceCode,
+                                                             @RequestParam(required = false) Date startTime,
+                                                             @RequestParam(required = false)Date endTime){
+        return ApiResult.success(deviceService.getCollect(current,size,deviceType,deviceCode,startTime,endTime));
     }
 
     /**

+ 2 - 2
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/DeviceInfoController.java

@@ -36,8 +36,8 @@ public class DeviceInfoController {
      */
     @GetMapping("/elIco")
     public ApiResult<List<Map<String,Object>>> elIco(@RequestParam String deviceCode,
-                                                     @RequestParam Date startTime,
-                                                     @RequestParam Date endTime){
+                                                     @RequestParam(required = false) Date startTime,
+                                                     @RequestParam(required = false) Date endTime){
         return ApiResult.success(deviceInfoService.elIco(deviceCode,startTime,endTime));
     }
 }

+ 4 - 2
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/XfzWxzController.java

@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -32,8 +33,9 @@ public class XfzWxzController {
      * @return
      */
     @GetMapping("/list")
-    public ApiResult<List<XfzWxz>> page(){
-        return ApiResult.success(xfzWxzService.getMapList());
+    public ApiResult<List<XfzWxz>> page(@RequestParam(required = false) Date startTime,
+                                        @RequestParam(required = false) Date endTime){
+        return ApiResult.success(xfzWxzService.getMapList(startTime,endTime));
     }
 
     /**

+ 5 - 1
mhfire-mapping/src/main/java/com/bizmatics/mhfire/persistence/mapper/DeviceMapper.java

@@ -7,6 +7,8 @@ import com.bizmatics.mhfire.model.Device;
 import com.bizmatics.mhfire.persistence.mapper.vo.DeviceCollectVO;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Date;
+
 /**
  * <p>
  * 设备信息表 Mapper 接口
@@ -20,5 +22,7 @@ public interface DeviceMapper extends CrudMapper<Device> {
 
     Page<DeviceCollectVO> selectCollect(IPage<DeviceCollectVO> page,
                                         @Param("deviceType") String deviceType,
-                                        @Param("deviceCode") String deviceCode);
+                                        @Param("deviceCode") String deviceCode,
+                                        @Param("startTime")Date startTime,
+                                        @Param("endTime") Date endTime);
 }

+ 3 - 0
mhfire-mapping/src/main/resources/mapper/mysql/DeviceMapper.xml

@@ -57,6 +57,9 @@
             <if test="deviceCode != null and deviceCode != ''">
                 and d.code = #{deviceCode}
             </if>
+            <if test="startTime != null and endTime != null ">
+                and d.create_time between #{startTime} and #{endTime}
+            </if>
         </where>
         GROUP BY d.device_type
     </select>

+ 2 - 2
mhfire-model/src/main/java/com/bizmatics/mhfire/model/Device.java

@@ -5,7 +5,7 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
-import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
  * <p>
@@ -42,7 +42,7 @@ public class Device implements Serializable {
     /**
      * 创建时间
      */
-    private LocalDateTime createTime;
+    private Date createTime;
 
     /**
      * 经度

+ 3 - 3
mhfire-model/src/main/java/com/bizmatics/mhfire/model/DeviceAj.java

@@ -5,7 +5,7 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
-import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
  * <p>
@@ -30,7 +30,7 @@ public class DeviceAj implements Serializable {
     /**
      * 发生时间
      */
-    private LocalDateTime createTime;
+    private Date createTime;
 
     /**
      * 案件类型
@@ -70,7 +70,7 @@ public class DeviceAj implements Serializable {
     /**
      * 截止时间
      */
-    private LocalDateTime endTime;
+    private Date endTime;
 
     /**
      * 附件

+ 3 - 3
mhfire-model/src/main/java/com/bizmatics/mhfire/model/DeviceAlert.java

@@ -5,7 +5,7 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
-import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
  * <p>
@@ -32,12 +32,12 @@ public class DeviceAlert implements Serializable {
     /**
      * 创建时间
      */
-    private LocalDateTime createTime;
+    private Date createTime;
 
     /**
      * 告警时间
      */
-    private LocalDateTime sendTime;
+    private Date sendTime;
 
     /**
      * 地址

+ 3 - 3
mhfire-model/src/main/java/com/bizmatics/mhfire/model/DeviceInfo.java

@@ -5,7 +5,7 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
-import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
  * <p>
@@ -32,12 +32,12 @@ public class DeviceInfo implements Serializable {
     /**
      * 创建时间
      */
-    private LocalDateTime createTime;
+    private Date createTime;
 
     /**
      * 告警时间
      */
-    private LocalDateTime sendTime;
+    private Date sendTime;
 
     /**
      * 地址

+ 9 - 8
mhfire-model/src/main/java/com/bizmatics/mhfire/model/WlClxx.java

@@ -9,6 +9,7 @@ import lombok.experimental.Accessors;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
  * <p>
@@ -143,19 +144,19 @@ public class WlClxx implements Serializable {
      * 装备日期
      */
     @TableField("ZBRQ")
-    private LocalDateTime zbrq;
+    private Date zbrq;
 
     /**
      * 报废日期
      */
     @TableField("BFRQ")
-    private LocalDateTime bfrq;
+    private Date bfrq;
 
     /**
      * 有效期至
      */
     @TableField("YXQZ")
-    private LocalDateTime yxqz;
+    private Date yxqz;
 
     /**
      * 车架号
@@ -200,7 +201,7 @@ public class WlClxx implements Serializable {
     /**
      * 时间戳
      */
-    private LocalDateTime timeStamp;
+    private Date timeStamp;
 
     /**
      * 备注
@@ -245,10 +246,10 @@ public class WlClxx implements Serializable {
      * 创建时间
      */
     @TableField("CJSJ")
-    private LocalDateTime cjsj;
+    private Date cjsj;
 
     @TableField("CCRQ")
-    private LocalDateTime ccrq;
+    private Date ccrq;
 
     /**
      * 车辆简称
@@ -378,7 +379,7 @@ public class WlClxx implements Serializable {
 
     private String cldtid;
 
-    private LocalDateTime bdpAudtt;
+    private Date bdpAudtt;
 
     @TableField("SJC")
     private LocalDateTime sjc;
@@ -430,7 +431,7 @@ public class WlClxx implements Serializable {
     private String zhidui;
 
     @TableField("UPDATED")
-    private LocalDateTime updated;
+    private Date updated;
 
 
 }

+ 7 - 6
mhfire-model/src/main/java/com/bizmatics/mhfire/model/ZskTeam.java

@@ -1,15 +1,16 @@
 package com.bizmatics.mhfire.model;
 
-import java.math.BigDecimal;
 import com.baomidou.mybatisplus.annotation.IdType;
-import java.time.LocalDate;
-import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableField;
-import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.TableId;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
 /**
  * <p>
  * 
@@ -32,9 +33,9 @@ public class ZskTeam implements Serializable {
 
     private Integer parentid;
 
-    private LocalDate created;
+    private Date created;
 
-    private LocalDate updated;
+    private Date updated;
 
     private String xfjgId;
 

+ 3 - 1
mhfire-service/src/main/java/com/bizmatics/mhfire/service/DeviceAjService.java

@@ -4,6 +4,8 @@ import com.bizmatics.common.core.bean.CommonPage;
 import com.bizmatics.common.mvc.base.CrudService;
 import com.bizmatics.mhfire.model.DeviceAj;
 
+import java.util.Date;
+
 /**
  * <p>
  * 设备案件 服务类
@@ -20,5 +22,5 @@ public interface DeviceAjService extends CrudService<DeviceAj> {
      * @param size 条数
      * @return
      */
-    CommonPage<DeviceAj> page(String deviceType,Integer current,Integer size);
+    CommonPage<DeviceAj> page(String deviceType, Integer current, Integer size, Date startTime,Date endTime);
 }

+ 3 - 2
mhfire-service/src/main/java/com/bizmatics/mhfire/service/DeviceService.java

@@ -6,6 +6,7 @@ import com.bizmatics.mhfire.model.Device;
 import com.bizmatics.mhfire.persistence.mapper.vo.DeviceCollectVO;
 import com.bizmatics.mhfire.service.vo.DeviceMapVO;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -23,12 +24,12 @@ public interface DeviceService extends CrudService<Device> {
      * 地图撒点
       * @return
      */
-    List<DeviceMapVO> getMapList();
+    List<DeviceMapVO> getMapList(Date startTime,Date endTime);
 
 
     /**
      * 设备汇总信息
      * @return
      */
-    CommonPage<DeviceCollectVO> getCollect(Integer current, Integer size, String deviceType, String deviceCode);
+    CommonPage<DeviceCollectVO> getCollect(Integer current, Integer size, String deviceType, String deviceCode,Date startTime, Date endTime);
 }

+ 2 - 1
mhfire-service/src/main/java/com/bizmatics/mhfire/service/XfzWxzService.java

@@ -3,6 +3,7 @@ package com.bizmatics.mhfire.service;
 import com.bizmatics.common.mvc.base.CrudService;
 import com.bizmatics.mhfire.model.XfzWxz;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -17,7 +18,7 @@ public interface XfzWxzService extends CrudService<XfzWxz> {
 
 
 
-    List<XfzWxz> getMapList();
+    List<XfzWxz> getMapList(Date startTime, Date endTime);
 
 
 }

+ 6 - 2
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/DeviceAjServiceImpl.java

@@ -10,6 +10,8 @@ import com.bizmatics.mhfire.persistence.mapper.DeviceAjMapper;
 import com.bizmatics.mhfire.service.DeviceAjService;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
+
 /**
  * <p>
  * 设备案件 服务实现类
@@ -22,9 +24,11 @@ import org.springframework.stereotype.Service;
 public class DeviceAjServiceImpl extends AbstractCrudService<DeviceAjMapper, DeviceAj> implements DeviceAjService {
 
     @Override
-    public CommonPage<DeviceAj> page(String deviceType,Integer current, Integer size) {
+    public CommonPage<DeviceAj> page(String deviceType, Integer current, Integer size, Date startTime, Date endTime) {
         LambdaQueryWrapper<DeviceAj> queryWrapper = Wrappers.lambdaQuery();
-        queryWrapper.eq(DeviceAj::getDeviceType,deviceType);
+        queryWrapper.eq(DeviceAj::getDeviceType,deviceType)
+                .between(null != startTime && null != endTime,DeviceAj::getCreateTime,startTime,endTime)
+                .orderByDesc(DeviceAj::getCreateTime);
         Page<DeviceAj> page = new Page<>(current, size);
         return this.ToCommonPage(this.page(page,queryWrapper));
     }

+ 7 - 4
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/DeviceServiceImpl.java

@@ -13,6 +13,7 @@ import com.bizmatics.mhfire.service.DeviceService;
 import com.bizmatics.mhfire.service.vo.DeviceMapVO;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -27,17 +28,19 @@ import java.util.List;
 public class DeviceServiceImpl extends AbstractCrudService<DeviceMapper, Device> implements DeviceService {
 
     @Override
-    public List<DeviceMapVO> getMapList() {
+    public List<DeviceMapVO> getMapList(Date startTime, Date endTime) {
         LambdaQueryWrapper<Device> queryWrapper = Wrappers.lambdaQuery();
-        queryWrapper.select(Device::getId,Device::getLatitude,Device::getLongitude);
+        queryWrapper.select(Device::getId,Device::getLatitude,Device::getLongitude)
+                .between(null != startTime && endTime != null,Device::getCreateTime,startTime,endTime)
+                .orderByDesc(Device::getCreateTime);
         List<Device> list = this.list(queryWrapper);
         return BeanMapperUtils.mapList(list,Device.class,DeviceMapVO.class);
     }
 
     @Override
-    public CommonPage<DeviceCollectVO> getCollect(Integer current, Integer size, String deviceType, String deviceCode) {
+    public CommonPage<DeviceCollectVO> getCollect(Integer current, Integer size, String deviceType, String deviceCode,Date startTime, Date endTime) {
         Page<DeviceCollectVO> page = new Page<>(current, size);
-        page = baseMapper.selectCollect(page,deviceType,deviceCode);
+        page = baseMapper.selectCollect(page,deviceType,deviceCode,startTime,endTime);
         return new CommonPage<>(page.getRecords(),page.getTotal(),page.getSize(),page.getCurrent());
     }
 }

+ 5 - 7
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/JcjAjxxServiceImpl.java

@@ -125,9 +125,8 @@ public class JcjAjxxServiceImpl extends AbstractCrudService<JcjAjxxMapper, JcjAj
     public CommonPage<JcjAjxx> page(Integer current, Integer size, Date startTime, Date endTime) {
         IPage<JcjAjxx> page = new Page<>(current, size);
         LambdaQueryWrapper<JcjAjxx> queryWrapper = Wrappers.lambdaQuery();
-        if (null != startTime && null != endTime){
-            queryWrapper.between(JcjAjxx::getDcsj,startTime,endTime);
-        }
+        queryWrapper.between(null != startTime && null != endTime,JcjAjxx::getDcsj,startTime,endTime)
+                .orderByDesc(JcjAjxx::getCreated);
         page = this.page(page, queryWrapper);
         return  this.ToCommonPage(page);
     }
@@ -136,10 +135,9 @@ public class JcjAjxxServiceImpl extends AbstractCrudService<JcjAjxxMapper, JcjAj
     public CommonPage<AlertMapVO> pageMap(Integer current, Integer size, Date startTime, Date endTime) {
 
         LambdaQueryWrapper<JcjAjxx> queryWrapper = Wrappers.lambdaQuery();
-        queryWrapper.select(JcjAjxx::getId,JcjAjxx::getGisX,JcjAjxx::getGisY);
-        if (null != startTime && null != endTime){
-            queryWrapper.between(JcjAjxx::getDcsj,startTime,endTime);
-        }
+        queryWrapper.select(JcjAjxx::getId,JcjAjxx::getGisX,JcjAjxx::getGisY)
+                .between(null != startTime && null != endTime,JcjAjxx::getDcsj,startTime,endTime)
+                .orderByDesc(JcjAjxx::getCreated);
         CommonPage<AlertMapVO> commonPage;
         if (null != current && size != null){
             IPage<JcjAjxx> page = new Page<>(current,size);

+ 5 - 2
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/XfzWxzServiceImpl.java

@@ -9,6 +9,7 @@ import com.bizmatics.mhfire.persistence.mapper.XfzWxzMapper;
 import com.bizmatics.mhfire.service.XfzWxzService;
 import org.springframework.stereotype.Service;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -25,9 +26,11 @@ public class XfzWxzServiceImpl extends AbstractCrudService<XfzWxzMapper, XfzWxz>
 
 
     @Override
-    public List<XfzWxz> getMapList() {
+    public List<XfzWxz> getMapList(Date startTime,Date endTime) {
         LambdaQueryWrapper<XfzWxz> queryWrapper = Wrappers.lambdaQuery();
-        queryWrapper.select(XfzWxz::getId,XfzWxz::getJd,XfzWxz::getWd);
+        queryWrapper.select(XfzWxz::getId,XfzWxz::getJd,XfzWxz::getWd)
+                .between(null != startTime && null != endTime,XfzWxz::getCjsj,startTime,endTime)
+                .orderByDesc(XfzWxz::getCjsj);
         return this.list(queryWrapper);
     }
 }

+ 1 - 0
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/ZskTeamServiceImpl.java

@@ -28,6 +28,7 @@ public class ZskTeamServiceImpl extends AbstractCrudService<ZskTeamMapper, ZskTe
     public CommonPage<ZskTeam> page(Integer current, Integer size) {
         IPage<ZskTeam> page = new Page<>(current, size);
         LambdaQueryWrapper<ZskTeam> queryWrapper = Wrappers.lambdaQuery();
+        queryWrapper.orderByDesc(ZskTeam::getCreated);
         page = this.page(page, queryWrapper);
         return this.ToCommonPage(page);
     }