Procházet zdrojové kódy

接警处置柱状图统计和详情展示

james před 2 roky
rodič
revize
695ddfe00f

+ 2 - 1
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/DemStoreController.java

@@ -10,6 +10,7 @@ import com.usky.fire.service.DemStoreService;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
 import java.util.Map;
@@ -22,7 +23,7 @@ import java.util.Map;
  * @author ZYJ
  * @since 2023-01-16
  */
-@Controller
+@RestController
 @RequestMapping("/demStore")
 public class DemStoreController {
     @Autowired

+ 65 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/JcjAjxxController.java

@@ -0,0 +1,65 @@
+package com.usky.fire.controller.web;
+
+import com.usky.common.core.bean.ApiResult;
+import com.usky.common.core.bean.CommonPage;
+import com.usky.fire.domain.JcjAjxx;
+import com.usky.fire.service.JcjAjxxService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author ZYJ
+ * @since 2023-01-17
+ */
+@RestController
+@RequestMapping("/jcjAjxx")
+public class JcjAjxxController {
+    @Autowired
+    private JcjAjxxService jcjAjxxService;
+
+    /**
+     * 接警每个柱状图详情信息展示
+     *
+     * @param streetTown     街镇(4个)
+     * @param startDate      开始时间 格式:yyyy-MM-dd HH:mm:ss
+     * @param endDate        结束时间 格式:yyyy-MM-dd HH:mm:ss
+     * @param caseType       案件类型
+     * @param pageNum        当前页
+     * @param pageSize       每页条数
+     * @return
+     *
+     */
+    @GetMapping("jcjAjxxList")
+    public ApiResult<CommonPage<JcjAjxx>> jcjAjxxList(@RequestParam(value="streetTown") String streetTown,
+                                               @RequestParam(value = "startDate") String startDate,
+                                               @RequestParam(value = "endDate") String endDate,
+                                               @RequestParam(value = "caseType") String caseType,
+                                               @RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
+                                               @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize){
+        return ApiResult.success(jcjAjxxService.jcjAjxxList(streetTown, startDate, endDate, caseType, pageNum, pageSize));
+    }
+
+
+    /**
+     * 接警处置柱状图统计
+     */
+    @GetMapping("jcjAjxxStatistics")
+    public ApiResult<Map<String,Object>> jcjAjxxStatistics(@RequestParam(value="streetTown") String streetTown,
+                                                           @RequestParam(value = "startDate") String startDate,
+                                                           @RequestParam(value = "endDate") String endDate){
+        return ApiResult.success(jcjAjxxService.jcjAjxxStatistics(streetTown, startDate, endDate));
+    }
+
+}
+

+ 226 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/domain/JcjAjxx.java

@@ -0,0 +1,226 @@
+package com.usky.fire.domain;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ZYJ
+ * @since 2023-01-17
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class JcjAjxx implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 警情信息
+     */
+    @TableField("GIS_X")
+    private BigDecimal gisX;
+
+    @TableField("GIS_Y")
+    private BigDecimal gisY;
+
+    @TableField("SJC")
+    private LocalDateTime sjc;
+
+    @TableId("ID")
+    private String id;
+
+    /**
+     * 主管支队
+     */
+    private String zgzd;
+
+    /**
+     * 案件时间段
+     */
+    private String ajsjd;
+
+    /**
+     * 通知到场时间
+     */
+    private String tzdcsj;
+
+    /**
+     * 通知出水时间
+     */
+    private String tzcssj;
+
+    /**
+     * 通知控制时间
+     */
+    private String tzkzsj;
+
+    /**
+     * 通知熄灭时间
+     */
+    private String tzxmsj;
+
+    /**
+     * 通知返队时间
+     */
+    private String tzfdsj;
+
+    /**
+     * 区域
+     */
+    private String qy;
+
+    /**
+     * 案件类型
+     */
+    private String ajlx;
+
+    /**
+     * 案发地址
+     */
+    private String afdz;
+
+    /**
+     * 立案时间
+     */
+    private LocalDateTime lasj;
+
+    /**
+     * 立案日期
+     */
+    private String larq;
+
+    /**
+     * 处置对象
+     */
+    private String czdx;
+
+    /**
+     * 案件类型代码
+     */
+    private String ajlxdm;
+
+    /**
+     * 案件等级
+     */
+    private String ajdj;
+
+    /**
+     * 主管中队
+     */
+    private String zhongdui;
+
+    /**
+     * 区县
+     */
+    private String qx;
+
+    /**
+     * 案件编号
+     */
+    private String ajbh;
+
+    /**
+     * 案件状态
+     */
+    private String ajzt;
+
+    /**
+     * 案件性质
+     */
+    private String ajxz;
+
+    /**
+     * 通知时间
+     */
+    private LocalDateTime tzsj;
+
+    /**
+     * 到场时间
+     */
+    private LocalDateTime dcsj;
+
+    /**
+     * 出水时间
+     */
+    private LocalDateTime cssj;
+
+    /**
+     * 控制时间
+     */
+    private LocalDateTime kzsj;
+
+    /**
+     * 熄灭时间
+     */
+    private LocalDateTime xmsj;
+
+    /**
+     * 返队时间
+     */
+    private LocalDateTime fdsj;
+
+    /**
+     * 补充信息
+     */
+    private String bcxx;
+
+    /**
+     * 出动车辆
+     */
+    private BigDecimal cdcl;
+
+    /**
+     * 案件区域
+     */
+    private String ajqy;
+
+    /**
+     * 填表时间
+     */
+    @TableField("BDP_AUDIT")
+    private String bdpAudit;
+
+    /**
+     * 主管中队id
+     */
+    @TableField("ZGJGBH")
+    private String zgjgbh;
+
+    /**
+     * 街镇
+     */
+    @TableField("STREETTOWN")
+    private String streettown;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime created;
+
+    /**
+     * 编辑时间
+     */
+    private LocalDateTime updated;
+
+    /**
+     * 0有效/1无效
+     */
+    private Boolean yxx;
+
+    /**
+     * 0未确认/1已同步/2人员确认
+     */
+    private Integer qrqk;
+
+    private Integer fairIs;
+
+
+}

+ 16 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/mapper/JcjAjxxMapper.java

@@ -0,0 +1,16 @@
+package com.usky.fire.mapper;
+
+import com.usky.fire.domain.JcjAjxx;
+import com.usky.common.mybatis.core.CrudMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author ZYJ
+ * @since 2023-01-17
+ */
+public interface JcjAjxxMapper extends CrudMapper<JcjAjxx> {
+
+}

+ 22 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/JcjAjxxService.java

@@ -0,0 +1,22 @@
+package com.usky.fire.service;
+
+import com.usky.common.core.bean.CommonPage;
+import com.usky.fire.domain.JcjAjxx;
+import com.usky.common.mybatis.core.CrudService;
+
+import java.util.Map;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ZYJ
+ * @since 2023-01-17
+ */
+public interface JcjAjxxService extends CrudService<JcjAjxx> {
+    CommonPage<JcjAjxx> jcjAjxxList(String streetTown, String startDate, String endDate, String caseType, Integer pageNum, Integer pageSize);
+
+    Map<String,Object> jcjAjxxStatistics(String streetTown, String startDate, String endDate);
+
+}

+ 1 - 1
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/DemStoreServiceImpl.java

@@ -44,7 +44,7 @@ public class DemStoreServiceImpl extends AbstractCrudService<DemStoreMapper, Dem
                 map.put("companyName", list1.get(i).getCompanyName());
                 map.put("policeStation", list1.get(i).getPoliceStation());
                 map.put("address", list1.get(i).getAddress());
-                map.put("longitude", list1.get(1).getLongitude());
+                map.put("longitude", list1.get(i).getLongitude());
                 map.put("latitude", list1.get(i).getLatitude());
                 map.put("fireDutyName", list1.get(i).getFireDutyName());
                 map.put("fireManageName", list1.get(i).getFireManageName());

+ 59 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/JcjAjxxServiceImpl.java

@@ -0,0 +1,59 @@
+package com.usky.fire.service.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.usky.common.core.bean.CommonPage;
+import com.usky.fire.domain.JcjAjxx;
+import com.usky.fire.mapper.JcjAjxxMapper;
+import com.usky.fire.service.JcjAjxxService;
+import com.usky.common.mybatis.core.AbstractCrudService;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author ZYJ
+ * @since 2023-01-17
+ */
+@DS("mhsystem")
+@Service
+public class JcjAjxxServiceImpl extends AbstractCrudService<JcjAjxxMapper, JcjAjxx> implements JcjAjxxService {
+    @Override
+    CommonPage<JcjAjxx> jcjAjxxList(String streetTown, String startDate, String endDate, String caseType, Integer pageNum, Integer pageSize){
+        List<String> streetTownList = new ArrayList<>();
+        if(StringUtils.isNotBlank(streetTown)){
+            String[] splitList = streetTown.split(",");
+            for(int i=0;i<splitList.length;i++){
+                streetTownList.add(splitList[i]);
+            }
+        }
+        IPage<JcjAjxx> page = new Page<>(pageNum, pageSize);
+        LambdaQueryWrapper<JcjAjxx> queryWrapper = Wrappers.lambdaQuery();
+        if(streetTownList.size()>0){
+            queryWrapper.in(JcjAjxx::getStreettown, streetTown);
+        }
+        queryWrapper.between(StringUtils.isNotBlank(startDate) && StringUtils.isNotBlank(endDate), JcjAjxx::getLasj, startDate, endDate)
+                    .eq(StringUtils.isNotBlank(caseType), JcjAjxx::getAjlx, caseType)
+                    .eq(JcjAjxx::getYxx,0)
+                    .orderByDesc(JcjAjxx::getId);
+        page = this.page(page, queryWrapper);
+        return new CommonPage<>(page.getRecords(), page.getTotal(), pageNum, pageSize);
+
+    }
+
+    @Override
+    Map<String,Object> jcjAjxxStatistics(String streetTown, String startDate, String endDate){
+
+    }
+}

+ 50 - 0
service-fire/service-fire-biz/src/main/resources/mapper/fire/JcjAjxxMapper.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usky.fire.mapper.JcjAjxxMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.usky.fire.domain.JcjAjxx">
+        <id column="ID" property="id" />
+        <result column="GIS_X" property="gisX" />
+        <result column="GIS_Y" property="gisY" />
+        <result column="SJC" property="sjc" />
+        <result column="zgzd" property="zgzd" />
+        <result column="ajsjd" property="ajsjd" />
+        <result column="tzdcsj" property="tzdcsj" />
+        <result column="tzcssj" property="tzcssj" />
+        <result column="tzkzsj" property="tzkzsj" />
+        <result column="tzxmsj" property="tzxmsj" />
+        <result column="tzfdsj" property="tzfdsj" />
+        <result column="qy" property="qy" />
+        <result column="ajlx" property="ajlx" />
+        <result column="afdz" property="afdz" />
+        <result column="lasj" property="lasj" />
+        <result column="larq" property="larq" />
+        <result column="czdx" property="czdx" />
+        <result column="ajlxdm" property="ajlxdm" />
+        <result column="ajdj" property="ajdj" />
+        <result column="zhongdui" property="zhongdui" />
+        <result column="qx" property="qx" />
+        <result column="ajbh" property="ajbh" />
+        <result column="ajzt" property="ajzt" />
+        <result column="ajxz" property="ajxz" />
+        <result column="tzsj" property="tzsj" />
+        <result column="dcsj" property="dcsj" />
+        <result column="cssj" property="cssj" />
+        <result column="kzsj" property="kzsj" />
+        <result column="xmsj" property="xmsj" />
+        <result column="fdsj" property="fdsj" />
+        <result column="bcxx" property="bcxx" />
+        <result column="cdcl" property="cdcl" />
+        <result column="ajqy" property="ajqy" />
+        <result column="BDP_AUDIT" property="bdpAudit" />
+        <result column="ZGJGBH" property="zgjgbh" />
+        <result column="STREETTOWN" property="streettown" />
+        <result column="created" property="created" />
+        <result column="updated" property="updated" />
+        <result column="yxx" property="yxx" />
+        <result column="qrqk" property="qrqk" />
+        <result column="fair_is" property="fairIs" />
+    </resultMap>
+
+</mapper>