添加projectId,并修改bug

This commit is contained in:
童丽然 2025-01-09 18:19:16 +08:00
parent 83ba7cd354
commit da663fff45
21 changed files with 133 additions and 40 deletions

View File

@ -61,7 +61,8 @@ public class ResourcesConfig implements WebMvcConfigurer
"/tool/gen/**");
//配置项目数据隔离拦截器
registry.addInterceptor(projectDataIsolationInterceptor)
.addPathPatterns("/gis/groups/**", "/gis/legend/**","/gis/site/**","/project/**","/system/**","/device/statistics/**");
.addPathPatterns("/gis/groups/**", "/gis/legend/**","/gis/site/**","/project/**","/system/**","/device/statistics/**")
.addPathPatterns("/media/yingshiyun/**");
}
/**

View File

@ -126,8 +126,8 @@ public class DeviceAlarmController extends BaseController {
* 统计不同设备数量
*/
@GetMapping("/countByType")
public AjaxResult getDeviceCountByType() {
return AjaxResult.success(deviceInformationManager.getAllDeviceCount());
public AjaxResult getDeviceCountByType(Long projectId) {
return AjaxResult.success(deviceInformationManager.getAllDeviceCount(projectId));
}
/**

View File

@ -44,13 +44,14 @@ public class DeviceInfoController extends BaseController {
* 查询全部设备立杆列表
*/
@GetMapping("/allList")
public AjaxResult getAllList() {
public AjaxResult getAllList(Long projectId) {
List<Map<String, Object>> result =new ArrayList<>();
//气象
LambdaQueryWrapper<DeviceInformationMeteorology> queryWrapper1 = new LambdaQueryWrapper<>();
queryWrapper1.select(DeviceInformationMeteorology::getId,DeviceInformationMeteorology::getName,
DeviceInformationMeteorology::getLongitude,DeviceInformationMeteorology::getLatitude,
DeviceInformationMeteorology::getDeviceEncoding);
DeviceInformationMeteorology::getDeviceEncoding)
.eq(DeviceInformationMeteorology::getProjectId,projectId);
List<DeviceInformationMeteorology> deviceInformationMeteorologies = deviceInformationMeteorologyMapper.selectList(queryWrapper1);
Map<String,Object> obj1=new HashMap<>();
obj1.put("type","气象");
@ -60,7 +61,8 @@ public class DeviceInfoController extends BaseController {
LambdaQueryWrapper<DeviceInformationWorms> queryWrapper2 = new LambdaQueryWrapper<>();
queryWrapper2.select(DeviceInformationWorms::getId,DeviceInformationWorms::getName,
DeviceInformationWorms::getLongitude,DeviceInformationWorms::getLatitude,
DeviceInformationWorms::getDeviceEncoding);
DeviceInformationWorms::getDeviceEncoding)
.eq(DeviceInformationWorms::getProjectId,projectId);
List<DeviceInformationWorms> deviceInformationWorms = deviceInformationWormsMapper.selectList(queryWrapper2);
Map<String,Object> obj2=new HashMap<>();
obj2.put("type","虫情");
@ -71,7 +73,8 @@ public class DeviceInfoController extends BaseController {
LambdaQueryWrapper<DeviceInformationMoisture> queryWrapper3 = new LambdaQueryWrapper<>();
queryWrapper3.select(DeviceInformationMoisture::getId,DeviceInformationMoisture::getName,
DeviceInformationMoisture::getLongitude,DeviceInformationMoisture::getLatitude,
DeviceInformationMoisture::getDeviceEncoding);
DeviceInformationMoisture::getDeviceEncoding)
.eq(DeviceInformationMoisture::getProjectId,projectId);
List<DeviceInformationMoisture> deviceInformationMoistures = deviceInformationMoistureMapper.selectList(queryWrapper3);
Map<String,Object> obj3=new HashMap<>();
obj3.put("type","墒情");
@ -82,7 +85,8 @@ public class DeviceInfoController extends BaseController {
LambdaQueryWrapper<DeviceInformationTargetpests> queryWrapper4 = new LambdaQueryWrapper<>();
queryWrapper4.select(DeviceInformationTargetpests::getId,DeviceInformationTargetpests::getName,
DeviceInformationTargetpests::getLongitude,DeviceInformationTargetpests::getLatitude,
DeviceInformationTargetpests::getDeviceEncoding);
DeviceInformationTargetpests::getDeviceEncoding)
.eq(DeviceInformationTargetpests::getProjectId,projectId);
List<DeviceInformationTargetpests> deviceInformationTargetpests = deviceInformationTargetpestsMapper.selectList(queryWrapper4);
Map<String,Object> obj4=new HashMap<>();
obj4.put("type","杀虫灯");
@ -93,7 +97,8 @@ public class DeviceInfoController extends BaseController {
LambdaQueryWrapper<DeviceInformationMiaoqing> queryWrapper5 = new LambdaQueryWrapper<>();
queryWrapper5.select(DeviceInformationMiaoqing::getId,DeviceInformationMiaoqing::getName,
DeviceInformationMiaoqing::getLongitude,DeviceInformationMiaoqing::getLatitude,
DeviceInformationMiaoqing::getDeviceEncoding);
DeviceInformationMiaoqing::getDeviceEncoding)
.eq(DeviceInformationMiaoqing::getProjectId,projectId);
List<DeviceInformationMiaoqing> deviceInformationMiaoqings = deviceInformationMiaoqingMapper.selectList(queryWrapper5);
Map<String,Object> obj5=new HashMap<>();
obj5.put("type","苗情");
@ -104,7 +109,8 @@ public class DeviceInfoController extends BaseController {
LambdaQueryWrapper<DeviceInformationMonitor> queryWrapper6 = new LambdaQueryWrapper<>();
queryWrapper6.select(DeviceInformationMonitor::getId,DeviceInformationMonitor::getName,
DeviceInformationMonitor::getLongitude,DeviceInformationMonitor::getLatitude,
DeviceInformationMonitor::getDeviceEncoding);
DeviceInformationMonitor::getDeviceEncoding)
.eq(DeviceInformationMonitor::getProjectId,projectId);
List<DeviceInformationMonitor> deviceInformationMonitors = deviceInformationMonitorMapper.selectList(queryWrapper6);
Map<String,Object> obj6=new HashMap<>();
obj6.put("type","监控");

View File

@ -39,7 +39,7 @@ public class DeviceInformationMeteorologyController extends BaseController
/**
* 查询气象设备基础信息列表
*/
@PreAuthorize("@ss.hasPermi('deviceInfo:meteorology:list')")
//@PreAuthorize("@ss.hasPermi('deviceInfo:meteorology:list')")
@GetMapping("/list")
@ApiOperation("查询气象设备基础信息列表")
public TableDataInfo list(DeviceInformationMeteorology deviceInformationMeteorology)

View File

@ -21,8 +21,8 @@ public class DeviceRealtimedataMeteorologyController {
* 获取最新的一条气象数据
*/
@GetMapping(value = "/weather/realtimedata")
public AjaxResult getLatestWeatherRealtimedata() {
return AjaxResult.success(deviceRealtimedataMeteorologyService.getLatestWeatherRealtimedata());
public AjaxResult getLatestWeatherRealtimedata(String deviceEncoding) {
return AjaxResult.success(deviceRealtimedataMeteorologyService.getLatestWeatherRealtimedata(deviceEncoding));
}
}

View File

@ -2,6 +2,7 @@ package com.fastbee.data.controller.aaScreenAgricultural.deviceRealTimeData;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.common.holder.ProjectHolder;
import com.fastbee.deviceData.api.yingshiyun.service.YingshiyunService;
import com.fastbee.deviceInfo.domain.DeviceInformationMonitor;
import com.fastbee.deviceInfo.mapper.DeviceInformationMonitorMapper;
@ -30,14 +31,22 @@ public class DeviceRealtimedataSeedlingGrowthController {
* 获取苗情监测监控设备列表
*/
@GetMapping("/monitorDeviceList")
public AjaxResult getMonitorDeviceList() {
public AjaxResult getMonitorDeviceList(Long projectId) {
System.err.println("/monitorDeviceList");
System.err.println("projectId:"+projectId);
List<DeviceInformationMonitor> list = new LambdaQueryChainWrapper<>(monitorMapper)
.select(DeviceInformationMonitor::getId,
DeviceInformationMonitor::getName,
DeviceInformationMonitor::getDeviceEncoding,
DeviceInformationMonitor::getLatitude,
DeviceInformationMonitor::getLongitude)
.eq(DeviceInformationMonitor::getProjectId,projectId)
//.eq(DeviceInformationMonitor::getDeviceEncoding,deviceEncoding)
.list();
for(int i=0;i<list.size();i++)
{
System.err.println("{"+list.get(i).getDeviceEncoding()+":"+list.get(i).getProjectId()+"}");
}
//获取监控播放地址
list.forEach(this::setPlayUrl);
return AjaxResult.success(list);

View File

@ -68,5 +68,5 @@ public interface IDeviceRealtimedataMeteorologyService extends IService<DeviceRe
* 获取最新的一条气象数据
* @return
*/
public Map<String,Object> getLatestWeatherRealtimedata();
public Map<String,Object> getLatestWeatherRealtimedata(String deviceEncoding);
}

View File

@ -107,31 +107,33 @@ public class DeviceRealtimedataMeteorologyServiceImpl extends ServiceImpl<Device
* @return
*/
@Override
public Map<String,Object> getLatestWeatherRealtimedata(){
public Map<String,Object> getLatestWeatherRealtimedata(String deviceEncoding){
Map<String,Object> rest= new HashMap<>();
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.orderByDesc("real_time");
queryWrapper.eq("device_id",deviceEncoding);
queryWrapper.last("limit 1");
DeviceRealtimedataMeteorology meteorology = deviceRealtimedataMeteorologyMapper.selectOne(queryWrapper);
System.err.println(meteorology.getDeviceId()+"最新一条气象数据,时间:"+meteorology.getRealTime());
List<DeviceProperties> devicePropertiesList = new ArrayList<>();
rest.put("props",devicePropertiesList);
if(Objects.isNull(meteorology)){
return rest;
}
devicePropertiesList.add(DeviceProperties.builder().name("空气温度").value(meteorology.getAirTemp().toString()).unit("°C").build());
devicePropertiesList.add(DeviceProperties.builder().name("空气湿度").value(meteorology.getAirHumi().toString()).unit("%").build());
devicePropertiesList.add(DeviceProperties.builder().name("风速").value(meteorology.getWindSpeed().toString()).unit("m/s").build());
devicePropertiesList.add(DeviceProperties.builder().name("空气温度").value(meteorology.getAirTemp()==null?"":meteorology.getAirTemp().toString()).unit("°C").build());
devicePropertiesList.add(DeviceProperties.builder().name("空气湿度").value(meteorology.getAirHumi()==null?"":meteorology.getAirHumi().toString()).unit("%").build());
devicePropertiesList.add(DeviceProperties.builder().name("风速").value(meteorology.getWindSpeed()==null?"":meteorology.getWindSpeed().toString()).unit("m/s").build());
devicePropertiesList.add(DeviceProperties.builder().name("风向").value(windDirMap(meteorology.getWindDir())).unit("").build());
devicePropertiesList.add(DeviceProperties.builder().name("大气压力").value(meteorology.getAirPre().toString()).unit("hPa").build());
devicePropertiesList.add(DeviceProperties.builder().name("光照度").value(meteorology.getGuangzhao().toString()).unit("lx").build());
devicePropertiesList.add(DeviceProperties.builder().name("光合有效辐射").value(meteorology.getFushe().toString()).unit("Lux").build());
devicePropertiesList.add(DeviceProperties.builder().name("累积雨量").value(meteorology.getSumRain().toString()).unit("mm").build());
devicePropertiesList.add(DeviceProperties.builder().name("瞬时雨量").value(meteorology.getInsRain().toString()).unit("mm").build());
devicePropertiesList.add(DeviceProperties.builder().name("日雨量").value(meteorology.getDayRain().toString()).unit("mm").build());
devicePropertiesList.add(DeviceProperties.builder().name("蒸发量").value(meteorology.getZhengfa().toString()).unit("t/h").build());
devicePropertiesList.add(DeviceProperties.builder().name("土壤温度").value(meteorology.getSoilTemp().toString()).unit("°C").build());
devicePropertiesList.add(DeviceProperties.builder().name("土壤湿度").value(meteorology.getSoilHumi().toString()).unit("%").build());
devicePropertiesList.add(DeviceProperties.builder().name("大气压力").value(meteorology.getAirPre()==null?"":meteorology.getAirPre().toString()).unit("hPa").build());
devicePropertiesList.add(DeviceProperties.builder().name("光照度").value(meteorology.getGuangzhao()==null?"":meteorology.getGuangzhao().toString()).unit("lx").build());
devicePropertiesList.add(DeviceProperties.builder().name("光合有效辐射").value(meteorology.getFushe()==null?"":meteorology.getFushe().toString()).unit("Lux").build());
devicePropertiesList.add(DeviceProperties.builder().name("累积雨量").value(meteorology.getSumRain()==null?"":meteorology.getSumRain().toString()).unit("mm").build());
devicePropertiesList.add(DeviceProperties.builder().name("瞬时雨量").value(meteorology.getInsRain()==null?"":meteorology.getInsRain().toString()).unit("mm").build());
devicePropertiesList.add(DeviceProperties.builder().name("日雨量").value(meteorology.getDayRain()==null?"":meteorology.getDayRain().toString()).unit("mm").build());
devicePropertiesList.add(DeviceProperties.builder().name("蒸发量").value(meteorology.getZhengfa()==null?"":meteorology.getZhengfa().toString()).unit("t/h").build());
devicePropertiesList.add(DeviceProperties.builder().name("土壤温度").value(meteorology.getSoilTemp()==null?"":meteorology.getSoilTemp().toString()).unit("°C").build());
devicePropertiesList.add(DeviceProperties.builder().name("土壤湿度").value(meteorology.getSoilHumi()==null?"":meteorology.getSoilHumi().toString()).unit("%").build());
Map<String,Object> info=new HashMap<>();
info.put("deviceEncoding", meteorology.getDeviceId());

View File

@ -93,4 +93,9 @@ private static final long serialVersionUID = 1L;
@ApiModelProperty("状态1在线0离线")
private Long status;
/** projectId */
@Excel(name = "projectId")
@ApiModelProperty("projectId")
private String projectId;
}

View File

@ -89,4 +89,9 @@ private static final long serialVersionUID = 1L;
/** 删除标志0代表存在2代表删除 */
private Integer delFlag;
/** 项目id */
@Excel(name = "项目id")
@ApiModelProperty("项目id")
private Long projectId;
}

View File

@ -99,4 +99,9 @@ private static final long serialVersionUID = 1L;
@ApiModelProperty("状态1在线0离线")
private Long status;
/** 项目id */
@Excel(name = "项目id")
@ApiModelProperty("项目id")
private Long projectId;
}

View File

@ -126,4 +126,11 @@ public class DeviceInformationMonitor extends BaseEntity
@ApiModelProperty("accessToken")
private String accessToken;
/** projectId */
@Excel(name = "projectId")
@ApiModelProperty("projectId")
private Long projectId;
}

View File

@ -90,4 +90,9 @@ private static final long serialVersionUID = 1L;
@ApiModelProperty("状态1在线0离线")
private Long status;
/** 项目id */
@Excel(name = "项目id")
@ApiModelProperty("项目id")
private Long projectId;
}

View File

@ -88,4 +88,9 @@ private static final long serialVersionUID = 1L;
@ApiModelProperty("状态1在线0离线")
private Long status;
/** 项目id */
@Excel(name = "项目id")
@ApiModelProperty("项目id")
private Long projectId;
}

View File

@ -34,13 +34,26 @@ public class DeviceInformationManager {
/**
* 获取所有设备
*/
public Map<String,Object> getAllDeviceCount() {
List<DeviceInformationMeteorology> meteorologieList = meteorologyMapper.selectDeviceInformationMeteorologyList(null);
List<DeviceInformationMiaoqing> miaoqingList = miaoqingMapper.selectDeviceInformationMiaoqingList(null);
List<DeviceInformationMoisture> moistureList= moistureMapper.selectDeviceInformationMoistureList(null);
List<DeviceInformationMonitor> monitorList = monitorMapper.selectDeviceInformationMonitorList(null);
List<DeviceInformationTargetpests> targetpestList= targetpestsMapper.selectDeviceInformationTargetpestsList(null);
List<DeviceInformationWorms> wormList = wormsMapper.selectDeviceInformationWormsList(null);
public Map<String,Object> getAllDeviceCount(Long projectId) {
System.err.println("projectId:"+projectId);
DeviceInformationMeteorology informationMeteorology=new DeviceInformationMeteorology();
informationMeteorology.setProjectId(String.valueOf(projectId));
DeviceInformationMiaoqing informationMiaoqing=new DeviceInformationMiaoqing();
informationMiaoqing.setProjectId(projectId);
DeviceInformationMoisture informationMoisture=new DeviceInformationMoisture();
informationMoisture.setProjectId(projectId);
DeviceInformationMonitor informationMonitor=new DeviceInformationMonitor();
informationMonitor.setProjectId(projectId);
DeviceInformationTargetpests informationTargetpests=new DeviceInformationTargetpests();
informationTargetpests.setProjectId(projectId);
DeviceInformationWorms informationWorms=new DeviceInformationWorms();
informationWorms.setProjectId(projectId);
List<DeviceInformationMeteorology> meteorologieList = meteorologyMapper.selectDeviceInformationMeteorologyList(informationMeteorology);
List<DeviceInformationMiaoqing> miaoqingList = miaoqingMapper.selectDeviceInformationMiaoqingList(informationMiaoqing);
List<DeviceInformationMoisture> moistureList= moistureMapper.selectDeviceInformationMoistureList(informationMoisture);
List<DeviceInformationMonitor> monitorList = monitorMapper.selectDeviceInformationMonitorList(informationMonitor);
List<DeviceInformationTargetpests> targetpestList= targetpestsMapper.selectDeviceInformationTargetpestsList(informationTargetpests);
List<DeviceInformationWorms> wormList = wormsMapper.selectDeviceInformationWormsList(informationWorms);
Map<String,Object> resp =new HashMap<>();
resp.put("meteorologieTotal",meteorologieList.size());

View File

@ -22,10 +22,11 @@
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="projectId" column="project_id" />
</resultMap>
<sql id="selectDeviceInformationMeteorologyVo">
select id, name, device_brand, device_type, device_encoding, type, longitude, latitude, installation_location, name_project, construction_year, docking_method, del_flag, create_time, create_by, update_time, update_by from iot_device_information_meteorology
select id, name, device_brand, device_type, device_encoding, type, longitude, latitude, installation_location, name_project, construction_year, docking_method, del_flag, create_time, create_by, update_time, update_by,project_id from iot_device_information_meteorology
</sql>
<select id="selectDeviceInformationMeteorologyList" parameterType="DeviceInformationMeteorology" resultMap="DeviceInformationMeteorologyResult">
@ -42,6 +43,7 @@
<if test="nameProject != null and nameProject != ''"> and name_project = #{nameProject}</if>
<if test="constructionYear != null "> and construction_year = #{constructionYear}</if>
<if test="dockingMethod != null and dockingMethod != ''"> and docking_method = #{dockingMethod}</if>
<if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
</where>
</select>
@ -69,6 +71,7 @@
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="projectId != null">project_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
@ -87,6 +90,7 @@
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="projectId != null">#{projectId},</if>
</trim>
</insert>
@ -109,6 +113,7 @@
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="projectId != null">project_id = #{projectId},</if>
</trim>
where id = #{id}
</update>

View File

@ -22,10 +22,11 @@
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="projectId" column="project_id" />
</resultMap>
<sql id="selectDeviceInformationMiaoqingVo">
select id, name, device_brand, device_type, device_encoding, type, longitude, latitude, installation_location, name_project, construction_year, docking_method, del_flag, create_time, create_by, update_time, update_by from iot_device_information_miaoQing
select id, name, device_brand, device_type, device_encoding, type, longitude, latitude, installation_location, name_project, construction_year, docking_method, del_flag, create_time, create_by, update_time, update_by,project_id from iot_device_information_miaoQing
</sql>
<select id="selectDeviceInformationMiaoqingList" parameterType="DeviceInformationMiaoqing" resultMap="DeviceInformationMiaoqingResult">
@ -42,6 +43,7 @@
<if test="nameProject != null and nameProject != ''"> and name_project = #{nameProject}</if>
<if test="constructionYear != null "> and construction_year = #{constructionYear}</if>
<if test="dockingMethod != null and dockingMethod != ''"> and docking_method = #{dockingMethod}</if>
<if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
</where>
</select>
@ -69,6 +71,7 @@
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="projectId != null">project_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
@ -87,6 +90,7 @@
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="projectId != null">#{projectId},</if>
</trim>
</insert>
@ -109,6 +113,7 @@
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="projectId != null">project_id = #{projectId},</if>
</trim>
where id = #{id}
</update>

View File

@ -23,10 +23,11 @@
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="projectId" column="project_id" />
</resultMap>
<sql id="selectDeviceInformationMoistureVo">
select id, name, products_name, device_brand, device_type, device_encoding, type, longitude, latitude, installation_location, name_project, construction_year, docking_method, del_flag, create_time, create_by, update_time, update_by from iot_device_information_moisture
select id, name, products_name, device_brand, device_type, device_encoding, type, longitude, latitude, installation_location, name_project, construction_year, docking_method, del_flag, create_time, create_by, update_time, update_by, project_id from iot_device_information_moisture
</sql>
<select id="selectDeviceInformationMoistureList" parameterType="DeviceInformationMoisture" resultMap="DeviceInformationMoistureResult">
@ -44,6 +45,7 @@
<if test="nameProject != null and nameProject != ''"> and name_project = #{nameProject}</if>
<if test="constructionYear != null "> and construction_year = #{constructionYear}</if>
<if test="dockingMethod != null and dockingMethod != ''"> and docking_method = #{dockingMethod}</if>
<if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
</where>
</select>
@ -72,6 +74,7 @@
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="projectId != null">project_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
@ -91,6 +94,7 @@
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="projectId != null">#{projectId},</if>
</trim>
</insert>
@ -114,6 +118,7 @@
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="projectId != null">project_id = #{projectId},</if>
</trim>
where id = #{id}
</update>

View File

@ -27,10 +27,11 @@
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="playUrl" column="play_url" />
<result property="projectId" column="project_id" />
</resultMap>
<sql id="selectDeviceInformationMonitorVo">
select id, name, device_encoding, type, longitude, latitude, installation_location, device_brand, device_type, name_project, construction_year, affiliation_township, management_leader, management_leader_telephone, management_unit, remarks_information, del_flag, create_time, create_by, update_time, update_by, play_url from iot_device_information_monitor
select id, name, device_encoding, type, longitude, latitude, installation_location, device_brand, device_type, name_project, construction_year, affiliation_township, management_leader, management_leader_telephone, management_unit, remarks_information, del_flag, create_time, create_by, update_time, update_by, play_url,project_id from iot_device_information_monitor
</sql>
<select id="selectDeviceInformationMonitorList" parameterType="DeviceInformationMonitor" resultMap="DeviceInformationMonitorResult">
@ -52,6 +53,7 @@
<if test="managementUnit != null and managementUnit != ''"> and management_unit = #{managementUnit}</if>
<if test="remarksInformation != null and remarksInformation != ''"> and remarks_information = #{remarksInformation}</if>
<if test="playUrl != null and playUrl != ''"> and play_url = #{playUrl}</if>
<if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
</where>
</select>
@ -84,6 +86,7 @@
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="playUrl != null">play_url,</if>
<if test="projectId != null">project_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
@ -107,6 +110,7 @@
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="playUrl != null">#{playUrl},</if>
<if test="projectId != null">#{projectId},</if>
</trim>
</insert>
@ -134,6 +138,7 @@
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="playUrl != null">play_url = #{playUrl},</if>
<if test="projectId != null">project_id = #{projectId},</if>
</trim>
where id = #{id}
</update>

View File

@ -22,10 +22,11 @@
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="name" column="name" />
<result property="projectId" column="project_id" />
</resultMap>
<sql id="selectDeviceInformationTargetpestsVo">
select id, device_brand, type, device_type, power_supply, device_encoding, address_code, installation_location, longitude, latitude, docking_method, del_flag, create_time, create_by, update_time, update_by, name from iot_device_information_targetPests
select id, device_brand, type, device_type, power_supply, device_encoding, address_code, installation_location, longitude, latitude, docking_method, del_flag, create_time, create_by, update_time, update_by, name,project_id from iot_device_information_targetPests
</sql>
<select id="selectDeviceInformationTargetpestsList" parameterType="DeviceInformationTargetpests" resultMap="DeviceInformationTargetpestsResult">
@ -42,6 +43,7 @@
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<if test="dockingMethod != null and dockingMethod != ''"> and docking_method = #{dockingMethod}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
</where>
</select>
@ -69,6 +71,7 @@
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="name != null">name,</if>
<if test="projectId != null">project_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceBrand != null">#{deviceBrand},</if>
@ -87,6 +90,7 @@
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="name != null">#{name},</if>
<if test="projectId != null">#{projectId},</if>
</trim>
</insert>
@ -109,6 +113,7 @@
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="name != null">name = #{name},</if>
<if test="projectId != null">project_id = #{projectId},</if>
</trim>
where id = #{id}
</update>

View File

@ -21,6 +21,7 @@
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="projectId" column="project_id" />
</resultMap>
<sql id="selectDeviceInformationWormsVo">
@ -40,6 +41,7 @@
<if test="nameProject != null and nameProject != ''"> and name_project = #{nameProject}</if>
<if test="constructionYear != null "> and construction_year = #{constructionYear}</if>
<if test="dockingMethod != null and dockingMethod != ''"> and docking_method = #{dockingMethod}</if>
<if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if>
</where>
</select>
@ -66,6 +68,7 @@
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="projectId != null">project_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
@ -83,6 +86,7 @@
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="projectId != null">#{projectId},</if>
</trim>
</insert>
@ -104,6 +108,7 @@
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="projectId != null">project_id = #{projectId},</if>
</trim>
where id = #{id}
</update>