Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server
| | |
| | | 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; |
| | |
| | | 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") |
| | |
| | | |
| | | @PutMapping("/video_inspection") |
| | | @ApiOperation("预警研判确定") |
| | | public CommonResult searchCount(ViolationParam violationParam){ |
| | | public CommonResult searchCount(@RequestBody VideoInspectParam violationParam){ |
| | | return CommonResult.success(baseCaseService.updateCase(violationParam)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
| | |
| | | |
| | | @Data |
| | | @ApiModel(value = "添加违规案件") |
| | | public class ViolationParam extends DispatchInfoParam { |
| | | public class ViolationParam { |
| | | |
| | | private Long baseId; |
| | | |
| | | @ApiModelProperty(value = "状态") |
| | | private Integer state; |
| | |
| | | * 关联商铺名称 |
| | | */ |
| | | @ApiModelProperty(value = "关联商铺名称") |
| | | private String shopName; |
| | | private Integer shopName; |
| | | |
| | | /** |
| | | * 车牌号 |
| | |
| | | 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; |
| | |
| | | /** |
| | | * 问题类别文本 |
| | | */ |
| | | @TableField(value = "category_text",exist = false) |
| | | @TableField(value = "category_text", exist = false) |
| | | @ApiModelProperty(value = "问题类别文本") |
| | | private String categoryText; |
| | | |
| | |
| | | /** |
| | | * 所属街道文本 |
| | | */ |
| | | @TableField(value = "street_text",exist = false) |
| | | @TableField(value = "street_text", exist = false) |
| | | @ApiModelProperty(value = "所属社区名称") |
| | | private String streetText; |
| | | |
| | |
| | | /** |
| | | * 所属社区文本 |
| | | */ |
| | | @TableField(value = "community_text",exist = false) |
| | | @TableField(value = "community_text", exist = false) |
| | | @ApiModelProperty(value = "所属社区文本") |
| | | private String communityText; |
| | | |
| | |
| | | /** |
| | | * 登记人文本 |
| | | */ |
| | | @TableField(value = "create_user_text",exist = false) |
| | | @TableField(value = "create_user_text", exist = false) |
| | | @ApiModelProperty(value = "登记人文本") |
| | | private String createUserText; |
| | | |
| | |
| | | /** |
| | | * 违规事件 |
| | | */ |
| | | @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; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @TableField("shop_name") |
| | | @ApiModelProperty(value = "关联商铺名称") |
| | | private String shopName; |
| | | private Integer shopName; |
| | | |
| | | /** |
| | | * 车牌号 |
| | |
| | | /** |
| | | * 大类文本 |
| | | */ |
| | | @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; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.entity.caseHandler.Violations; |
| | | import com.ycl.vo.casePool.ViolationsVO; |
| | | |
| | | import java.util.Map; |
| | | |
| | |
| | | */ |
| | | public interface ViolationsMapper extends BaseMapper<Violations> { |
| | | |
| | | Violations selectCondMap(Map map); |
| | | ViolationsVO selectCondMap(Map map); |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | Map<String, Object> selectCount(); |
| | | |
| | | Boolean updateCase(ViolationParam violationParam); |
| | | Boolean updateCase(VideoInspectParam videoInspectParam); |
| | | |
| | | Integer dayCount(); |
| | | |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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<>(); |
| | |
| | | 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()); |
| | |
| | | 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()); |
| | |
| | | |
| | | @Override |
| | | public List<EventVO> selectEventList(String beginTime, String endTime) { |
| | | return baseCaseMapper.selectEventList(beginTime,endTime); |
| | | return baseCaseMapper.selectEventList(beginTime, endTime); |
| | | } |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
| | |
| | | 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 = "事发地点") |
| | |
| | | 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},'%') |
| | |
| | | </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 |
| | |
| | | </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> |
| | |
| | | <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" /> |
| | |
| | | <select id="selectCondMap" parameterType="map" resultMap="CondMapResultMap"> |
| | | SELECT |
| | | uv.*, |
| | | t4.store_name , |
| | | udd.name category_text, |
| | | udd2.name type_text, |
| | | udd3.name grade_text |
| | |
| | | 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> |