Commit 42c16f34 authored by kongfm's avatar kongfm

Merge remote-tracking branch 'origin/developer' into developer

parents 5d18ea1c 2d37fb13
......@@ -11,9 +11,13 @@ public class KeySiteDateDto {
@ApiModelProperty(value = "id")
private Long id;
private String key;
@ApiModelProperty(value = "id")
private String value;
@ApiModelProperty(value = "重点部位名称")
private String name;
private String label;
@ApiModelProperty(value = "位置")
private String fireLocation;
@ApiModelProperty(value = "經度")
......@@ -21,20 +25,28 @@ public class KeySiteDateDto {
@ApiModelProperty(value = "緯度")
private String floorLatitude;
public Long getId() {
return id;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setId(Long id) {
this.id = id;
public void setValue(String value) {
this.value = value;
}
public String getName() {
return name;
public String getLabel() {
return label;
}
public void setName(String name) {
this.name = name;
public void setLabel(String label) {
this.label = label;
}
public String getFireLocation() {
......
......@@ -85,6 +85,12 @@ public class KeySiteDto extends BaseDto implements Serializable{
@ApiModelProperty(value = "使用性质名称")
private String useNatureName;
@ApiModelProperty(value = "经度")
private Double longitude;
@ApiModelProperty(value = "纬度")
private Double latitude;
@ApiModelProperty(value = "备注")
private String remark;
......
package com.yeejoin.amos.boot.module.common.api.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
......
......@@ -94,7 +94,20 @@ public interface EquipFeignClient {
*/
@RequestMapping(value = "/building/tree", method = RequestMethod.GET)
ResponseModel<Object> getBuildingTree();
/**
* 获取消防建筑详情
*
* @return
*/
@RequestMapping(value = "/building/getOne", method = RequestMethod.GET)
ResponseModel<Object> getOne(@RequestParam Long instanceId);
/**
* 获取指定建筑的经纬度信息
*
* @return
*/
@RequestMapping(value = "/building/getBuildingToLongitudeAndLatitude", method = RequestMethod.GET)
ResponseModel<Object> getBuildingToLongitudeAndLatitude(@RequestParam String instanceId);
/**
* 更新车辆状态
*
......
......@@ -124,8 +124,9 @@
<select id="getKeySiteDate" resultType="com.yeejoin.amos.boot.module.common.api.dto.KeySiteDateDto">
SELECT
c.sequence_nbr AS id,
c.`name` as name,
c.sequence_nbr AS `key`,
c.sequence_nbr AS `value`,
c.`name` as label,
c.address_desc as fireLocation,
c.longitude as floorLongitude,
c.latitude AS floorLatitude
......
package com.yeejoin.amos.boot.module.jcs.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 机场机位旋转角度
*
* @author litw
* @date 2021-09-17
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="AirportStandDto", description="机场机位旋转角度")
public class AirportStandDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "机位号")
private String standCode;
@ApiModelProperty(value = "坐标X")
private String coordinateX;
@ApiModelProperty(value = "坐标Y")
private String coordinateY;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
}
package com.yeejoin.amos.boot.module.jcs.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 机场机位旋转角度
*
* @author litw
* @date 2021-09-17
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("jc_airport_stand")
public class AirportStand extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 机位号
*/
@TableField("stand_code")
private String standCode;
/**
* 坐标X
*/
@TableField("coordinate_x")
private String coordinateX;
/**
* 坐标Y
*/
@TableField("coordinate_y")
private String coordinateY;
/**
* 经度
*/
@TableField("longitude")
private String longitude;
/**
* 纬度
*/
@TableField("latitude")
private String latitude;
/**
* 更新时间
*/
@TableField("update_time")
private Date updateTime;
}
package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.AirportStand;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 机场机位旋转角度 Mapper 接口
*
* @author litw
* @date 2021-09-17
*/
public interface AirportStandMapper extends BaseMapper<AirportStand> {
}
package com.yeejoin.amos.boot.module.jcs.api.service;
/**
* 机场机位旋转角度接口类
*
* @author litw
* @date 2021-09-17
*/
public interface IAirportStandService {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.AirportStandMapper">
</mapper>
......@@ -285,7 +285,7 @@ public class WaterResourceController extends BaseController {
// 查询基本信息
WaterResourceDto waterResourceDto = waterResourceServiceImpl.queryBySeq(sequenceNbr);
waterResourceDto.setRealityImgList(JSONArray.parseArray(waterResourceDto.getRealityImg(), Object.class));
waterResourceDto.setOrientationImgList(JSONArray.parseArray(waterResourceDto.getOrientationImg()));
waterResourceDto.setOrientationImgList(waterResourceDto.getOrientationImg()!=null?JSONArray.parseArray(waterResourceDto.getOrientationImg()):null);
Boolean isDelete = waterResourceDto.getIsDelete();
// 查询属性信息
String resourceType = waterResourceDto.getResourceType();
......
......@@ -45,14 +45,11 @@ public class StartLoader implements ApplicationRunner {
try {
emqKeeper.getMqttClient().subscribe(topic, (s, mqttMessage) -> {
byte[] payload = mqttMessage.getPayload();
try {
String obj = new String(payload);
if (!ValidationUtil.isEmpty(obj)) {
JSONObject json = JSON.parseObject(obj);
JSONObject date = (JSONObject) JSON.toJSON(json.get("data"));
AlertNewsDto alertNewsDto = new AlertNewsDto( "物联警情", date.get("unitInvolvedName")+","+date.get("floorName")+"楼,发生警情,请处理。", date.get("id").toString(), obj);
AlertNewsDto alertNewsDto = new AlertNewsDto( "物联警情", json.get("unitInvolvedName")+","+json.get("address")+",发生警情,请处理。", json.get("id").toString(), obj);
emqKeeper.getMqttClient().publish(topicweb, JSONObject.toJSON(alertNewsDto).toString().getBytes(), RuleConfig.DEFAULT_QOS, true);
}
} catch (Exception e) {
......
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.AirportStand;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AirportStandServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jcs.api.dto.AirportStandDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 机场机位旋转角度
*
* @author litw
* @date 2021-09-17
*/
@RestController
@Api(tags = "机场机位旋转角度Api")
@RequestMapping(value = "/airport-stand")
public class AirportStandController extends BaseController {
@Autowired
AirportStandServiceImpl airportStandServiceImpl;
/**
* 根据sequenceNbr查询
*
* @param standCode 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{standCode}")
@ApiOperation(httpMethod = "GET",value = "根据standCode查询单个机场机位旋转角度", notes = "根据standCode查询单个机场机位旋转角度")
public ResponseModel<AirportStandDto> selectOne(@PathVariable String standCode) {
QueryWrapper<AirportStand> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("stand_code",standCode);
AirportStand airportStand = airportStandServiceImpl.getOne(queryWrapper);
AirportStandDto airportStandDto = new AirportStandDto();
BeanUtils.copyProperties(airportStand,airportStandDto);
return ResponseHelper.buildResponse(airportStandDto);
}
}
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.netflix.discovery.converters.Auto;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto;
import com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
......@@ -17,8 +19,14 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.ExcelDto;
import com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* 导出导入
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.yeejoin.amos.boot.module.jcs.api.entity.AirportStand;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AirportStandMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAirportStandService;
import com.yeejoin.amos.boot.module.jcs.api.dto.AirportStandDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 机场机位旋转角度服务实现类
*
* @author litw
* @date 2021-09-17
*/
@Service
public class AirportStandServiceImpl extends BaseService<AirportStandDto,AirportStand,AirportStandMapper> implements IAirportStandService {
/**
* 分页查询
*/
public Page<AirportStandDto> queryForAirportStandPage(Page<AirportStandDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<AirportStandDto> queryForAirportStandList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment