Commit 824232d8 authored by 李腾威's avatar 李腾威

BUG修改

parent 964efebd
......@@ -890,11 +890,18 @@ public class TopographyController extends AbstractBaseController {
for (String str : maps.keySet()) {
map.put(str, maps.get(str).stream().map(TopographyIotIndexTrendVo::getIotData).collect(Collectors.toList()));
}
Map<String, Long> mapIndex = new HashMap<>();
for (String str : maps.keySet()) {
mapIndex.put(str, maps.get(str).get(0).getId());
}
List<IotIndexResVo> res = new ArrayList<>();
for (String s : map.keySet()) {
for (String s : mapIndex.keySet()) {
IotIndexResVo vo = new IotIndexResVo();
LambdaQueryWrapper <EquipmentIndex> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(EquipmentIndex::getPerfQuotaDefinitionId, s);
queryWrapper.eq(EquipmentIndex::getId, mapIndex.get(s));
EquipmentIndex index = iEquipmentIndexService.getOne(queryWrapper);
vo.setIotData(map.get(s));
vo.setId(index.getId());
......@@ -904,6 +911,11 @@ public class TopographyController extends AbstractBaseController {
vo.setTimes(dates);
res.add(vo);
}
for (IotIndexResVo s : res) {
s.setIotData(map.get(s.getNameKey()));
s.setTimes(dates);
}
return CommonResponseUtil.success(res);
}
}
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import java.net.ProtocolException;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.component.rule.config.ClazzUtils;
import com.yeejoin.amos.feign.rule.Rule;
import com.yeejoin.amos.feign.rule.client.RuleClient;
import com.yeejoin.amos.feign.rule.model.FactBaseModel;
import io.protostuff.LinkedBuffer;
import io.protostuff.ProtostuffIOUtil;
import io.protostuff.Schema;
import io.protostuff.runtime.RuntimeSchema;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
......@@ -41,6 +55,7 @@ public class RuleAlertCalledService {
@Autowired
AlertCalledServiceImpl alertCalledServiceImpl;
/**
*
* <pre>
......@@ -73,8 +88,14 @@ public class RuleAlertCalledService {
}
System.out.println("触发规则调用--------------西咸机场119接处警规则/alertCalledRule");
//触发规则
ruleTrigger.publish(alertCalledRo, "西咸机场119接处警规则/alertCalledRule", new String[0]);
// ruleTrigger.publish(alertCalledRo, "西咸机场119接处警规则/alertCalledRule", new String[0]);
FactBaseModel factBaseModel = new FactBaseModel();
factBaseModel.setPackageId("西咸机场119接处警规则/alertCalledRule");
HashMap<String, byte[]> map = new HashMap<>();
map.put("com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo", ClazzUtils.serializableObject(alertCalledRo));
factBaseModel.setFactMap(map);
Rule.ruleClient.fireRule(factBaseModel);
return true;
}
......@@ -327,7 +348,16 @@ public class RuleAlertCalledService {
alertCallePowerTransferRo.setContent(stringBuffer.toString());
}
// 触发规则
ruleTrigger.publish(alertCallePowerTransferRo, "西咸机场119接处警规则/powerTransferCalledRule", new String[0]);
ruleTrigger.publish(alertCallePowerTransferRo, "西咸机场119接处警规则/powerTransferCalledRule", new String[0]); // 废弃
// System.out.println("触发规则调用--------------西咸机场119接处警规则/powerTransferCalledRule");
// FactBaseModel factBaseModel = new FactBaseModel();
// factBaseModel.setPackageId("西咸机场119接处警规则/powerTransferCalledRule");
// HashMap<String, byte[]> map = new HashMap<>();
//
// map.put("com.yeejoin.amos.boot.module.jcs.api.dto.AlertCallePowerTransferRo", ClazzUtils.serializableObject(alertCallePowerTransferRo));
// factBaseModel.setFactMap(map);
// Rule.ruleClient.fireRule(factBaseModel);
return true;
}
......
......@@ -10,7 +10,7 @@
instance_id,
date_format(install_date,'%Y-%m-%d') AS installDate,
date_format(first_maintenance_date,'%Y-%m-%d') AS firstMaintenanceDate,
charge_person as chargePerson,
charge_person_name as chargePerson,
(select name from wl_manufacturer_info where id = construction_unit) as constructionUnit,
(select name from wl_manufacturer_info where id = maintenance_unit) as maintenanceUnit,
(select name from wl_equipment_category where id = system_type) as systemType,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment