Pārlūkot izejas kodu

地图撒点案件类型

yq 3 gadi atpakaļ
vecāks
revīzija
3b242db31c

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

@@ -82,14 +82,16 @@ public class JcjAjxxController {
      * @param size      条数
      * @param startTime 开始时间
      * @param endTime   结束时间
+     * @param ajType   案件类型
      * @return
      */
     @GetMapping("/pageMap")
     public ApiResult<CommonPage<AlertMapVO>> pageMap(@RequestParam(required = false) Integer current,
                                                      @RequestParam(required = false) Integer size,
                                                      @RequestParam(required = false) Date startTime,
-                                                     @RequestParam(required = false) Date endTime) {
-        return ApiResult.success(jcjAjxxService.pageMap(current, size, startTime, endTime));
+                                                     @RequestParam(required = false) Date endTime,
+                                                     @RequestParam(required = false) String ajType) {
+        return ApiResult.success(jcjAjxxService.pageMap(current, size, startTime, endTime,ajType));
     }
 
     /**

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

@@ -46,7 +46,7 @@ public interface JcjAjxxService extends CrudService<JcjAjxx> {
      */
     CommonPage<JcjAjxx> page(Integer current, Integer size, Date startTime, Date endTime);
 
-    CommonPage<AlertMapVO> pageMap(Integer current, Integer size, Date startTime, Date endTime);
+    CommonPage<AlertMapVO> pageMap(Integer current, Integer size, Date startTime, Date endTime,String ajType);
     /**
      * 查询不同警情(社会救助,警情,火灾)的占比
      * @param startTime

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

@@ -132,11 +132,12 @@ public class JcjAjxxServiceImpl extends AbstractCrudService<JcjAjxxMapper, JcjAj
     }
 
     @Override
-    public CommonPage<AlertMapVO> pageMap(Integer current, Integer size, Date startTime, Date endTime) {
+    public CommonPage<AlertMapVO> pageMap(Integer current, Integer size, Date startTime, Date endTime,String ajType) {
 
         LambdaQueryWrapper<JcjAjxx> queryWrapper = Wrappers.lambdaQuery();
         queryWrapper.select(JcjAjxx::getId,JcjAjxx::getGisX,JcjAjxx::getGisY)
                 .between(null != startTime && null != endTime,JcjAjxx::getDcsj,startTime,endTime)
+                .eq(StringUtils.isNotBlank(ajType),JcjAjxx::getAjlx,ajType)
                 .orderByDesc(JcjAjxx::getCreated);
         CommonPage<AlertMapVO> commonPage;
         if (null != current && size != null){