增加设备点位返回
This commit is contained in:
parent
79af94e648
commit
aa446c324d
|
|
@ -1012,6 +1012,28 @@ public class BigScreenController {
|
|||
}
|
||||
}
|
||||
|
||||
//增加设备位置
|
||||
List<String> deployTypes = new ArrayList<>();
|
||||
deployTypes.add(PollutionConstants.CAMERA);
|
||||
deployTypes.add(PollutionConstants.AIR_SURV);
|
||||
deployTypes.add(PollutionConstants.SOIL_SURV);
|
||||
List<SurvDeviceDeploy> deploys = deployService.getDeviceListByStation(null,deployTypes);
|
||||
if(!deploys.isEmpty()){
|
||||
for (SurvDeviceDeploy deploy : deploys) {
|
||||
CommonLocationTrans ent = new CommonLocationTrans();
|
||||
ent.setName(deploy.getDeployDes());
|
||||
ent.setLatitude(deploy.getDeviceLatitude());
|
||||
ent.setLongitude(deploy.getDeviceLongitude());
|
||||
ent.setType(deploy.getDeployType());
|
||||
ent.setPicUrl(deploy.getMapIcon());
|
||||
ent.setIotUrl(deploy.getDeviceIotUrl());
|
||||
ent.setIotReverseUrl(deploy.getDeviceReverseIotUrl());
|
||||
ent.setMapIcon(deploy.getMapIcon());
|
||||
ent.setIds(deploy.getId());
|
||||
returnList.add(ent);
|
||||
}
|
||||
}
|
||||
|
||||
return Result.ok(returnList);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,4 +20,6 @@ public interface SurvDeviceDeployMapper extends BaseMapper<SurvDeviceDeploy> {
|
|||
|
||||
List<String> getDeviceListByStation(@Param("stationCode") String stationCode,@Param("deployType") String deployType);
|
||||
SurvDeviceDeploy getOneByCode(String deployCode);
|
||||
|
||||
List<SurvDeviceDeploy> getDeviceListByStations(@Param("stationCode") String stationCode,@Param("deployTypeList") List<String> deployTypeList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,13 +27,18 @@
|
|||
<result property="ipAddr" column="IP_ADDR" jdbcType="VARCHAR"/>
|
||||
<result property="port" column="PORT" jdbcType="VARCHAR"/>
|
||||
<result property="sendInfo" column="SEND_INFO" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="extMap" type="org.jeecg.common.entity.SurvDeviceDeploy" extends="baseResultMap">
|
||||
<association property="stationName" select="getStaionName" column="STATION_CODE"/>
|
||||
<association property="deviceName" select="getDeviceName" column="DEVICE_CODE"/>
|
||||
<association property="xyId" column="DEPLOY_CODE" select="getXyId"/>
|
||||
<collection property="scContExe" column="DEPLOY_CODE" select="getScCont"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="basesql" >ID,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_CODE,STATION_CODE,RUN_STATUS,POWER_STATUS,LASTSYNC_TIME,DEVICE_CODE,DEPLOY_DES,DEPLOY_PIC,DEVICE_URL,SORT_NO,DEPLOY_TYPE,GROUP_ID,IZ_BAOJING,IP_ADDR,PORT,SEND_INFO</sql>
|
||||
<sql id="basesql" >
|
||||
ID,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_CODE,STATION_CODE,RUN_STATUS,POWER_STATUS,LASTSYNC_TIME,DEVICE_CODE,DEPLOY_DES,DEPLOY_PIC,DEVICE_URL,SORT_NO,DEPLOY_TYPE,GROUP_ID,IZ_BAOJING,IP_ADDR,PORT,SEND_INFO,MAP_ICON,DEVICE_IOT_URL,DEVICE_REVERSE_IOT_URL
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="getStaionName" resultType="String">
|
||||
|
|
@ -58,7 +63,7 @@
|
|||
</select>
|
||||
|
||||
|
||||
<select id="pages" resultMap="baseResultMap">
|
||||
<select id="pages" resultMap="extMap">
|
||||
select <include refid="basesql" /> from surv_device_deploy where 1=1
|
||||
<if test="query.stationCode!=null and query.stationCode!=''">
|
||||
and STATION_CODE = #{query.stationCode}
|
||||
|
|
@ -82,7 +87,23 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getOneByCode" resultMap="baseResultMap">
|
||||
<select id="getOneByCode" resultMap="extMap">
|
||||
select <include refid="basesql"/> from surv_device_deploy where DEPLOY_CODE = #{deployCode} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getDeviceListByStations" resultMap="baseResultMap">
|
||||
select <include refid="basesql"/> from surv_device_deploy
|
||||
<where>
|
||||
<if test="deployTypeList != null and deployTypeList.size()>0">
|
||||
and DEPLOY_TYPE IN
|
||||
<foreach collection="deployTypeList" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="stationCode != null and stationCode != ''">
|
||||
and STATION_CODE = #{stationCode}
|
||||
</if>
|
||||
</where>
|
||||
order by SORT_NO,CREATE_TIME desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -22,4 +22,6 @@ public interface ISurvDeviceDeployService extends IService<SurvDeviceDeploy> {
|
|||
List<String> getDeviceListByStation(String stationCode, String deployType);
|
||||
|
||||
SurvDeviceDeploy getOneByCode(String deployCode);
|
||||
|
||||
List<SurvDeviceDeploy> getDeviceListByStation(String stationCode, List<String> deployType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,4 +34,9 @@ public class SurvDeviceDeployServiceImpl extends ServiceImpl<SurvDeviceDeployMap
|
|||
public SurvDeviceDeploy getOneByCode(String deployCode) {
|
||||
return baseMapper.getOneByCode(deployCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurvDeviceDeploy> getDeviceListByStation(String stationCode, List<String> deployType) {
|
||||
return baseMapper.getDeviceListByStations(stationCode,deployType);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -448,10 +448,34 @@ public class SurvStationInfoController {
|
|||
tempStation.setStationPic(StringUtils.isNotBlank(survDisplayDetail.getDetailExtPics())?survDisplayDetail.getDetailExtPics().split(","):new String[0]);
|
||||
tempStation.setStationIntro(survDisplayDetail.getDetailNote());
|
||||
cusList.add(tempStation);
|
||||
|
||||
orders++;
|
||||
}
|
||||
}
|
||||
job.put("cusLocation",cusList);
|
||||
//增加设备位置
|
||||
List<CommonLocationTrans> returnList = new ArrayList<>();
|
||||
List<String> deployTypes = new ArrayList<>();
|
||||
deployTypes.add(PollutionConstants.CAMERA);
|
||||
deployTypes.add(PollutionConstants.AIR_SURV);
|
||||
deployTypes.add(PollutionConstants.SOIL_SURV);
|
||||
List<SurvDeviceDeploy> deploys = survDeviceDeployService.getDeviceListByStation(null,deployTypes);
|
||||
if(!deploys.isEmpty()){
|
||||
for (SurvDeviceDeploy deploy : deploys) {
|
||||
CommonLocationTrans ent = new CommonLocationTrans();
|
||||
ent.setName(deploy.getDeployDes());
|
||||
ent.setLatitude(deploy.getDeviceLatitude());
|
||||
ent.setLongitude(deploy.getDeviceLongitude());
|
||||
ent.setType(deploy.getDeployType());
|
||||
ent.setPicUrl(deploy.getMapIcon());
|
||||
ent.setIotUrl(deploy.getDeviceIotUrl());
|
||||
ent.setIotReverseUrl(deploy.getDeviceReverseIotUrl());
|
||||
ent.setMapIcon(deploy.getMapIcon());
|
||||
ent.setIds(deploy.getId());
|
||||
returnList.add(ent);
|
||||
}
|
||||
}
|
||||
job.put("deviceList",returnList);
|
||||
return R.ok(job);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package org.jeecg.system.applet.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.common.entity.SurvDeviceDeploy;
|
||||
import org.jeecg.common.entity.SurvStationInfo;
|
||||
|
||||
|
|
@ -21,4 +22,6 @@ public interface SurvDeviceDeployMapper extends BaseMapper<SurvDeviceDeploy> {
|
|||
SurvDeviceDeploy getDeviceByCode(String deployCode);
|
||||
|
||||
List<SurvDeviceDeploy> getDeviceByStationNoCam(String stationCode, String deployType);
|
||||
|
||||
List<SurvDeviceDeploy> getDeviceListByStations(@Param("stationCode")String stationCode,@Param("deployTypeList") List<String> deployTypeList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,32 +25,7 @@
|
|||
<result column="DEVICE_LATITUDE" property="deviceLatitude"/>
|
||||
<result column="GROUP_ID" property="groupId"/>
|
||||
</resultMap>
|
||||
<resultMap id="adResultMap" type="org.jeecg.common.entity.SurvDeviceDeploy">
|
||||
<id column="ID" property="id"/>
|
||||
<result column="IS_DEL" property="isDel"/>
|
||||
<result column="SORT_NO" property="sortNo"/>
|
||||
<result column="TENANT_ID" property="tenantId"/>
|
||||
<result column="RE_VISION" property="reVision"/>
|
||||
<result column="CREATED_BY" property="createdBy"/>
|
||||
<result column="UPDATED_BY" property="updatedBy"/>
|
||||
<result column="RUN_STATUS" property="runStatus"/>
|
||||
<result column="DEPLOY_DES" property="deployDes"/>
|
||||
<result column="DEPLOY_PIC" property="deployPic"/>
|
||||
<result column="DEVICE_URL" property="deviceUrl"/>
|
||||
<result column="CREATE_TIME" property="createTime"/>
|
||||
<result column="DEPLOY_CODE" property="deployCode"/>
|
||||
<result column="DEVICE_CODE" property="deviceCode"/>
|
||||
<result column="DEPLOY_TYPE" property="deployType"/>
|
||||
<result column="UPDATED_TIME" property="updatedTime"/>
|
||||
<result column="STATION_CODE" property="stationCode"/>
|
||||
<result column="POWER_STATUS" property="powerStatus"/>
|
||||
<result column="LASTSYNC_TIME" property="lastsyncTime"/>
|
||||
<result column="DEVICE_LONGITUDE" property="deviceLongitude"/>
|
||||
<result column="DEVICE_LATITUDE" property="deviceLatitude"/>
|
||||
<result column="GROUP_ID" property="groupId"/>
|
||||
|
||||
|
||||
|
||||
<resultMap id="adResultMap" type="org.jeecg.common.entity.SurvDeviceDeploy" extends="baseResultMap">
|
||||
<association property="stationName" javaType="java.lang.String" select="getStationName" column="STATION_CODE"></association>
|
||||
<association property="stationType" javaType="java.lang.String" select="getStationType" column="STATION_CODE"></association>
|
||||
<association property="deviceInfo" select="getDeviceInfo" column="DEVICE_CODE"></association>
|
||||
|
|
@ -100,4 +75,20 @@
|
|||
AND DEPLOY_TYPE = #{param2}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getDeviceListByStations" resultMap="baseResultMap">
|
||||
select <include refid="baseSql"/> from surv_device_deploy
|
||||
<where>
|
||||
<if test="deployTypeList != null and deployTypeList.size()>0">
|
||||
and DEPLOY_TYPE IN
|
||||
<foreach collection="deployTypeList" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="stationCode != null and stationCode != ''">
|
||||
and STATION_CODE = #{stationCode}
|
||||
</if>
|
||||
</where>
|
||||
order by SORT_NO,CREATE_TIME desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -21,4 +21,6 @@ public interface ISurvDeviceDeployService extends IService<SurvDeviceDeploy> {
|
|||
SurvDeviceDeploy getDeviceByCode(String deployCode);
|
||||
|
||||
List<SurvDeviceDeploy> getDeviceByStationNoCam(String stationCode, String deployType);
|
||||
|
||||
List<SurvDeviceDeploy> getDeviceListByStation(String stationCode, List<String> deployTypes);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -38,4 +39,9 @@ public class SurvDeviceDeployServiceImpl extends ServiceImpl<SurvDeviceDeployMap
|
|||
public List<SurvDeviceDeploy> getDeviceByStationNoCam(String stationCode, String deployType) {
|
||||
return baseMapper.getDeviceByStationNoCam(stationCode,deployType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SurvDeviceDeploy> getDeviceListByStation(String stationCode, List<String> deployTypes) {
|
||||
return baseMapper.getDeviceListByStations(stationCode,deployTypes);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,6 +144,21 @@ public class SurvDeviceDeploy implements Serializable {
|
|||
@Excel(name = "控制指令", width = 15)
|
||||
private String sendInfo;
|
||||
|
||||
/**部署图片*/
|
||||
@Excel(name = "部署图片", width = 15)
|
||||
@ApiModelProperty(value = "部署图片")
|
||||
private java.lang.String mapIcon;
|
||||
|
||||
/**部署图片*/
|
||||
@Excel(name = "部署图片", width = 15)
|
||||
@ApiModelProperty(value = "部署图片")
|
||||
private java.lang.String deviceIotUrl;
|
||||
|
||||
/**部署图片*/
|
||||
@Excel(name = "部署图片", width = 15)
|
||||
@ApiModelProperty(value = "部署图片")
|
||||
private java.lang.String deviceReverseIotUrl;
|
||||
|
||||
@ApiModelProperty("1#球阀状态")
|
||||
@TableField(exist = false)
|
||||
private String valveStatus1;
|
||||
|
|
|
|||
|
|
@ -14,4 +14,7 @@ public class CommonLocationTrans {
|
|||
private String ids;
|
||||
private String notes;
|
||||
private String[] extPics;
|
||||
private String mapIcon;
|
||||
private String iotUrl;
|
||||
private String iotReverseUrl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue