设备信息
This commit is contained in:
parent
351e45cc09
commit
2dbb92a036
@ -1,8 +1,11 @@
|
||||
package com.fastbee.data.controller.aaScreenAgricultural;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.deviceInfo.mapper.DeviceInformationWormsMapper;
|
||||
import com.fastbee.deviceInfo.domain.*;
|
||||
import com.fastbee.deviceInfo.mapper.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@ -15,14 +18,29 @@ public class DeviceInfoController extends BaseController {
|
||||
@Autowired
|
||||
private DeviceInformationWormsMapper deviceInformationWormsMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMeteorologyMapper deviceInformationMeteorologyMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMoistureMapper deviceInformationMoistureMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationTargetpestsMapper deviceInformationTargetpestsMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMiaoqingMapper deviceInformationMiaoqingMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMonitorMapper deviceInformationMonitorMapper;
|
||||
/**
|
||||
* 查询虫情设备列表
|
||||
*/
|
||||
@GetMapping("/wormList")
|
||||
public AjaxResult getDeviceList() {
|
||||
return success();
|
||||
LambdaQueryWrapper<DeviceInformationMeteorology> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationMeteorology::getId,DeviceInformationMeteorology::getName,
|
||||
DeviceInformationMeteorology::getLongitude,DeviceInformationMeteorology::getLatitude);
|
||||
return success(deviceInformationMeteorologyMapper.selectList(queryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -30,7 +48,10 @@ public class DeviceInfoController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/weatherList")
|
||||
public AjaxResult getWeatherList() {
|
||||
return success();
|
||||
LambdaQueryWrapper<DeviceInformationWorms> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationWorms::getId,DeviceInformationWorms::getName,
|
||||
DeviceInformationWorms::getLongitude,DeviceInformationWorms::getLatitude);
|
||||
return success(deviceInformationWormsMapper.selectList(queryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -38,13 +59,39 @@ public class DeviceInfoController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/soilList")
|
||||
public AjaxResult getSoilList() {
|
||||
return success();
|
||||
LambdaQueryWrapper<DeviceInformationMoisture> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationMoisture::getId,DeviceInformationMoisture::getName,
|
||||
DeviceInformationMoisture::getLongitude,DeviceInformationMoisture::getLatitude);
|
||||
return success(deviceInformationMoistureMapper.selectList(queryWrapper));
|
||||
}
|
||||
/**
|
||||
* 查询杀虫灯设备列表
|
||||
*/
|
||||
@GetMapping("/lightList")
|
||||
public AjaxResult getLightList() {
|
||||
return success();
|
||||
LambdaQueryWrapper<DeviceInformationTargetpests> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationTargetpests::getId,DeviceInformationTargetpests::getName,
|
||||
DeviceInformationTargetpests::getLongitude,DeviceInformationTargetpests::getLatitude);
|
||||
return success(deviceInformationTargetpestsMapper.selectList(queryWrapper));
|
||||
}
|
||||
/**
|
||||
* 查询苗情设备列表
|
||||
*/
|
||||
@GetMapping("/miaoList")
|
||||
public AjaxResult getmiaoList() {
|
||||
LambdaQueryWrapper<DeviceInformationMiaoqing> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationMiaoqing::getId,DeviceInformationMiaoqing::getName,
|
||||
DeviceInformationMiaoqing::getLongitude,DeviceInformationMiaoqing::getLatitude);
|
||||
return success(deviceInformationMiaoqingMapper.selectList(queryWrapper));
|
||||
}
|
||||
/**
|
||||
* 查询监控站设备列表
|
||||
*/
|
||||
@GetMapping("/monitorList")
|
||||
public AjaxResult getmonitorList() {
|
||||
LambdaQueryWrapper<DeviceInformationMonitor> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(DeviceInformationMonitor::getId,DeviceInformationMonitor::getName,
|
||||
DeviceInformationMonitor::getLongitude,DeviceInformationMonitor::getLatitude);
|
||||
return success(deviceInformationMonitorMapper.selectList(queryWrapper));
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,6 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.fastbee.common.annotation.Excel;
|
||||
import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
@ -14,70 +12,75 @@ import com.fastbee.common.core.domain.BaseEntity;
|
||||
* 靶标害虫设备基础信息对象 iot_device_information_targetPests
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-11-18
|
||||
* @date 2024-11-27
|
||||
*/
|
||||
@ApiModel(value = "DeviceInformationTargetpests",description = "靶标害虫设备基础信息 iot_device_information_targetPests")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("iot_device_information_targetPests")
|
||||
public class DeviceInformationTargetpests extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 设备品牌 */
|
||||
@Excel(name = "设备品牌")
|
||||
@ApiModelProperty("设备品牌")
|
||||
@Excel(name = "设备品牌")
|
||||
@ApiModelProperty("设备品牌")
|
||||
private String deviceBrand;
|
||||
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
@ApiModelProperty("类型")
|
||||
@Excel(name = "类型")
|
||||
@ApiModelProperty("类型")
|
||||
private String type;
|
||||
|
||||
/** 设备型号 */
|
||||
@Excel(name = "设备型号")
|
||||
@ApiModelProperty("设备型号")
|
||||
@Excel(name = "设备型号")
|
||||
@ApiModelProperty("设备型号")
|
||||
private String deviceType;
|
||||
|
||||
/** 供电 */
|
||||
@Excel(name = "供电")
|
||||
@ApiModelProperty("供电")
|
||||
@Excel(name = "供电")
|
||||
@ApiModelProperty("供电")
|
||||
private String powerSupply;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
@ApiModelProperty("设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
@ApiModelProperty("设备编码")
|
||||
private String deviceEncoding;
|
||||
|
||||
/** 地址码 */
|
||||
@Excel(name = "地址码")
|
||||
@ApiModelProperty("地址码")
|
||||
@Excel(name = "地址码")
|
||||
@ApiModelProperty("地址码")
|
||||
private String addressCode;
|
||||
|
||||
/** 安装位置 */
|
||||
@Excel(name = "安装位置")
|
||||
@ApiModelProperty("安装位置")
|
||||
@Excel(name = "安装位置")
|
||||
@ApiModelProperty("安装位置")
|
||||
private String installationLocation;
|
||||
|
||||
/** 经度 */
|
||||
@Excel(name = "经度")
|
||||
@ApiModelProperty("经度")
|
||||
@Excel(name = "经度")
|
||||
@ApiModelProperty("经度")
|
||||
private String longitude;
|
||||
|
||||
/** 纬度 */
|
||||
@Excel(name = "纬度")
|
||||
@ApiModelProperty("纬度")
|
||||
@Excel(name = "纬度")
|
||||
@ApiModelProperty("纬度")
|
||||
private String latitude;
|
||||
|
||||
/** 对接方式 */
|
||||
@Excel(name = "对接方式")
|
||||
@ApiModelProperty("对接方式")
|
||||
@Excel(name = "对接方式")
|
||||
@ApiModelProperty("对接方式")
|
||||
private String dockingMethod;
|
||||
|
||||
/** 删除标志(0代表存在,2代表删除) */
|
||||
private Integer delFlag;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
@ApiModelProperty("名称")
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
@ -21,10 +21,11 @@
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="name" column="name" />
|
||||
</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 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 from iot_device_information_targetPests
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceInformationTargetpestsList" parameterType="DeviceInformationTargetpests" resultMap="DeviceInformationTargetpestsResult">
|
||||
@ -40,6 +41,7 @@
|
||||
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
|
||||
<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>
|
||||
</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="name != null">name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceBrand != null">#{deviceBrand},</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="name != null">#{name},</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="name != null">name = #{name},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
Loading…
x
Reference in New Issue
Block a user