From dd39d15b6b47679778df6a7041e7be01ddc3debd Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期四, 08 十二月 2022 16:21:15 +0800 Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server --- ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml | 54 ++++---- ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java | 8 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 | 8 ycl-platform/src/main/java/com/ycl/entity/caseHandler/Violations.java | 8 ycl-platform/src/main/java/com/ycl/mapper/caseHandler/ViolationsMapper.java | 3 ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java | 18 +- ycl-platform/src/main/java/com/ycl/dto/casePool/VideoInspectParam.java | 48 ++++++++ ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java | 5 ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EventVO.java | 11 + ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java | 3 12 files changed, 264 insertions(+), 63 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java index 90e11cc..5e2971a 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java @@ -11,6 +11,7 @@ import com.ycl.controller.BaseController; import com.ycl.dto.caseHandler.QueryForViolationParam; import com.ycl.dto.casePool.IllegalBuildingParam; +import com.ycl.dto.casePool.VideoInspectParam; import com.ycl.dto.casePool.ViolationParam; import com.ycl.entity.caseHandler.BaseCase; import com.ycl.entity.caseHandler.BaseCaseDetail; @@ -279,12 +280,12 @@ public CommonResult queryCase(@RequestParam Integer pageSize, @RequestParam Integer current, @RequestParam(required = false) String number, - @RequestParam(required = false) Integer streetId, + @RequestParam(required = false) Integer communityId, @RequestParam(required = false) Integer categories, @RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime, @RequestParam(required = false) String site) { - return CommonResult.success(baseCaseService.selectPage(new Page<BaseCase>().setCurrent(current).setSize(pageSize), number, streetId, categories, startTime, endTime, site)); + return CommonResult.success(baseCaseService.selectPage(new Page<BaseCase>().setCurrent(current).setSize(pageSize), number, communityId, categories, startTime, endTime, site)); } @GetMapping("/query_for_violation") @@ -314,8 +315,7 @@ @PutMapping("/video_inspection") @ApiOperation("棰勮鐮斿垽纭畾") - public CommonResult searchCount(ViolationParam violationParam){ + public CommonResult searchCount(@RequestBody VideoInspectParam violationParam){ return CommonResult.success(baseCaseService.updateCase(violationParam)); } - } \ No newline at end of file diff --git a/ycl-platform/src/main/java/com/ycl/dto/casePool/VideoInspectParam.java b/ycl-platform/src/main/java/com/ycl/dto/casePool/VideoInspectParam.java new file mode 100644 index 0000000..ee2b09f --- /dev/null +++ b/ycl-platform/src/main/java/com/ycl/dto/casePool/VideoInspectParam.java @@ -0,0 +1,48 @@ +package com.ycl.dto.casePool; + +import com.ycl.dto.caseHandler.DispatchInfoParam; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +@Data +public class VideoInspectParam extends DispatchInfoParam { + + private Long baseId; + + @ApiModelProperty(value = "鐘舵��") + private Integer state; + + /** + * 澶х被 + */ + @ApiModelProperty(value = "澶х被") + @NotNull(message = "涓嶅厑璁稿ぇ绫讳负绌�") + private Integer categoryId; + + + /** + * 灏忕被 + */ + @ApiModelProperty(value = "灏忕被") + @NotNull(message = "涓嶅厑璁稿皬绫讳负绌�") + private Integer typeId; + + /** + * 鍏宠仈鍟嗛摵鍚嶇О + */ + @ApiModelProperty(value = "鍏宠仈鍟嗛摵鍚嶇О") + private Integer shopName; + + /** + * 闂鎻忚堪 + */ + @ApiModelProperty(value = "闂鎻忚堪") + @NotBlank(message = "涓嶅厑璁搁棶棰樻弿杩颁负绌�") + private String description; + + @ApiModelProperty(value = "鏄惁鍏宠仈鍟嗛摵") + private Integer linkShop; +} diff --git a/ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java b/ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java index bb1a357..33b7dfd 100644 --- a/ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java +++ b/ycl-platform/src/main/java/com/ycl/dto/casePool/ViolationParam.java @@ -11,9 +11,8 @@ @Data @ApiModel(value = "娣诲姞杩濊妗堜欢") -public class ViolationParam extends DispatchInfoParam { +public class ViolationParam { - private Long baseId; @ApiModelProperty(value = "鐘舵��") private Integer state; @@ -91,7 +90,7 @@ * 鍏宠仈鍟嗛摵鍚嶇О */ @ApiModelProperty(value = "鍏宠仈鍟嗛摵鍚嶇О") - private String shopName; + private Integer shopName; /** * 杞︾墝鍙� 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 f4c0846..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 @@ -73,7 +73,7 @@ */ @TableField("shop_name") @ApiModelProperty(value = "鍏宠仈鍟嗛摵鍚嶇О") - private String shopName; + private Integer shopName; /** * 杞︾墝鍙� @@ -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/IBaseCaseService.java b/ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java index 027167c..60d799d 100644 --- a/ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java +++ b/ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.ycl.dto.caseHandler.QueryForViolationParam; import com.ycl.dto.casePool.IllegalBuildingParam; +import com.ycl.dto.casePool.VideoInspectParam; import com.ycl.dto.casePool.ViolationParam; import com.ycl.entity.caseHandler.BaseCase; import com.ycl.entity.caseHandler.BaseCaseDetail; @@ -68,7 +69,7 @@ Map<String, Object> selectCount(); - Boolean updateCase(ViolationParam violationParam); + Boolean updateCase(VideoInspectParam videoInspectParam); Integer dayCount(); 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 24cce4a..15a5b36 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 @@ -15,6 +15,7 @@ import com.ycl.dto.caseHandler.DispatchInfoParam; import com.ycl.dto.caseHandler.QueryForViolationParam; import com.ycl.dto.casePool.IllegalBuildingParam; +import com.ycl.dto.casePool.VideoInspectParam; import com.ycl.dto.casePool.ViolationParam; import com.ycl.entity.caseHandler.*; import com.ycl.entity.dict.DataDictionary; @@ -31,7 +32,6 @@ import com.ycl.service.caseHandler.IViolationsService; import com.ycl.service.video.IVideoAlarmReportService; import com.ycl.vo.casePool.*; -import com.ycl.vo.cockpit.enforcementEvents.EnforcementEventsVO; import com.ycl.vo.cockpit.enforcementEvents.EventVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -250,8 +250,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<>(); @@ -416,17 +416,17 @@ public Map<String, Object> selectCount() { HashMap<String, Object> map = new HashMap<>(); Long review = baseCaseMapper.selectCount(new LambdaQueryWrapper<BaseCase>().eq(BaseCase::getState, 1)); - Long register = baseCaseMapper.selectCount(new LambdaQueryWrapper<BaseCase>().in(BaseCase::getState, 2,6)); + Long register = baseCaseMapper.selectCount(new LambdaQueryWrapper<BaseCase>().in(BaseCase::getState, 2, 6)); Long study = baseCaseMapper.selectCount(new LambdaQueryWrapper<BaseCase>().eq(BaseCase::getState, 3)); map.put("review", review); - map.put("register",register); - map.put("study",study); + map.put("register", register); + map.put("study", study); return map; } @Override @Transactional(rollbackFor = Exception.class) - public Boolean updateCase(ViolationParam violationParam) { + public Boolean updateCase(VideoInspectParam violationParam) { BaseCase baseCase = new BaseCase(); BeanUtils.copyProperties(violationParam, baseCase); baseCase.setId(violationParam.getBaseId()); @@ -434,7 +434,7 @@ baseCaseMapper.updateById(baseCase); Violations violations = new Violations(); BeanUtils.copyProperties(violationParam, violations); - violations.setId(violations.getId()); + violations.setId(violationParam.getBaseId()); if (violationParam.getState() == 6) { AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); violationParam.setCreateUser(user.getUserId()); @@ -471,6 +471,6 @@ @Override public List<EventVO> selectEventList(String beginTime, String endTime) { - return baseCaseMapper.selectEventList(beginTime,endTime); + return baseCaseMapper.selectEventList(beginTime, endTime); } } \ No newline at end of file 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/java/com/ycl/vo/cockpit/enforcementEvents/EventVO.java b/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EventVO.java index e474676..8b21831 100644 --- a/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EventVO.java +++ b/ycl-platform/src/main/java/com/ycl/vo/cockpit/enforcementEvents/EventVO.java @@ -1,10 +1,21 @@ package com.ycl.vo.cockpit.enforcementEvents; +import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data +@ApiModel(value = "浜嬩欢") public class EventVO { + + @ApiModelProperty(value = "浜嬩欢缁忓害") + private String longitude; + @ApiModelProperty(value = "浜嬩欢绾害") + private String latitude; + @ApiModelProperty(value = "浜嬩欢绫诲瀷") + private String type; + @ApiModelProperty(value = "鍛婅璁惧") + private String alarmAdvice; @ApiModelProperty(value = "浜嬩欢鎻忚堪") private String description; @ApiModelProperty(value = "浜嬪彂鍦扮偣") diff --git a/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml b/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml index 9007ee7..f542f68 100644 --- a/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml +++ b/ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml @@ -127,13 +127,13 @@ select t1.*, t3.region_name community_text from ums_base_case t1 - left join ums_sccg_region t3 on t1.street_id=t3.id + left join ums_sccg_region t3 on t1.community_id=t3.id <where> <if test="categories != null"> t1.category = #{categories} </if> <if test="streetId != null"> - and t1.street_id = #{streetId} + and t1.community_id = #{streetId} </if> <if test="code != null and code !=''"> and t1.code like concat('%',#{code},'%') @@ -229,17 +229,17 @@ </select> <select id="selectVideoInspection" resultType="com.ycl.vo.casePool.BaseCaseVO"> - SELECT t1.id as baseId, + SELECT t1.id as baseId, t1.`code`, t3.`name`, t3.url_address, t3.longitude, t3.latitude, t4.pic_data, - t5.`name` as grade, - t6.`region_name` as street, - t7.`region_name` as community, - t1.alarm_time as alarmTime + t5.`name` as grade, + t6.`region_name` as street, + t7.`region_name` as community, + t1.alarm_time as alarmTime FROM ums_base_case t1 LEFT JOIN ums_violations t2 ON t1.id = t2.id LEFT JOIN ums_video_point t3 on t2.video_point_id = t3.id @@ -263,35 +263,39 @@ </select> <select id="dispatchCount" resultType="java.lang.Integer"> select count(1) - FROM - ums_base_case t1 - LEFT JOIN ums_dispose_record t2 ON t1.id = t2.base_case_id - WHERE - t2.workflow_config_step_id =1 + FROM ums_base_case t1 + LEFT JOIN ums_dispose_record t2 ON t1.id = t2.base_case_id + WHERE t2.workflow_config_step_id = 1 </select> <select id="alCount" resultType="java.lang.Integer"> select count(1) - FROM - ums_base_case WHERE event_source=1; + FROM ums_base_case + WHERE event_source = 1; </select> <select id="selectEventList" resultType="com.ycl.vo.cockpit.enforcementEvents.EventVO"> SELECT - t1.alarm_time, - ( CASE WHEN t1.event_source = 1 THEN "瑙嗛宸℃煡" WHEN t1.event_source = 2 THEN "浜哄伐涓婃姤" ELSE "鍏朵粬" END ) AS source, - t1.site AS address, - t2.description, - t3.`name` AS point, - t4.pic_data AS picture + t1.alarm_time, + t1.longitude, + t1.latitude, + ( CASE WHEN t1.category = 1 THEN "杩濊" WHEN t1.category = 2 THEN "杩濆缓" ELSE "鍏朵粬" END ) AS type, + ( CASE WHEN t1.event_source = 1 THEN "瑙嗛宸℃煡" WHEN t1.event_source = 2 THEN "浜哄伐涓婃姤" ELSE "鍏朵粬" END ) AS alarmAdvice, + ( CASE WHEN t1.event_source = 1 THEN "瑙嗛宸℃煡" WHEN t1.event_source = 2 THEN "浜哄伐涓婃姤" ELSE "鍏朵粬" END ) AS source, + t1.site AS address, + t2.description, + t3.`name` AS point, + t4.pic_data AS picture FROM - ums_base_case t1 - LEFT JOIN ums_violations t2 ON t1.id = t2.id - LEFT JOIN ums_video_point t3 ON t3.id = t2.video_point_id - LEFT JOIN ums_video_alarm_report t4 ON t4.id = t2.video_alarm_report_id + ums_base_case t1 + LEFT JOIN ums_violations t2 ON t1.id = t2.id + LEFT JOIN ums_video_point t3 ON t3.id = t2.video_point_id + LEFT JOIN ums_video_alarm_report t4 ON t4.id = t2.video_alarm_report_id <where> + t1.category=1 <if test="beginTime !=''and beginTime!=null and endTime!=''and endTime!=null"> - t1.create_time BETWEEN #{beginTime} + and t1.create_time BETWEEN #{beginTime} AND #{endTime} </if> + </where> </select> diff --git a/ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml b/ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml index ca15c09..bb876fa 100644 --- a/ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml +++ b/ycl-platform/src/main/resources/mapper/caseHandler/ViolationsMapper.xml @@ -3,21 +3,21 @@ <mapper namespace="com.ycl.mapper.caseHandler.ViolationsMapper"> <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> - <resultMap id="BaseResultMap" type="com.ycl.entity.caseHandler.Violations"> + <resultMap id="BaseResultMap" type="com.ycl.vo.casePool.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" /> <result column="informant_phone_code" property="informantPhoneCode" /> <result column="informant_id_card" property="informantIdCard" /> </resultMap> - <resultMap type="com.ycl.entity.caseHandler.Violations" id="CondMapResultMap" extends="BaseResultMap"> + <resultMap type="com.ycl.vo.casePool.ViolationsVO" id="CondMapResultMap" extends="BaseResultMap"> <result column="category_text" property="categoryText" /> <result column="type_text" property="typeText" /> <result column="grade_text" property="gradeText" /> @@ -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