1.sql添加返回字段

2.添加注释
dev
862857010@qq.com 2 years ago
parent ea0a20f1ea
commit 2239236e90
  1. 2
      cjy-project/src/main/resources/mapper/iotInfo/IotInfoMapper.xml
  2. 6
      ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/EquipmentInfoServiceImpl.java
  3. 10
      ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/EquipmentInfoTask.java

@ -449,7 +449,7 @@
<select id="selectIotInfoForList" resultType="com.cjy.iot.domain.IotInfo">
select t1.id,t1.resource_name as resourceName,t1.lon,t1.lat,t1.monitor_path as monitorPath
select t1.id,t1.resource_name as resourceName,t1.lon,t1.lat,t1.monitor_path as monitorPath,t1.device_index as deviceIndex
from b_iot_info t1
<where>
<if test="type != null and type != ''">and t1.type = #{type}</if>

@ -63,6 +63,7 @@ public class EquipmentInfoServiceImpl implements EquipmentInfoService {
return;
}
enterpriseInfo.setOrganName(params.toString());
//获取用户的organCode
List<EnterpriseInfoExtend> enterpriseInfoExtends = enterpriseInfoService.selectEnterpriseInfoList(enterpriseInfo);
if (CollectionUtils.isEmpty(enterpriseInfoExtends)) {
return;
@ -71,6 +72,7 @@ public class EquipmentInfoServiceImpl implements EquipmentInfoService {
enterpriseInfoExtends.stream().forEach(r -> {
TpLinkConfig tpLinkConfig = new TpLinkConfig();
tpLinkConfig.setOrganCode(r.getOrganCode());
//获取对应organCode的 ak sk
List<TpLinkConfig> tpLinkConfigs = tpLinkConfigService.selectTpLinkConfigList(tpLinkConfig);
if (!CollectionUtils.isEmpty(tpLinkConfigs)) {
tpLinkConfigs.stream().forEach(t -> {
@ -82,7 +84,7 @@ public class EquipmentInfoServiceImpl implements EquipmentInfoService {
map.put("limit", 100);
map1.put("enterpriseId", t.getEnterpriseId());
map.put("filterAnd", map1);
//获取设备列表
//获取设备列表 接口调用
String iotInfo = getIotInfo(t, HttpMethod.POST.toString(), ApiConstants.EquipmentUrl, JSONObject.toJSONString(map));
System.out.println(iotInfo);
JSONObject jsonObject = JSONObject.parseObject(iotInfo);
@ -131,7 +133,6 @@ public class EquipmentInfoServiceImpl implements EquipmentInfoService {
//获取企业信息 获取到的企业ID 保存到配置表
String enterprise = getIotInfo(t, HttpMethod.POST.toString(), ApiConstants.EnterpriseUrl, JSONObject.toJSONString(map));
JSONObject json = JSONObject.parseObject(enterprise);
if (json.get("error_code").toString().equals("0")) {
//获取企业信息
map.put("start", 1);
@ -233,6 +234,7 @@ public class EquipmentInfoServiceImpl implements EquipmentInfoService {
map1.put("queryCategory", "device");
map1.put("regionAccumulate", 0);
map1.put("accuracy", "hour");
//TODO 不知道这个参数的作用
List<Long> timeList = new ArrayList<>();
timeList.add(2023051800L);
timeList.add(2023051901L);

@ -24,7 +24,7 @@ public class EquipmentInfoTask {
}
/**
* 获取企业信息
* 获取企业信息 第一步执行
*/
public void getEnterpriseConfigInfoList(String params) {
System.out.println("获取企业信息 start");
@ -33,7 +33,7 @@ public class EquipmentInfoTask {
}
/**
* 获取项目信息
* 获取项目信息 第二步执行
*/
public void getProjectConfigInfoList(String params) {
System.out.println("获取项目信息 start");
@ -42,7 +42,7 @@ public class EquipmentInfoTask {
}
/**
* 获取分组信息
* 获取分组信息 第三步执行
*/
public void getGroupInfoList(String params) {
System.out.println("获取分组信息 start");
@ -54,8 +54,8 @@ public class EquipmentInfoTask {
* 获取客流信息
*/
public void getPassengerFlowInfoList(String params) {
System.out.println("获取分组信息 start");
System.out.println("获取客流信息 start");
equipmentInfoService.selectPassengerFlowInfo(params);
System.out.println("获取分组信息 end");
System.out.println("获取客流信息 end");
}
}

Loading…
Cancel
Save