wl
2022-12-08 1160b99f7d7dfc9522144fed29e60009ead28af5
fix: 案件关联店铺id 预警研判确定
5个文件已修改
1个文件已添加
180 ■■■■ 已修改文件
ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/mapper/caseHandler/ViolationsMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/vo/casePool/ViolationsVO.java 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java
@@ -1,15 +1,13 @@
package com.ycl.entity.caseHandler;
import cn.hutool.core.date.LocalDateTimeUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ycl.vo.casePool.ViolationsVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
@@ -63,7 +61,7 @@
    /**
     * 问题类别文本
     */
    @TableField(value = "category_text",exist = false)
    @TableField(value = "category_text", exist = false)
    @ApiModelProperty(value = "问题类别文本")
    private String categoryText;
@@ -76,7 +74,7 @@
    /**
     * 所属街道文本
     */
    @TableField(value = "street_text",exist = false)
    @TableField(value = "street_text", exist = false)
    @ApiModelProperty(value = "所属社区名称")
    private String streetText;
@@ -90,7 +88,7 @@
    /**
     * 所属社区文本
     */
    @TableField(value = "community_text",exist = false)
    @TableField(value = "community_text", exist = false)
    @ApiModelProperty(value = "所属社区文本")
    private String communityText;
@@ -132,7 +130,7 @@
    /**
     * 登记人文本
     */
    @TableField(value = "create_user_text",exist = false)
    @TableField(value = "create_user_text", exist = false)
    @ApiModelProperty(value = "登记人文本")
    private String createUserText;
@@ -196,24 +194,23 @@
    /**
     * 违规事件
     */
    @TableField(value = "violations",exist = false)
    @TableField(value = "violations", exist = false)
    @ApiModelProperty(value = "违规事件")
    private Violations violations;
    private ViolationsVO violationsVO;
    /**
     * 违建事件
     */
    @TableField(value = "illegalBuilding",exist = false)
    @TableField(value = "illegalBuilding", exist = false)
    @ApiModelProperty(value = "违建事件")
    private IllegalBuilding illegalBuilding;
    /**
     *  调度信息
     * 调度信息
     */
    @TableField(value = "dispatchInfo",exist = false)
    @TableField(value = "dispatchInfo", exist = false)
    @ApiModelProperty(value = "调度信息")
    private DispatchInfo dispatchInfo;
}
ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java
@@ -127,19 +127,19 @@
    /**
     * 大类文本
     */
    @TableField(value = "category_text",exist = false)
    @TableField(value = "category_text", exist = false)
    @ApiModelProperty(value = "所属社区文本")
    private String categoryText;
    /**
     * 小类文本
     */
    @TableField(value = "type_text",exist = false)
    @TableField(value = "type_text", exist = false)
    @ApiModelProperty(value = "小类文本")
    private String typeText;
    /**
     * 事件等级文本
     */
    @TableField(value = "grade_text",exist = false)
    @TableField(value = "grade_text", exist = false)
    @ApiModelProperty(value = "事件等级文本")
    private String gradeText;
}
ycl-platform/src/main/java/com/ycl/mapper/caseHandler/ViolationsMapper.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ycl.entity.caseHandler.Violations;
import com.ycl.vo.casePool.ViolationsVO;
import java.util.Map;
@@ -15,6 +16,6 @@
 */
public interface ViolationsMapper extends BaseMapper<Violations> {
    Violations selectCondMap(Map map);
    ViolationsVO selectCondMap(Map map);
}
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java
@@ -251,8 +251,8 @@
        if (baseCase.getCategory() == 1) {
            Map mapV = new HashMap();
            mapV.put("id", baseCase.getId());
            Violations violations = violationsMapper.selectCondMap(mapV);
            baseCase.setViolations(violations);
            ViolationsVO violationsVO = violationsMapper.selectCondMap(mapV);
            baseCase.setViolationsVO(violationsVO);
        } else {
            IllegalBuilding illegalBuilding = illegalBuildingMapper.selectById(baseCase.getId());
            LambdaQueryWrapper<DataDictionary> dict = new LambdaQueryWrapper<>();
ycl-platform/src/main/java/com/ycl/vo/casePool/ViolationsVO.java
New file
@@ -0,0 +1,138 @@
package com.ycl.vo.casePool;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * <p>
 * 违规事件
 * </p>
 *
 * @author wl
 * @since 2022-09-24
 */
@Data
public class ViolationsVO {
    private static final long serialVersionUID = 1L;
    /**
     * 案件id(同ums_base_case表id)
     */
    @TableId("id")
    @ApiModelProperty(value = "案件id(同ums_base_case表id)")
    private Long id;
    /**
     * 大类
     */
    @TableField("category_id")
    @ApiModelProperty(value = "大类")
    private Integer categoryId;
    /**
     * 小类
     */
    @TableField("type_id")
    @ApiModelProperty(value = "小类")
    private Integer typeId;
    /**
     * 事件等级
     */
    @TableField("grade_id")
    @ApiModelProperty(value = "事件等级")
    private Integer gradeId;
    /**
     * 案由
     */
    @TableField("action_cause")
    @ApiModelProperty(value = "案由")
    private String actionCause;
    /**
     * 是否关联商铺
     */
    @TableField("link_shop")
    @ApiModelProperty(value = "是否关联商铺")
    private Integer linkShop;
    /**
     * 关联商铺名称
     */
    @TableField("shop_name")
    @ApiModelProperty(value = "关联商铺名称")
    private String shopName;
    /**
     * 车牌号
     */
    @TableField("car_number")
    @ApiModelProperty(value = "车牌号")
    private String carNumber;
    /**
     * 问题描述
     */
    @TableField("description")
    @ApiModelProperty(value = "问题描述")
    private String description;
    /**
     * 反映人
     */
    @TableField("informant")
    @ApiModelProperty(value = "反映人")
    private String informant;
    /**
     * 反映人联系方式
     */
    @TableField("informant_phone_code")
    @ApiModelProperty(value = "反映人联系方式")
    private String informantPhoneCode;
    /**
     * 身份证号码
     */
    @TableField("informant_id_card")
    @ApiModelProperty(value = "身份证号码")
    private String informantIdCard;
    /**
     * 视频报警id
     */
    @TableField("video_alarm_report_id")
    @ApiModelProperty(value = "视频报警id")
    private Integer videoAlarmReportId;
    /**
     * 视频报警id
     */
    @TableField("video_point_id")
    @ApiModelProperty(value = "视频点位")
    private Integer videoPointId;
    /**
     * 大类文本
     */
    @TableField(value = "category_text", exist = false)
    @ApiModelProperty(value = "所属社区文本")
    private String categoryText;
    /**
     * 小类文本
     */
    @TableField(value = "type_text", exist = false)
    @ApiModelProperty(value = "小类文本")
    private String typeText;
    /**
     * 事件等级文本
     */
    @TableField(value = "grade_text", exist = false)
    @ApiModelProperty(value = "事件等级文本")
    private String gradeText;
}
ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml
@@ -3,14 +3,14 @@
<mapper namespace="com.ycl.mapper.caseHandler.ViolationsMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ycl.entity.caseHandler.Violations">
    <resultMap id="BaseResultMap" type="com.ycl.entity.caseHandler.ViolationsVO">
        <id column="id" property="id" />
        <result column="category_id" property="categoryId" />
        <result column="type_id" property="typeId" />
        <result column="grade_id" property="gradeId" />
        <result column="action_cause" property="actionCause" />
        <result column="link_shop" property="linkShop" />
        <result column="shop_name" property="shopName" />
        <result column="store_name" property="shopName" />
        <result column="car_number" property="carNumber" />
        <result column="description" property="description" />
        <result column="informant" property="informant" />
@@ -29,6 +29,7 @@
    <select id="selectCondMap" parameterType="map" resultMap="CondMapResultMap">
        SELECT
            uv.*,
            t4.store_name ,
            udd.name category_text,
            udd2.name type_text,
            udd3.name grade_text
@@ -37,6 +38,7 @@
                LEFT JOIN ums_data_dictionary udd on uv.category_id = udd.id
                LEFT JOIN ums_data_dictionary udd2 on uv.type_id = udd2.id
                LEFT JOIN ums_data_dictionary udd3 on uv.grade_id = udd3.id
                LEFT JOIN ums_store_store_info t4 on  t4.id=uv.shop_name
        WHERE
            uv.`id` =  #{id}
    </select>