虫情设备图片数据获取修改
This commit is contained in:
@ -60,8 +60,8 @@ public class DevLinkBaseService {
|
||||
//TODO 属性值历史数据,是否需要
|
||||
Object list = JSONUtil.parseObj(p).get("list");
|
||||
// System.err.print("name:"+name);
|
||||
System.err.print("key:"+key);
|
||||
System.err.println("------------value:"+value);
|
||||
// System.err.print("key:"+key);
|
||||
// System.err.println("------------value:"+value);
|
||||
//建立属性-值映射关系
|
||||
propertiesMap.put(key,value);
|
||||
// saveRealData(key,value,realData);
|
||||
|
@ -54,7 +54,7 @@ public class DevLinkMetDataService extends DevLinkBaseService {
|
||||
} catch (ParseException e) {
|
||||
throw new ServiceException("时间格式转换失败!");
|
||||
}
|
||||
System.err.println(build);
|
||||
System.err.println("气象设备实时数据:"+build);
|
||||
return build;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class DevLinkMiaoQingDataService extends DevLinkBaseService {
|
||||
} catch (ParseException e) {
|
||||
throw new ServiceException("时间格式转换失败!");
|
||||
}
|
||||
System.err.println(miaoqing);
|
||||
System.err.println("苗情设备光伏板实时数据:"+miaoqing);
|
||||
return miaoqing;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ public class DevLinkMoistureDataService extends DevLinkBaseService {
|
||||
} catch (ParseException e) {
|
||||
throw new ServiceException("时间格式转换失败!");
|
||||
}
|
||||
System.err.println(build);
|
||||
System.err.println("墒情设备实时数据:"+build);
|
||||
return build;
|
||||
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class DevLinkPhotovoltaicDataService extends DevLinkBaseService {
|
||||
throw new ServiceException("时间格式转换失败!");
|
||||
}
|
||||
|
||||
System.err.println(photovoltaic);
|
||||
System.err.println("光伏设备实时数据:"+photovoltaic);
|
||||
return photovoltaic;
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
|
@ -29,7 +29,7 @@ public class RenKeAuthorizationService {
|
||||
//判断token是否过期
|
||||
String cacheToken = stringRedisTemplate.opsForValue().get("renke:user:token");
|
||||
if (!Objects.isNull(cacheToken)){
|
||||
System.err.println("缓存中获取token:"+cacheToken);
|
||||
// System.err.println("缓存中获取token:"+cacheToken);
|
||||
return cacheToken;
|
||||
}
|
||||
//获取token
|
||||
|
@ -40,10 +40,12 @@ public class RenkeDeviceDataService {
|
||||
.form("deviceAddrs", deviceAddrs)
|
||||
.execute();
|
||||
String respBodyStr = response.body();
|
||||
if(StringUtils.isBlank(respBodyStr)) {
|
||||
throw new RuntimeException("获取设备实时数据失败!");
|
||||
}
|
||||
|
||||
JSONObject respBody = JSONUtil.parseObj(respBodyStr);
|
||||
// System.err.println(respBodyStr);
|
||||
if(!respBody.get("code") .toString().equals("1000")){
|
||||
throw new ServiceException("获取设备实时数据失败!");
|
||||
}
|
||||
JSONArray realtimeDataList = JSONUtil.parseArray(respBody.get("data"));
|
||||
JSONObject jsonObject = JSONUtil.parseObj(realtimeDataList.get(0));
|
||||
JSONObject jsonObject1 = JSONUtil.parseObj(jsonObject.get("data"));
|
||||
@ -52,27 +54,42 @@ public class RenkeDeviceDataService {
|
||||
//反序列化封装基础数据
|
||||
deviceRealtimedataWorms = JSONUtil.toBean(jsonObject1, DeviceRealtimedataWorms.class);
|
||||
//获取虫情设备关键数据
|
||||
HttpResponse response1 = HttpRequest.get("http://api.farm.0531yun.cn/api/v2.0/worm/deviceData/getWormDataList")
|
||||
HttpResponse response1 = HttpRequest.get("http://api.farm.0531yun.cn/api/v2.0/worm/deviceData/getWormDataAndWormDataAIBy?deviceAddr="+deviceAddrs)
|
||||
.header("token", token)
|
||||
.form("deviceAddrs", deviceAddrs)
|
||||
//开始时间是5分钟前
|
||||
.form("beginTime", DateTimeCalculationUtils.format(DateTimeCalculationUtils.minus(5, ChronoUnit.MINUTES)))
|
||||
.form("endTime", DateUtils.getNowDate())
|
||||
.form("pages", 1)
|
||||
.form("limit", 10)
|
||||
// .form( "deviceAddr", deviceAddrs)
|
||||
// //开始时间是5分钟前
|
||||
// .form("beginTime", DateTimeCalculationUtils.format(DateTimeCalculationUtils.minus(5, ChronoUnit.MINUTES)))
|
||||
// .form("endTime", DateUtils.getNowDate())
|
||||
// .form("pages", 1)
|
||||
// .form("limit", 10)
|
||||
.execute();
|
||||
String respBodyStr1 = response.body();
|
||||
if(StringUtils.isBlank(respBodyStr1)) {
|
||||
|
||||
// HttpResponse response1 = HttpRequest.get("http://api.farm.0531yun.cn/api/v2.0/worm/deviceData/getWormDataList")
|
||||
// .header("token", token)
|
||||
// .form( "deviceAddr", deviceAddrs)
|
||||
// //开始时间是5分钟前
|
||||
// .form("beginTime", DateTimeCalculationUtils.format(DateTimeCalculationUtils.minus(5, ChronoUnit.MINUTES)))
|
||||
// .form("endTime", DateUtils.getNowDate())
|
||||
// .form("pages", 1)
|
||||
// .form("limit", 10)
|
||||
// .execute();
|
||||
|
||||
|
||||
String respBodyStr1 = response1.body();
|
||||
|
||||
JSONObject respBody1 = JSONUtil.parseObj(respBodyStr1);
|
||||
// System.err.println(respBodyStr1);
|
||||
if(!respBody1.get("code") .toString().equals("1000")) {
|
||||
throw new RuntimeException("获取设备实时数据失败!");
|
||||
}
|
||||
JSONObject jsonObject2 = JSONUtil.parseObj(respBodyStr1);
|
||||
JSONObject jsonObject3 = JSONUtil.parseObj(jsonObject2.get("data"));
|
||||
JSONArray jsonArray = JSONUtil.parseArray(jsonObject3.get("rows"));
|
||||
JSONObject jsonObject4 = JSONUtil.parseObj(jsonArray.get(0));
|
||||
System.err.println(respBody1);
|
||||
JSONArray jsonArray = JSONUtil.parseArray(respBody1.get("data"));
|
||||
JSONObject entries = JSONUtil.parseObj(jsonArray.get(0));
|
||||
|
||||
//获取拍照图片
|
||||
Object imagesUrl = jsonObject4.get("imagesUrl");
|
||||
Object imagesUrl = entries .get("imagesUrl");
|
||||
//获取虫情分析后的图片地址
|
||||
Object analyseCoordUrl = jsonObject4.get("analyseCoordUrl");
|
||||
Object analyseCoordUrl = entries .get("analyseCoordUrl");
|
||||
|
||||
deviceRealtimedataWorms.setPestPhotos(analyseCoordUrl.toString());
|
||||
deviceRealtimedataWorms.setCamera(imagesUrl.toString());
|
||||
@ -86,14 +103,21 @@ public class RenkeDeviceDataService {
|
||||
} catch (ParseException e) {
|
||||
throw new ServiceException("时间格式转换失败!");
|
||||
}
|
||||
System.err.println("设备实时数据:"+deviceRealtimedataWorms);
|
||||
System.err.println("虫情设备实时数据:"+deviceRealtimedataWorms);
|
||||
return deviceRealtimedataWorms;
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
RenkeDeviceDataService renkeDeviceDataService = new RenkeDeviceDataService();
|
||||
renkeDeviceDataService.setData("1017240042");
|
||||
// RenkeDeviceDataService renkeDeviceDataService = new RenkeDeviceDataService();
|
||||
// renkeDeviceDataService.setData("1017240042");
|
||||
HttpResponse response1 = HttpRequest.get("http://api.farm.0531yun.cn/api/v2.0/worm/deviceData/getWormDataAndWormDataAIBy?deviceAddr="+"1017240042")
|
||||
.header("token", "834991732092248683")
|
||||
.execute();
|
||||
String respBodyStr1 = response1.body();
|
||||
|
||||
JSONObject respBody1 = JSONUtil.parseObj(respBodyStr1);
|
||||
System.err.println(respBodyStr1);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import cn.hutool.json.JSONObject;
|
||||
public class TianqiApi {
|
||||
|
||||
/**
|
||||
* 获取用户所有设备信息
|
||||
* 获取未来天气预测
|
||||
*/
|
||||
public static JSONObject QitianApi() {
|
||||
|
||||
@ -28,6 +28,22 @@ public class TianqiApi {
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* 获取天气实况
|
||||
*/
|
||||
public static JSONObject weatherNow() {
|
||||
String url = UrlConstant.ShishiApi + "?key=" +
|
||||
UrlConstant.PrivateKey +
|
||||
"&location=YBMUBR41ZWVC&language=zh-Hans&unit=c";//指定URL
|
||||
HttpResponse execute = HttpUtil.createGet(url).execute();
|
||||
if (execute.getStatus() == HttpStatus.HTTP_OK) {
|
||||
JSONObject jsonObject = new JSONObject(execute.body());
|
||||
// System.out.println("jsonObject = " + jsonObject);
|
||||
return jsonObject;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -56,20 +72,6 @@ public class TianqiApi {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// String url="https://api.seniverse.com/v3/location/search.json?key="+UrlConstant.PrivateKey+"&q=绥滨";
|
||||
// HttpResponse execute = HttpUtil.createGet(url).execute();
|
||||
// if (execute.getStatus() == HttpStatus.HTTP_OK) {
|
||||
// JSONObject jsonObject = new JSONObject(execute.body());
|
||||
// System.out.println("jsonObject = " + jsonObject);
|
||||
// }
|
||||
String url = UrlConstant.QitianApi + "?key=" +
|
||||
UrlConstant.PrivateKey +
|
||||
"&location=YBMUBR41ZWVC&language=zh-Hans&unit=c";//指定URL
|
||||
HttpResponse execute = HttpUtil.createGet(url).execute();
|
||||
if (execute.getStatus() == HttpStatus.HTTP_OK) {
|
||||
JSONObject jsonObject = new JSONObject(execute.body());
|
||||
System.out.println("jsonObject = " + jsonObject);
|
||||
|
||||
}
|
||||
TianqiApi.weatherNow();
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
@Service
|
||||
@ -35,45 +36,65 @@ public class YingshiyunService {
|
||||
String body = StrUtil.format("appKey={}&appSecret={}", appKey, appSecret);
|
||||
HttpResponse response = HttpRequest.post(AUTH_URL)
|
||||
.body(body).execute();
|
||||
|
||||
JSONObject jsonObject = JSONUtil.parseObj(response.body());
|
||||
String accessToken = JSONUtil.parseObj(jsonObject.get("data")).get("accessToken").toString();
|
||||
stringRedisTemplate.opsForValue().set("yingshiyun:user:accessToken",accessToken, 60*60*24*6);
|
||||
// System.err.println(jsonObject);
|
||||
if( !jsonObject.get("code").toString().equals("200")){
|
||||
throw new RuntimeException("获取萤石云token失败!");
|
||||
}
|
||||
JSONObject data = JSONUtil.parseObj(jsonObject.get("data"));
|
||||
String accessToken = data.get("accessToken").toString();
|
||||
|
||||
stringRedisTemplate.opsForValue().set("yingshiyun:user:accessToken",accessToken, 60*60*24*6, TimeUnit.MILLISECONDS);
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
//获取视频播放地址
|
||||
public String getVideoPlayUrl(String deviceSerial){
|
||||
public Map<String,Object> getVideoPlayUrl(String deviceSerial){
|
||||
String accessToken = getAuth();
|
||||
// System.err.println(accessToken);
|
||||
String VIDEO_PLAY_URL = "https://open.ys7.com/api/lapp/v2/live/address/get";
|
||||
String body = StrUtil.format("accessToken={}&deviceSerial={}",accessToken ,deviceSerial );
|
||||
String body = StrUtil.format("accessToken={}&deviceSerial={}&protocol={}",accessToken ,deviceSerial,"2");
|
||||
|
||||
HttpResponse response = HttpRequest.post(VIDEO_PLAY_URL)
|
||||
.form(body).execute();
|
||||
.body(body).execute();
|
||||
JSONObject jsonObject = JSONUtil.parseObj(response.body());
|
||||
String videoPlayUrl = JSONUtil.parseObj(jsonObject.get("data")).get("url").toString();
|
||||
String expireTime = JSONUtil.parseObj(jsonObject.get("data")).get("expireTime").toString();
|
||||
Map<String, Object> resp= new HashMap<>();
|
||||
resp.put("videoPlayUrl",videoPlayUrl);
|
||||
resp.put("expireTime",expireTime);
|
||||
resp.put("deviceSerial",deviceSerial);
|
||||
return videoPlayUrl;
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
if(!jsonObject.get("code").toString().equals("200")){
|
||||
return map;
|
||||
}
|
||||
// System.err.println(jsonObject);
|
||||
JSONObject data = JSONUtil.parseObj(jsonObject.get("data"));
|
||||
// System.err.println(data);
|
||||
String playUrl = data.get("url").toString();
|
||||
|
||||
|
||||
map.put("playUrl",playUrl);
|
||||
map.put("accessToken",accessToken);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
YingshiyunService yingshiyunService = new YingshiyunService();
|
||||
yingshiyunService.getAuth();
|
||||
long timeStamp = 1731571309231L;
|
||||
Date date = new Date(timeStamp);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
sdf.setTimeZone(java.util.TimeZone.getTimeZone("Asia/Shanghai"));
|
||||
String formattedDate = sdf.format(date);
|
||||
System.out.println(formattedDate);
|
||||
// 鉴权请求
|
||||
String AUTH_URL = "https://open.ys7.com/api/lapp/token/get";
|
||||
String appKey = "b21f910dc7044d668e7625a3c0392e62";
|
||||
String appSecret = "b4beff5f8f6694dd6993c8c5b618417b";
|
||||
// 构建请求体参数
|
||||
String body = StrUtil.format("appKey={}&appSecret={}", appKey, appSecret);
|
||||
HttpResponse response = HttpRequest.post(AUTH_URL)
|
||||
.body(body).execute();
|
||||
JSONObject jsonObject = JSONUtil.parseObj(response.body());
|
||||
System.err.println(jsonObject);
|
||||
if( !jsonObject.get("code").toString().equals("200")){
|
||||
throw new RuntimeException("获取萤石云token失败!");
|
||||
}
|
||||
JSONObject data = JSONUtil.parseObj(jsonObject.get("data"));
|
||||
String accessToken = data.get("accessToken").toString();
|
||||
System.err.println(accessToken);
|
||||
}
|
||||
}
|
||||
|
@ -17,96 +17,109 @@ import com.fastbee.common.core.domain.BaseEntity;
|
||||
* 监控站设备基础信息对象 iot_device_information_monitor
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-11-18
|
||||
* @date 2024-11-20
|
||||
*/
|
||||
@ApiModel(value = "DeviceInformationMonitor",description = "监控站设备基础信息 iot_device_information_monitor")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("iot_device_information_monitor")
|
||||
@TableName ("iot_device_information_monitor")
|
||||
public class DeviceInformationMonitor 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 name;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
@ApiModelProperty("设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
@ApiModelProperty("设备编码")
|
||||
private String deviceEncoding;
|
||||
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
@ApiModelProperty("类型")
|
||||
@Excel(name = "类型")
|
||||
@ApiModelProperty("类型")
|
||||
private String type;
|
||||
|
||||
/** 经度 */
|
||||
@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 installationLocation;
|
||||
|
||||
/** 设备品牌 */
|
||||
@Excel(name = "设备品牌")
|
||||
@ApiModelProperty("设备品牌")
|
||||
@Excel(name = "设备品牌")
|
||||
@ApiModelProperty("设备品牌")
|
||||
private String deviceBrand;
|
||||
|
||||
/** 设备型号 */
|
||||
@Excel(name = "设备型号")
|
||||
@ApiModelProperty("设备型号")
|
||||
@Excel(name = "设备型号")
|
||||
@ApiModelProperty("设备型号")
|
||||
private String deviceType;
|
||||
|
||||
/** 项目的名称 */
|
||||
@Excel(name = "项目的名称")
|
||||
@ApiModelProperty("项目的名称")
|
||||
@Excel(name = "项目的名称")
|
||||
@ApiModelProperty("项目的名称")
|
||||
private String nameProject;
|
||||
|
||||
/** 建设年度 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "建设年度", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("建设年度")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "建设年度", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("建设年度")
|
||||
private Date constructionYear;
|
||||
|
||||
/** 所属乡镇 */
|
||||
@Excel(name = "所属乡镇")
|
||||
@ApiModelProperty("所属乡镇")
|
||||
@Excel(name = "所属乡镇")
|
||||
@ApiModelProperty("所属乡镇")
|
||||
private String affiliationTownship;
|
||||
|
||||
/** 管理负责人 */
|
||||
@Excel(name = "管理负责人")
|
||||
@ApiModelProperty("管理负责人")
|
||||
@Excel(name = "管理负责人")
|
||||
@ApiModelProperty("管理负责人")
|
||||
private String managementLeader;
|
||||
|
||||
/** 管理负责人电话 */
|
||||
@Excel(name = "管理负责人电话")
|
||||
@ApiModelProperty("管理负责人电话")
|
||||
@Excel(name = "管理负责人电话")
|
||||
@ApiModelProperty("管理负责人电话")
|
||||
private String managementLeaderTelephone;
|
||||
|
||||
/** 管理单位 */
|
||||
@Excel(name = "管理单位")
|
||||
@ApiModelProperty("管理单位")
|
||||
@Excel(name = "管理单位")
|
||||
@ApiModelProperty("管理单位")
|
||||
private String managementUnit;
|
||||
|
||||
/** 备注信息 */
|
||||
@Excel(name = "备注信息")
|
||||
@ApiModelProperty("备注信息")
|
||||
@Excel(name = "备注信息")
|
||||
@ApiModelProperty("备注信息")
|
||||
private String remarksInformation;
|
||||
|
||||
/** 删除标志(0代表存在,2代表删除) */
|
||||
private Integer delFlag;
|
||||
|
||||
//------------------------------------------------------------------------------------业务字段---------------
|
||||
|
||||
|
||||
/** 监控播放地址 */
|
||||
@Excel(name = "监控播放地址")
|
||||
@ApiModelProperty("监控播放地址")
|
||||
private String playUrl;
|
||||
|
||||
/** accessToken */
|
||||
@Excel(name = "accessToken")
|
||||
@ApiModelProperty("accessToken")
|
||||
private String accessToken;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,57 @@
|
||||
package com.fastbee.deviceInfo.manager;
|
||||
|
||||
import com.fastbee.deviceInfo.domain.*;
|
||||
import com.fastbee.deviceInfo.mapper.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class DeviceInformationManager {
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMeteorologyMapper meteorologyMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMiaoqingMapper miaoqingMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMoistureMapper moistureMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationMonitorMapper monitorMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationTargetpestsMapper targetpestsMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationWormsMapper wormsMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有设备
|
||||
*/
|
||||
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);
|
||||
|
||||
Map<String,Object> resp =new HashMap<>();
|
||||
resp.put("meteorologieTotal",meteorologieList.size());
|
||||
resp.put("miaoqingTotal",miaoqingList.size());
|
||||
resp.put("moistureTotal",moistureList.size());
|
||||
resp.put("monitorTotal",monitorList.size());
|
||||
resp.put("targetpestTotal",targetpestList.size());
|
||||
resp.put("wormTotal",wormList.size());
|
||||
resp.put("photovoltaicTotal",miaoqingList.size());
|
||||
return resp;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -26,10 +26,11 @@
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="playUrl" column="play_url" />
|
||||
</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 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 from iot_device_information_monitor
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceInformationMonitorList" parameterType="DeviceInformationMonitor" resultMap="DeviceInformationMonitorResult">
|
||||
@ -50,6 +51,7 @@
|
||||
<if test="managementLeaderTelephone != null and managementLeaderTelephone != ''"> and management_leader_telephone = #{managementLeaderTelephone}</if>
|
||||
<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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -81,6 +83,7 @@
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="playUrl != null">play_url,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
@ -103,6 +106,7 @@
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="playUrl != null">#{playUrl},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -129,6 +133,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="playUrl != null">play_url = #{playUrl},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
Reference in New Issue
Block a user