From 1160b99f7d7dfc9522144fed29e60009ead28af5 Mon Sep 17 00:00:00 2001 From: wl <173@qq.com> Date: 星期四, 08 十二月 2022 11:32:22 +0800 Subject: [PATCH] fix: 案件关联店铺id 预警研判确定 --- ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java | 23 +++---- ycl-platform/src/main/java/com/ycl/vo/casePool/ViolationsVO.java | 138 ++++++++++++++++++++++++++++++++++++++++++++++ ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml | 6 + ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java | 6 +- ycl-platform/src/main/java/com/ycl/mapper/caseHandler/ViolationsMapper.java | 3 ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java | 4 6 files changed, 159 insertions(+), 21 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java b/ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java index 2a03614..4eb7d74 100644 --- a/ycl-platform/src/main/java/com/ycl/entity/caseHandler/BaseCase.java +++ b/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; - } \ No newline at end of file diff --git a/ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java b/ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java index a08faa4..a328a7f 100644 --- a/ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java +++ b/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; } diff --git a/ycl-platform/src/main/java/com/ycl/mapper/caseHandler/ViolationsMapper.java b/ycl-platform/src/main/java/com/ycl/mapper/caseHandler/ViolationsMapper.java index 2e8c551..7208a5e 100644 --- a/ycl-platform/src/main/java/com/ycl/mapper/caseHandler/ViolationsMapper.java +++ b/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); } diff --git a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java index cc0a770..fc96219 100644 --- a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java +++ b/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<>(); diff --git a/ycl-platform/src/main/java/com/ycl/vo/casePool/ViolationsVO.java b/ycl-platform/src/main/java/com/ycl/vo/casePool/ViolationsVO.java new file mode 100644 index 0000000..a519604 --- /dev/null +++ b/ycl-platform/src/main/java/com/ycl/vo/casePool/ViolationsVO.java @@ -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(鍚寀ms_base_case琛╥d) + */ + @TableId("id") + @ApiModelProperty(value = "妗堜欢id(鍚寀ms_base_case琛╥d)") + 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; +} diff --git a/ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml b/ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml index ca15c09..eea6a07 100644 --- a/ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml +++ b/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> -- Gitblit v1.8.0