| | |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "列表", notes = "传入filterSelected或sceneId") |
| | | @ApiOperation(value = "列表-不带分页", notes = "传入filterSelected或sceneId") |
| | | public R<List<FwAreaDivideVO>> list( |
| | | @ApiParam(value = "是否过滤已被选择的数据(1过滤 0不过滤)") @RequestParam(required = false) Integer filterSelected, |
| | | @ApiParam(value = "场景id") @RequestParam(required = false) Long sceneId) { |
| | |
| | | <resultMap id="fwAreaDivideResultMap" type="org.sxkj.fw.area.vo.FwAreaDivideVO"> |
| | | <result column="id" property="id"/> |
| | | <result column="area_name" property="areaName"/> |
| | | <result column="longitude" property="longitude"/> |
| | | <result column="latitude" property="latitude"/> |
| | | <result column="area_size" property="areaSize"/> |
| | | <result column="geom" property="geom"/> |
| | | <result column="area_type" property="areaType"/> |
| | | <result column="trigger_condition" property="triggerCondition"/> |
| | | <result column="response_mechanism" property="responseMechanism"/> |
| | | <result column="control_level" property="controlLevel"/> |
| | |
| | | <result column="fly_date_start" property="flyDateStart"/> |
| | | <result column="fly_date_end" property="flyDateEnd"/> |
| | | <result column="area_code" property="areaCode"/> |
| | | <result column="police_station_name" property="policeStationName"/> |
| | | <result column="police_station_contact_person" property="policeStationContactPerson"/> |
| | | <result column="police_station_contact_phone" property="policeStationContactPhone"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="create_dept" property="createDept"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="status" property="status"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="fwAreaDivideStatisticsResultMap" type="org.sxkj.fw.area.vo.FwAreaDivideStatisticsVO"> |
| | |
| | | |
| | | <select id="selectFwAreaDividePage" resultMap="fwAreaDivideResultMap"> |
| | | select |
| | | ad.id, |
| | | ad.area_name, |
| | | ad.trigger_condition, |
| | | ad.response_mechanism, |
| | | ad.control_level, |
| | | ad.police_station_id, |
| | | ad.device_ids, |
| | | ad.fly_date_start, |
| | | ad.fly_date_end, |
| | | ad.area_code, |
| | | ps.station_name as police_station_name, |
| | | ad.create_user, |
| | | ad.create_dept, |
| | | ad.create_time, |
| | | ad.update_user, |
| | | ad.update_time, |
| | | ad.status, |
| | | ad.is_deleted |
| | | ad.* |
| | | from |
| | | ja_fw_area_divide ad |
| | | left join |
| | |
| | | |
| | | <select id="selectFwAreaDivideList" resultMap="fwAreaDivideResultMap"> |
| | | select |
| | | ad.id, |
| | | ad.area_name, |
| | | ad.longitude, |
| | | ad.latitude, |
| | | ad.area_size, |
| | | case |
| | | when ad.geom is null then null |
| | | when ST_SRID(ad.geom) is null or ST_SRID(ad.geom) = 0 then ST_AsText(ad.geom) |
| | | else concat(ST_AsText(ST_SwapXY(ad.geom)), ' | ', ST_SRID(ad.geom)) |
| | | end as geom, |
| | | ad.area_type, |
| | | ad.trigger_condition, |
| | | ad.response_mechanism, |
| | | ad.control_level, |
| | | ad.police_station_id, |
| | | ad.device_ids, |
| | | ad.fly_date_start, |
| | | ad.fly_date_end, |
| | | ad.area_code, |
| | | ps.station_name as police_station_name, |
| | | ad.create_user, |
| | | ad.create_dept, |
| | | ad.create_time, |
| | | ad.update_user, |
| | | ad.update_time, |
| | | ad.status, |
| | | ad.is_deleted |
| | | ad.* |
| | | from ja_fw_area_divide ad |
| | | left join ja_fw_police_station ps on ps.id = ad.police_station_id and ps.is_deleted = 0 |
| | | <where> |
| | |
| | | */ |
| | | package org.sxkj.fw.area.vo; |
| | | |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import java.io.Serializable; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 区域划分表 视图实体类 |
| | |
| | | */ |
| | | @Data |
| | | public class FwAreaDivideVO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 区域名称 |
| | | */ |
| | | @ApiModelProperty(value = "区域名称") |
| | | private String areaName; |
| | | /** |
| | | * 区域中心经度 |
| | | */ |
| | | @ApiModelProperty(value = "区域中心经度") |
| | | private Double longitude; |
| | | /** |
| | | * 区域中心纬度 |
| | | */ |
| | | @ApiModelProperty(value = "区域中心纬度") |
| | | private Double latitude; |
| | | /** |
| | | * 区域面积(km²) |
| | | */ |
| | | @ApiModelProperty(value = "区域面积(km²)") |
| | | private BigDecimal areaSize; |
| | | /** |
| | | * 经纬度面(存储地理面数据) |
| | | */ |
| | | @ApiModelProperty(value = "经纬度面(存储地理面数据)") |
| | | private String geom; |
| | | /** |
| | | * 区域类型:报警区/重点管制区 |
| | | */ |
| | | @ApiModelProperty(value = "区域类型:报警区/重点管制区") |
| | | private String areaType; |
| | | /** |
| | | * 触发条件 |
| | | */ |
| | |
| | | * 关联派出所id |
| | | */ |
| | | @ApiModelProperty(value = "关联派出所id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long policeStationId; |
| | | /** |
| | | * 关联设备ID,逗号分隔 |
| | |
| | | */ |
| | | @ApiModelProperty(value = "区域编码") |
| | | private String areaCode; |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createUser; |
| | | /** |
| | | * 创建部门 |
| | | */ |
| | | @ApiModelProperty(value = "创建部门") |
| | | private Long createDept; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | @ApiModelProperty(value = "更新人") |
| | | private Long updateUser; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Date updateTime; |
| | | /** |
| | | * 状态(0正常 1停用) |
| | | */ |
| | | @ApiModelProperty(value = "状态(0正常 1停用)") |
| | | private Integer status; |
| | | |
| | | // VO 扩展字段 |
| | | /** |
| | | * 派出所名称 |
| | | */ |
| | | @ApiModelProperty(value = "派出所名称") |
| | | private String policeStationName; |
| | | /** |
| | | * 派出所联系人 |
| | | */ |
| | | @ApiModelProperty(value = "派出所联系人") |
| | | private String policeStationContactPerson; |
| | | /** |
| | | * 派出所联系电话 |
| | | */ |
| | | @ApiModelProperty(value = "派出所联系电话") |
| | | private String policeStationContactPhone; |
| | | @ApiModelProperty(value = "面数据") |
| | | private List<FwAreaDivideExtVO> fwAreaDivideExtList; |
| | | |
| | | } |