Commit e8146499 authored by suhuiguang's avatar suhuiguang

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents f58d93c0 05004896
package com.yeejoin.amos.kgd.config; package com.yeejoin.amos.kgd.config;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yeejoin.amos.boot.core.utils.RestTemplateUtil;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.component.robot.AmosRequestContext; import com.yeejoin.amos.component.robot.AmosRequestContext;
import com.yeejoin.amos.feign.privilege.Privilege; import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.kgd.message.Constant;
import io.github.classgraph.json.JSONUtils;
import io.micrometer.core.instrument.util.JsonUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.core.io.InputStreamResource;
import org.springframework.core.io.Resource;
import org.springframework.http.*;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.context.SpringContextHelper; import org.typroject.tyboot.core.foundation.context.SpringContextHelper;
import java.io.*; import java.io.*;
import java.net.Socket; import java.net.Socket;
import java.util.Objects; import java.text.SimpleDateFormat;
import java.util.*;
/** /**
* @Author: xl * @Author: xl
* @Description: * @Description:
* @Date: 2023/10/10 16:21 * @Date: 2023/10/10 16:21
*/ */
public class ClientHandler implements Runnable { @SuppressWarnings("UnnecessarySemicolon")
public class ClientHandler<path> implements Runnable {
private static final Logger log = LoggerFactory.getLogger(ClientHandler.class); private static final Logger log = LoggerFactory.getLogger(ClientHandler.class);
private Socket socket; private final Socket socket;
private final String hostAndPort;
public ClientHandler(Socket socket) { public ClientHandler(Socket socket, String hostAndPort) {
this.socket = socket; this.socket = socket;
this.hostAndPort = hostAndPort;
} }
@Override @Override
public void run() { public void run() {
try { try {
// 获取输入流和输出流 // 获取输入流和输出流
InputStream inputStream = socket.getInputStream(); InputStream ips = socket.getInputStream();
// 处理客户端请求 // 处理客户端请求
log.info("收到客户端数据: "); log.info("收到客户端数据: ");
String path = this.upload2Maas(inputStream); String path = this.upload2Maas(ips, hostAndPort);
log.info("调用maas服务返回结果: {}", path); log.info("调用maas服务返回结果: {}", path);
// 关闭连接 // 关闭连接
byte[] bytes = path.getBytes();
socket.close(); socket.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
// 上传maas逻辑写到这⬇⬇⬇⬇⬇⬇⬇,然后把maas返回的资源路径返回,后续作为客户端的回传信息 private String upload2Maas(InputStream inputStream, String hostAndPort) throws IOException {
private String upload2Maas(InputStream inputStream) {
AmosRequestContext robotAuthentication = SpringContextHelper.getBean(AmosRequestContext.class); AmosRequestContext robotAuthentication = SpringContextHelper.getBean(AmosRequestContext.class);
if (Objects.nonNull(robotAuthentication)) { if (Objects.nonNull(robotAuthentication)) {
RequestContext.setAppKey(robotAuthentication.getAppKey()); String token = robotAuthentication.getToken();
RequestContext.setProduct(robotAuthentication.getProduct()); String product = robotAuthentication.getProduct();
RequestContext.setToken(robotAuthentication.getToken()); String appKey = robotAuthentication.getAppKey();
//上传maas
//upload
String uploadUrl = "http://" + hostAndPort + "/maas/dsm/excel/upload";
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
Resource resource = new InputStreamResource(inputStream) {
@Override
public long contentLength() throws IOException {
long size = inputStream.available();
return size;
} }
// 测试案例,上传maas需要token,用机器人账户登录上传,此处修改为真实请求⬇⬇⬇⬇⬇⬇⬇ @Override
FeignClientResult<AgencyUserModel> getme = Privilege.agencyUserClient.getme(); public String getFilename() {
System.out.println(JSON.toJSONString(getme)); return "xlsx";
}
};
params.add("file", resource);
HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, getHeader(token,product,appKey,hostAndPort,true));
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<String> responseEntity = restTemplate.exchange(uploadUrl, HttpMethod.POST, requestEntity, String.class);
String body = responseEntity.getBody();
JSONObject jsonObject = JSONObject.parseObject(body);
String result = jsonObject.getString("result");
String path = jsonObject.getString("path");
if (jsonObject.getString("status").equals("200")){
log.info("路径:"+path+"/"+result);
}else {
throw new RuntimeException("返回状态码错误");
}
//sheets
String sheetsUrl = "http://" + hostAndPort + "/maas/dsm/excel/sheets";
Map<String, String> sheetsParams = new HashMap<>();
sheetsParams.put("fileName", result);
HttpEntity<Map<String, String>> sheetsRequestEntity = new HttpEntity<>(sheetsParams, getHeader(token,product,appKey,hostAndPort,false));
ResponseEntity<String> sheetsResponseEntity = restTemplate.exchange(sheetsUrl, HttpMethod.POST, sheetsRequestEntity, String.class);
String sheetsResponseEntityBody = sheetsResponseEntity.getBody();
JSONObject sheetJsonObject = JSONObject.parseObject(sheetsResponseEntityBody);
JSONArray sheetArray = sheetJsonObject.getJSONArray("result");
//result可能有多个sheet
String[] sheets = new String[sheetArray.size()];
for (int i = 0; i < sheetArray.size(); i++) {
sheets[i] = (String) sheetArray.getJSONObject(i).get("sheet");
}
log.info("sheets的结果是:" + sheetsResponseEntityBody);
//datasource(name:excel+时间戳)
// 获取当前时间的时间戳
long timestamp = System.currentTimeMillis();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String timestampStr = sdf.format(new Date(timestamp));
String datasourceUrl = "http://" + hostAndPort + "/maas/dsm/datasources";
JSONObject all = new JSONObject();
JSONObject oneJson = new JSONObject();
all.put("filepath",result);
for (int i = 0; i < sheetArray.size(); i++) {
oneJson.put(sheets[i],sheetArray.get(i));
}
all.put("config",oneJson);
Map<String, String> datasourceParams = new HashMap<>();
datasourceParams.put("detail", all.toString());
datasourceParams.put("groupid", "72684d79-5d28-4086-9f21-5b091b6675db");
datasourceParams.put("subtype", "excel");
datasourceParams.put("name", "excel"+timestampStr);
datasourceParams.put("type", "File");
HttpEntity<Map<String, String>> datasourceRequestEntity = new HttpEntity<>(datasourceParams, getHeader(token,product,appKey,hostAndPort,false));
ResponseEntity<String> datasourceResponseEntity = restTemplate.exchange(datasourceUrl, HttpMethod.POST, datasourceRequestEntity, String.class);
String datasourceResponseEntityBody = datasourceResponseEntity.getBody();
log.info("datasourceResponseEntityBody:" + datasourceResponseEntityBody);
return path + "/" + result;
}
return null; return null;
} }
private HttpHeaders getHeader(String token,String product,String appKey,String hostAndPort,Boolean isUpload){
HttpHeaders header = new HttpHeaders();
header.add(Constant.TOKEN, token);
header.add(Constant.PRODUCT, product);
header.add(Constant.APPKEY, appKey);
if (isUpload){
header.setContentType(MediaType.MULTIPART_FORM_DATA);
}else {
header.setContentType(MediaType.APPLICATION_JSON);
}
return header;
}
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
requestInfoToSocketServer(); requestInfoToSocketServer();
} }
...@@ -67,10 +172,15 @@ public class ClientHandler implements Runnable { ...@@ -67,10 +172,15 @@ public class ClientHandler implements Runnable {
private static void requestInfoToSocketServer() { private static void requestInfoToSocketServer() {
try { try {
Socket socket = new Socket("127.0.0.1", 7777); Socket socket = new Socket("127.0.0.1", 7777);
PrintWriter out = new PrintWriter(socket.getOutputStream(), true); OutputStream ops = socket.getOutputStream();
out.write("我是客户端"); FileInputStream fis = new FileInputStream("D:\\SamData\\RecordXLS\\測試\\第一阶段任务与考核指标.xlsx");
out.flush(); int len = 0;
byte[] bs = new byte[20480];
while ((len = fis.read(bs)) != -1) {
ops.write(bs, 0, len);
}
socket.shutdownOutput(); socket.shutdownOutput();
ops.flush();
//开始接收服务端的消息 //开始接收服务端的消息
BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream())); BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
log.info("接收到服务端的回复:" + in.readLine()); log.info("接收到服务端的回复:" + in.readLine());
......
...@@ -26,6 +26,9 @@ public class SocketConfig { ...@@ -26,6 +26,9 @@ public class SocketConfig {
@Value("${amos.system.socket.port}") @Value("${amos.system.socket.port}")
private Integer port; private Integer port;
@Value("${amos.system.maas.url}")
private String hostAndPort;
private static final ThreadPoolExecutor threadpool = new ThreadPoolExecutor(15, 15, private static final ThreadPoolExecutor threadpool = new ThreadPoolExecutor(15, 15,
10L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()); 10L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
...@@ -46,7 +49,7 @@ public class SocketConfig { ...@@ -46,7 +49,7 @@ public class SocketConfig {
clientSocket.setSoTimeout(10000); clientSocket.setSoTimeout(10000);
// 创建新线程处理连接 // 创建新线程处理连接
log.info("接收到客户端socket: {}", clientSocket.getRemoteSocketAddress()); log.info("接收到客户端socket: {}", clientSocket.getRemoteSocketAddress());
threadpool.execute(new ClientHandler(clientSocket)); threadpool.execute(new ClientHandler(clientSocket,hostAndPort));
} }
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
......
...@@ -2,4 +2,7 @@ package com.yeejoin.amos.kgd.message; ...@@ -2,4 +2,7 @@ package com.yeejoin.amos.kgd.message;
public class Constant { public class Constant {
public static final String REGION = "REALTIME"; public static final String REGION = "REALTIME";
public static final String TOKEN = "Token";
public static final String APPKEY = "appKey";
public static final String PRODUCT = "product";
} }
package com.yeejoin.amos.boot.module.jxiop.biz.controller; package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointTag;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointTag;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointTagMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointTagMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanHealthIndexServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanHealthIndexServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -14,6 +22,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper; ...@@ -14,6 +22,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.POST;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -31,6 +42,10 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -31,6 +42,10 @@ public class IdxBizFanHealthIndexController extends BaseController {
@Autowired @Autowired
IdxBizFanHealthIndexServiceImpl idxBizFanHealthIndexServiceImpl; IdxBizFanHealthIndexServiceImpl idxBizFanHealthIndexServiceImpl;
@Autowired
IdxBizFanPointTagMapper idxBizFanPointTagMapper;
@Autowired
IdxBizPvPointTagMapper idxBizPvPointTagMapper;
/** /**
* 新增 * 新增
* *
...@@ -154,11 +169,44 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -154,11 +169,44 @@ public class IdxBizFanHealthIndexController extends BaseController {
return ResponseHelper.buildResponse( idxBizFanHealthIndexServiceImpl.queryForLeftTableListByPointNum(STATION, HEALTHLEVEL, EQUIPMENTNAME,POINTNAME)); return ResponseHelper.buildResponse( idxBizFanHealthIndexServiceImpl.queryForLeftTableListByPointNum(STATION, HEALTHLEVEL, EQUIPMENTNAME,POINTNAME));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET",value = "预警监测设备级统计", notes = "预警监测设备级统计")
@GetMapping(value = "/queryForPointNum")
public ResponseModel<List<Map<String,Object>>> queryForLeftTableListByPointNum(@RequestParam(required = false) String STATION,@RequestParam(required = false) String SUBARRAY,@RequestParam(required = false) String EQUIPMENTNAME) {
List<IdxBizFanWarningRecord> idxBizPvWarningRecordList = idxBizFanHealthIndexServiceImpl.warningData(STATION, SUBARRAY, EQUIPMENTNAME);
int total = idxBizFanHealthIndexServiceImpl.pointNum(STATION, SUBARRAY, EQUIPMENTNAME);
Map<String,Object> map =new HashMap<>();
Map<String,Object> map1 =new HashMap<>();
Map<String,Object> warningNum =new HashMap<>();
warningNum.put("name","注意");
warningNum.put("value",idxBizPvWarningRecordList.stream().filter(e->e.getWarningName().equals("注意")).count());
map.put("name","警告");
map.put("value",idxBizPvWarningRecordList.stream().filter(e->e.getWarningName().equals("警告")).count());
map1.put("name","危险");
map1.put("value",idxBizPvWarningRecordList.stream().filter(e->e.getWarningName().equals("危险")).count());
Map<String,Object> pointNum =new HashMap<>();
pointNum.put("name","正常");
pointNum.put("value",total - idxBizPvWarningRecordList.size());
List<Map<String,Object>> list = new ArrayList<>();
list.add(pointNum);
list.add(map1);
list.add(map);
list.add(warningNum);
return ResponseHelper.buildResponse(list);
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET",value = "测点运行趋势图", notes = "测点运行趋势图") @ApiOperation(httpMethod = "GET",value = "测点运行趋势图", notes = "测点运行趋势图")
@GetMapping(value = "/getqyt") @GetMapping(value = "/getqyt")
public ResponseModel<Object> getqyt( public ResponseModel<Object> getqyt(
int type, String type,
String address, String address,
String statioName, String statioName,
String equipmentName, String equipmentName,
...@@ -172,4 +220,60 @@ public class IdxBizFanHealthIndexController extends BaseController { ...@@ -172,4 +220,60 @@ public class IdxBizFanHealthIndexController extends BaseController {
return ResponseHelper.buildResponse(idxBizFanHealthIndexServiceImpl.getqyt( type,address,statioName,equipmentName,arae,startTime,endTime)); return ResponseHelper.buildResponse(idxBizFanHealthIndexServiceImpl.getqyt( type,address,statioName,equipmentName,arae,startTime,endTime));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET",value = "工况字典详情", notes = "工况字典详情")
@GetMapping(value = "/getZDXQ")
public ResponseModel<Object> getZDXQ(
String type,
String id
) {
Object object=null;
if(type.equals("1")){
object= idxBizPvPointTagMapper.selectById(id);
}else{
object= idxBizFanPointTagMapper.selectById(id);
}
return ResponseHelper.buildResponse(object);
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET",value = "工况字典修改", notes = "工况字典修改")
@PostMapping (value = "/updateZDXQ")
public ResponseModel<Object> updateZDXQ(
String type,
String id,
String pointDirection,
String tagCode
) {
if(type.equals("1")){
IdxBizPvPointTag object= idxBizPvPointTagMapper.selectById(id);
LambdaUpdateWrapper<IdxBizPvPointTag> UpdateWrapper =new LambdaUpdateWrapper();
UpdateWrapper.eq(object.getArae()!=null,IdxBizPvPointTag::getArae,object.getArae());
UpdateWrapper.eq(object.getStation()!=null,IdxBizPvPointTag::getStation,object.getStation());
UpdateWrapper.eq(object.getDeviceType()!=null,IdxBizPvPointTag::getDeviceType,object.getDeviceType());
UpdateWrapper.eq(object.getManufacturer()!=null,IdxBizPvPointTag::getManufacturer,object.getManufacturer());
UpdateWrapper.eq(object.getPointName()!=null,IdxBizPvPointTag::getPointName,object.getPointName());
UpdateWrapper.set(pointDirection!=null,IdxBizPvPointTag::getPointDirection,pointDirection);
UpdateWrapper.set(tagCode!=null,IdxBizPvPointTag::getTagCode,tagCode);
idxBizPvPointTagMapper.update(null,UpdateWrapper);
}else{
IdxBizFanPointTag object= idxBizFanPointTagMapper.selectById(id);
LambdaUpdateWrapper<IdxBizFanPointTag> UpdateWrapper =new LambdaUpdateWrapper();
UpdateWrapper.eq(object.getArae()!=null,IdxBizFanPointTag::getArae,object.getArae());
UpdateWrapper.eq(object.getStation()!=null,IdxBizFanPointTag::getStation,object.getStation());
UpdateWrapper.eq(object.getNumber()!=null,IdxBizFanPointTag::getNumber,object.getNumber());
UpdateWrapper.eq(object.getPointName()!=null,IdxBizFanPointTag::getPointName,object.getPointName());
UpdateWrapper.set(pointDirection!=null,IdxBizFanPointTag::getPointDirection,pointDirection);
UpdateWrapper.set(tagCode!=null,IdxBizFanPointTag::getTagCode,tagCode);
idxBizFanPointTagMapper.update(null,UpdateWrapper);
}
return ResponseHelper.buildResponse(null);
}
} }
package com.yeejoin.amos.boot.module.jxiop.biz.controller; package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanWarningRecordDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanWarningRecordDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRuleSet;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRecordServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRecordServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleSetServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.beanutils.BeanMap;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
...@@ -14,7 +23,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper; ...@@ -14,7 +23,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* *
...@@ -30,6 +41,9 @@ public class IdxBizFanWarningRecordController extends BaseController { ...@@ -30,6 +41,9 @@ public class IdxBizFanWarningRecordController extends BaseController {
@Autowired @Autowired
IdxBizFanWarningRecordServiceImpl idxBizFanWarningRecordServiceImpl; IdxBizFanWarningRecordServiceImpl idxBizFanWarningRecordServiceImpl;
@Autowired
IdxBizFanWarningRuleSetServiceImpl idxBizFanWarningRuleSetService;
/** /**
* 新增 * 新增
* *
...@@ -112,4 +126,68 @@ public class IdxBizFanWarningRecordController extends BaseController { ...@@ -112,4 +126,68 @@ public class IdxBizFanWarningRecordController extends BaseController {
public ResponseModel<List<IdxBizFanWarningRecordDto>> selectForList() { public ResponseModel<List<IdxBizFanWarningRecordDto>> selectForList() {
return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.queryForIdxBizFanWarningRecordList()); return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.queryForIdxBizFanWarningRecordList());
} }
/**
* 根据sequenceNbr查询
*
* @param ANALYSISPOINTID 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getInfoByPointId")
@ApiOperation(httpMethod = "GET",value = "根据ANALYSIS_POINT_ID查询单个", notes = "根据ANALYSIS_POINT_ID查询单个")
public ResponseModel<Map<String, Object>> getInfoByPointId(@RequestParam String ANALYSISPOINTID) {
LambdaQueryWrapper<IdxBizFanWarningRuleSet> query =new LambdaQueryWrapper<>();
query.eq(IdxBizFanWarningRuleSet::getAnalysisPointId,ANALYSISPOINTID);
List<IdxBizFanWarningRuleSet> idxBizFanWarningRecordList = idxBizFanWarningRuleSetService.getBaseMapper().selectList(query);
Map<String,Object> map = new HashMap<>();
for (int i = 0; i < idxBizFanWarningRecordList.size(); i++) {
IdxBizFanWarningRuleSet idxBizFanWarningRecord = idxBizFanWarningRecordList.get(i);
if (idxBizFanWarningRecord.getWarningName().equals("注意")){
map.putAll(BeanUtil.beanToMap(idxBizFanWarningRecord));
}else if (idxBizFanWarningRecord.getWarningName().equals("警告")){
//警告周期
map.put("jgWarningCycle",idxBizFanWarningRecord.getWarningCycle());
map.put("jgWarningIf",idxBizFanWarningRecord.getWarningIf());
}else if (idxBizFanWarningRecord.getWarningName().equals("危险")){
//警告周期
map.put("wxWarningCycle",idxBizFanWarningRecord.getWarningCycle());
map.put("wxWarningIf",idxBizFanWarningRecord.getWarningIf());
}
}
return ResponseHelper.buildResponse(map);
}
/**
* 根据pointId修改信息
*
* @param analysisInfo 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/updateByPointInfo")
@ApiOperation(httpMethod = "POST", value = "根据pointId修改信息", notes = "根据pointId修改信息")
public ResponseModel<Boolean> updateByPointInfo(@RequestBody JSONObject analysisInfo) {
LambdaQueryWrapper<IdxBizFanWarningRuleSet> query = new LambdaQueryWrapper<>();
query.eq(IdxBizFanWarningRuleSet::getAnalysisPointId, analysisInfo.get("analysisPointId"));
List<IdxBizFanWarningRuleSet> idxBizFanWarningRecordList = idxBizFanWarningRuleSetService.getBaseMapper().selectList(query);
for (IdxBizFanWarningRuleSet idxBizFanWarningRuleSet : idxBizFanWarningRecordList) {
BeanUtil.copyProperties(analysisInfo, idxBizFanWarningRuleSet, "sequenceNbr", "warningName");
if (idxBizFanWarningRuleSet.getWarningName().equals("警告")) {
//警告周期
idxBizFanWarningRuleSet.setWarningIf(analysisInfo.get("jgWarningIf").toString());
idxBizFanWarningRuleSet.setWarningCycle(analysisInfo.get("jgWarningCycle").toString());
} else if (idxBizFanWarningRuleSet.getWarningName().equals("危险")) {
//警告周期
idxBizFanWarningRuleSet.setWarningIf(analysisInfo.get("wxWarningIf").toString());
idxBizFanWarningRuleSet.setWarningCycle(analysisInfo.get("wxWarningCycle").toString());
}
}
boolean b = idxBizFanWarningRuleSetService.updateBatchById(idxBizFanWarningRecordList);
return ResponseHelper.buildResponse(b);
}
} }
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvHealthIndexServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvHealthIndexServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -166,20 +167,30 @@ public class IdxBizPvHealthIndexController extends BaseController { ...@@ -166,20 +167,30 @@ public class IdxBizPvHealthIndexController extends BaseController {
@ApiOperation(httpMethod = "GET",value = "预警监测设备级统计", notes = "预警监测设备级统计") @ApiOperation(httpMethod = "GET",value = "预警监测设备级统计", notes = "预警监测设备级统计")
@GetMapping(value = "/queryForPointNum") @GetMapping(value = "/queryForPointNum")
public ResponseModel<List<Map<String,Object>>> queryForLeftTableListByPointNum(@RequestParam(required = false) String STATION,@RequestParam(required = false) String SUBARRAY,@RequestParam(required = false) String EQUIPMENTNAME) { public ResponseModel<List<Map<String,Object>>> queryForLeftTableListByPointNum(@RequestParam(required = false) String STATION,@RequestParam(required = false) String SUBARRAY,@RequestParam(required = false) String EQUIPMENTNAME) {
List<Map<String, Object>> maps = idxBizPvHealthIndexServiceImpl.warningData(STATION, SUBARRAY, EQUIPMENTNAME); List<IdxBizPvWarningRecord> idxBizPvWarningRecordList = idxBizPvHealthIndexServiceImpl.warningData(STATION, SUBARRAY, EQUIPMENTNAME);
int total = idxBizPvHealthIndexServiceImpl.pointNum(STATION, SUBARRAY, EQUIPMENTNAME); int total = idxBizPvHealthIndexServiceImpl.pointNum(STATION, SUBARRAY, EQUIPMENTNAME);
Map<String,Object> map =new HashMap<>();
Map<String,Object> map1 =new HashMap<>();
Map<String,Object> warningNum =new HashMap<>(); Map<String,Object> warningNum =new HashMap<>();
warningNum.put("name","异常"); warningNum.put("name","注意");
warningNum.put("value",maps.size()); warningNum.put("value",idxBizPvWarningRecordList.stream().filter(e->e.getWarningName().equals("注意")).count());
map.put("name","警告");
map.put("value",idxBizPvWarningRecordList.stream().filter(e->e.getWarningName().equals("警告")).count());
map1.put("name","危险");
map1.put("value",idxBizPvWarningRecordList.stream().filter(e->e.getWarningName().equals("危险")).count());
Map<String,Object> pointNum =new HashMap<>(); Map<String,Object> pointNum =new HashMap<>();
pointNum.put("name","正常"); pointNum.put("name","正常");
pointNum.put("value",total - maps.size()); pointNum.put("value",total - idxBizPvWarningRecordList.size());
List<Map<String,Object>> list = new ArrayList<>(); List<Map<String,Object>> list = new ArrayList<>();
list.add(pointNum); list.add(pointNum);
list.add(warningNum); list.add(warningNum);
list.add(map1);
list.add(map);
return ResponseHelper.buildResponse(list); return ResponseHelper.buildResponse(list);
} }
......
...@@ -90,10 +90,15 @@ public class IdxBizFanPointTag{ ...@@ -90,10 +90,15 @@ public class IdxBizFanPointTag{
@TableField("ARAE") @TableField("ARAE")
private String arae; private String arae;
// /**
// * 网关ID
// */
// @TableField("GATEWAY_ID")
// private Integer gatewayId;
/** /**
* 网关ID * 变量方向
*/ */
@TableField("GATEWAY_ID") @TableField("POINT_DIRECTION")
private Integer gatewayId; private Integer pointDirection;
} }
package com.yeejoin.amos.boot.module.jxiop.biz.entity; package com.yeejoin.amos.boot.module.jxiop.biz.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data; import lombok.Data;
...@@ -27,7 +28,7 @@ public class IdxBizFanWarningRuleSet{ ...@@ -27,7 +28,7 @@ public class IdxBizFanWarningRuleSet{
/** /**
* *
*/ */
@TableField("SEQUENCE_NBR") @TableId("SEQUENCE_NBR")
private String sequenceNbr; private String sequenceNbr;
/** /**
...@@ -120,4 +121,7 @@ public class IdxBizFanWarningRuleSet{ ...@@ -120,4 +121,7 @@ public class IdxBizFanWarningRuleSet{
@TableField("EQUIPMENT_NAME") @TableField("EQUIPMENT_NAME")
private String equipmentName; private String equipmentName;
@TableField("POINT_NAME")
private String pointName;
} }
package com.yeejoin.amos.boot.module.jxiop.biz.entity; package com.yeejoin.amos.boot.module.jxiop.biz.entity;
import cn.com.vastbase.jdbc.NUMBER;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
...@@ -65,11 +66,11 @@ public class IdxBizPvPointTag{ ...@@ -65,11 +66,11 @@ public class IdxBizPvPointTag{
@TableField("TAG_CODE") @TableField("TAG_CODE")
private String tagCode; private String tagCode;
/** // /**
* 网关ID // * 网关ID
*/ // */
@TableField("GATEWAY_ID") // @TableField("GATEWAY_ID")
private Integer gatewayId; // private Integer gatewayId;
/** /**
* 测点 * 测点
...@@ -100,5 +101,12 @@ public class IdxBizPvPointTag{ ...@@ -100,5 +101,12 @@ public class IdxBizPvPointTag{
*/ */
@TableField("MANUFACTURER") @TableField("MANUFACTURER")
private String manufacturer; private String manufacturer;
/**
* 变量方向
*/
@TableField("POINT_DIRECTION")
private String pointDirection;
} }
package com.yeejoin.amos.boot.module.jxiop.biz.entity; package com.yeejoin.amos.boot.module.jxiop.biz.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data; import lombok.Data;
...@@ -27,7 +28,7 @@ public class IdxBizPvWarningRuleSet{ ...@@ -27,7 +28,7 @@ public class IdxBizPvWarningRuleSet{
/** /**
* *
*/ */
@TableField("SEQUENCE_NBR") @TableId("SEQUENCE_NBR")
private String sequenceNbr; private String sequenceNbr;
/** /**
......
...@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON; ...@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.*; import com.yeejoin.amos.boot.module.jxiop.biz.entity.*;
...@@ -198,12 +199,12 @@ public class KafkaConsumerService { ...@@ -198,12 +199,12 @@ public class KafkaConsumerService {
List<IdxBizFanPointVarCentralValue> insertList = new ArrayList<>(); List<IdxBizFanPointVarCentralValue> insertList = new ArrayList<>();
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
IdxBizFanPointVarCentralValue idxBizFanPointVarCentralValue = new IdxBizFanPointVarCentralValue(); IdxBizFanPointVarCentralValue idxBizFanPointVarCentralValue = new IdxBizFanPointVarCentralValue();
idxBizFanPointVarCentralValue.setProcess1Min(jsonObject.getJSONArray("process1Min").getDoubleValue(i)); idxBizFanPointVarCentralValue.setProcess1Min(ObjectUtils.isNull(jsonObject.getJSONArray("process1Min").get(i)) ? null : jsonObject.getJSONArray("process1Min").getDoubleValue(i));
idxBizFanPointVarCentralValue.setProcess2Min(jsonObject.getJSONArray("process2Min").getDoubleValue(i)); idxBizFanPointVarCentralValue.setProcess2Min(ObjectUtils.isNull(jsonObject.getJSONArray("process2Min").get(i)) ? null : jsonObject.getJSONArray("process2Min").getDoubleValue(i));
idxBizFanPointVarCentralValue.setProcess3Min(jsonObject.getJSONArray("process3Min").getDoubleValue(i)); idxBizFanPointVarCentralValue.setProcess3Min(ObjectUtils.isNull(jsonObject.getJSONArray("process3Min").get(i)) ? null : jsonObject.getJSONArray("process3Min").getDoubleValue(i));
idxBizFanPointVarCentralValue.setProcess1Max(jsonObject.getJSONArray("process1Max").getDoubleValue(i)); idxBizFanPointVarCentralValue.setProcess1Max(ObjectUtils.isNull(jsonObject.getJSONArray("process1Max").get(i)) ? null : jsonObject.getJSONArray("process1Max").getDoubleValue(i));
idxBizFanPointVarCentralValue.setPorcess2Max(jsonObject.getJSONArray("process2Max").getDoubleValue(i)); idxBizFanPointVarCentralValue.setPorcess2Max(ObjectUtils.isNull(jsonObject.getJSONArray("process2Max").get(i)) ? null : jsonObject.getJSONArray("process2Max").getDoubleValue(i));
idxBizFanPointVarCentralValue.setProcess3Max(jsonObject.getJSONArray("process3Max").getDoubleValue(i)); idxBizFanPointVarCentralValue.setProcess3Max(ObjectUtils.isNull(jsonObject.getJSONArray("process3Max").get(i)) ? null : jsonObject.getJSONArray("process3Max").getDoubleValue(i));
idxBizFanPointVarCentralValue.setAnalysisPointId(analysisVariableId); idxBizFanPointVarCentralValue.setAnalysisPointId(analysisVariableId);
idxBizFanPointVarCentralValue.setAnalysisPointName(analysisVariable.getPointName()); idxBizFanPointVarCentralValue.setAnalysisPointName(analysisVariable.getPointName());
idxBizFanPointVarCentralValue.setProcessPoint1Id(data1.get("processVariable1Id").toString()); idxBizFanPointVarCentralValue.setProcessPoint1Id(data1.get("processVariable1Id").toString());
...@@ -212,8 +213,8 @@ public class KafkaConsumerService { ...@@ -212,8 +213,8 @@ public class KafkaConsumerService {
idxBizFanPointVarCentralValue.setProcessPoint2Name(processVariableList.get(1).getPointName()); idxBizFanPointVarCentralValue.setProcessPoint2Name(processVariableList.get(1).getPointName());
idxBizFanPointVarCentralValue.setProcessPoint3Id(data1.get("processVariable3Id").toString()); idxBizFanPointVarCentralValue.setProcessPoint3Id(data1.get("processVariable3Id").toString());
idxBizFanPointVarCentralValue.setProcessPoint3Name(processVariableList.get(2).getPointName()); idxBizFanPointVarCentralValue.setProcessPoint3Name(processVariableList.get(2).getPointName());
idxBizFanPointVarCentralValue.setAnalysisStdDev(jsonObject.getJSONArray("stdDev").getDoubleValue(i)); idxBizFanPointVarCentralValue.setAnalysisStdDev(ObjectUtils.isNull(jsonObject.getJSONArray("stdDev").get(i)) ? null : jsonObject.getJSONArray("stdDev").getDoubleValue(i));
idxBizFanPointVarCentralValue.setAnalysisCenterValue(jsonObject.getJSONArray("centerValue").getDoubleValue(i)); idxBizFanPointVarCentralValue.setAnalysisCenterValue(ObjectUtils.isNull(jsonObject.getJSONArray("centerValue").get(i)) ? null : jsonObject.getJSONArray("centerValue").getDoubleValue(i));
idxBizFanPointVarCentralValue.setArae(analysisVariable.getArae()); idxBizFanPointVarCentralValue.setArae(analysisVariable.getArae());
idxBizFanPointVarCentralValue.setStation(analysisVariable.getStation()); idxBizFanPointVarCentralValue.setStation(analysisVariable.getStation());
idxBizFanPointVarCentralValue.setSubSystem(analysisVariable.getSubSystem()); idxBizFanPointVarCentralValue.setSubSystem(analysisVariable.getSubSystem());
...@@ -835,12 +836,12 @@ public class KafkaConsumerService { ...@@ -835,12 +836,12 @@ public class KafkaConsumerService {
List<IdxBizPvPointVarCentralValue> insertList = new ArrayList<>(); List<IdxBizPvPointVarCentralValue> insertList = new ArrayList<>();
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
IdxBizPvPointVarCentralValue idxBizPvPointVarCentralValue = new IdxBizPvPointVarCentralValue(); IdxBizPvPointVarCentralValue idxBizPvPointVarCentralValue = new IdxBizPvPointVarCentralValue();
idxBizPvPointVarCentralValue.setProcess1Min(jsonObject.getJSONArray("process1Min").getDoubleValue(i)); idxBizPvPointVarCentralValue.setProcess1Min(ObjectUtils.isNull(jsonObject.getJSONArray("process1Min").get(i)) ? null : jsonObject.getJSONArray("process1Min").getDoubleValue(i));
idxBizPvPointVarCentralValue.setProcess2Min(jsonObject.getJSONArray("process2Min").getDoubleValue(i)); idxBizPvPointVarCentralValue.setProcess2Min(ObjectUtils.isNull(jsonObject.getJSONArray("process2Min").get(i)) ? null : jsonObject.getJSONArray("process2Min").getDoubleValue(i));
idxBizPvPointVarCentralValue.setProcess3Min(jsonObject.getJSONArray("process3Min").getDoubleValue(i)); idxBizPvPointVarCentralValue.setProcess3Min(ObjectUtils.isNull(jsonObject.getJSONArray("process3Min").get(i)) ? null : jsonObject.getJSONArray("process3Min").getDoubleValue(i));
idxBizPvPointVarCentralValue.setProcess1Max(jsonObject.getJSONArray("process1Max").getDoubleValue(i)); idxBizPvPointVarCentralValue.setProcess1Max(ObjectUtils.isNull(jsonObject.getJSONArray("process1Max").get(i)) ? null : jsonObject.getJSONArray("process1Max").getDoubleValue(i));
idxBizPvPointVarCentralValue.setProcess2Max(jsonObject.getJSONArray("process2Max").getDoubleValue(i)); idxBizPvPointVarCentralValue.setProcess2Max(ObjectUtils.isNull(jsonObject.getJSONArray("process2Max").get(i)) ? null : jsonObject.getJSONArray("process2Max").getDoubleValue(i));
idxBizPvPointVarCentralValue.setProcess3Max(jsonObject.getJSONArray("process3Max").getDoubleValue(i)); idxBizPvPointVarCentralValue.setProcess3Max(ObjectUtils.isNull(jsonObject.getJSONArray("process3Max").get(i)) ? null : jsonObject.getJSONArray("process3Max").getDoubleValue(i));
idxBizPvPointVarCentralValue.setAnalysisPointId(jsonObject.getString("analysisVariableId")); idxBizPvPointVarCentralValue.setAnalysisPointId(jsonObject.getString("analysisVariableId"));
idxBizPvPointVarCentralValue.setAnalysisPointIdName(analysisVariable.getPointName()); idxBizPvPointVarCentralValue.setAnalysisPointIdName(analysisVariable.getPointName());
idxBizPvPointVarCentralValue.setProcessPoint1Id(jsonObject.getString("processVariable1Id")); idxBizPvPointVarCentralValue.setProcessPoint1Id(jsonObject.getString("processVariable1Id"));
...@@ -849,8 +850,8 @@ public class KafkaConsumerService { ...@@ -849,8 +850,8 @@ public class KafkaConsumerService {
idxBizPvPointVarCentralValue.setProcessPoint2IdName(processVariableList.get(1).getPointName()); idxBizPvPointVarCentralValue.setProcessPoint2IdName(processVariableList.get(1).getPointName());
idxBizPvPointVarCentralValue.setProcessPoint3Id(jsonObject.getString("processVariable3Id")); idxBizPvPointVarCentralValue.setProcessPoint3Id(jsonObject.getString("processVariable3Id"));
idxBizPvPointVarCentralValue.setProcessPoint3IdName(processVariableList.get(2).getPointName()); idxBizPvPointVarCentralValue.setProcessPoint3IdName(processVariableList.get(2).getPointName());
idxBizPvPointVarCentralValue.setAnalysisStdDev(jsonObject.getJSONArray("stdDev").getDoubleValue(i)); idxBizPvPointVarCentralValue.setAnalysisStdDev(ObjectUtils.isNull(jsonObject.getJSONArray("stdDev").get(i)) ? null : jsonObject.getJSONArray("stdDev").getDoubleValue(i));
idxBizPvPointVarCentralValue.setAnalysisCenterValue(jsonObject.getJSONArray("centerValue").getDoubleValue(i)); idxBizPvPointVarCentralValue.setAnalysisCenterValue(ObjectUtils.isNull(jsonObject.getJSONArray("centerValue").get(i)) ? null : jsonObject.getJSONArray("centerValue").getDoubleValue(i));
idxBizPvPointVarCentralValue.setArae(analysisVariable.getArae()); idxBizPvPointVarCentralValue.setArae(analysisVariable.getArae());
idxBizPvPointVarCentralValue.setStation(analysisVariable.getStation()); idxBizPvPointVarCentralValue.setStation(analysisVariable.getStation());
idxBizPvPointVarCentralValue.setSubarray(analysisVariable.getSubarray()); idxBizPvPointVarCentralValue.setSubarray(analysisVariable.getSubarray());
......
...@@ -5,6 +5,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO; ...@@ -5,6 +5,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthLevel; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthLevel;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -113,4 +115,9 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn ...@@ -113,4 +115,9 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
Map<String,Object> queryForLeftTableListByPointNum(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME,String POINTNAME); Map<String,Object> queryForLeftTableListByPointNum(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME,String POINTNAME);
List<IdxBizFanWarningRecord> warningData(String STATION, String SUBARRAY, String EQUIPMENTNAME);
Integer pointNum(String STATION, String SUBARRAY, String EQUIPMENTNAME);
} }
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvHealthIndex; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -27,7 +28,7 @@ public interface IdxBizPvHealthIndexMapper extends BaseMapper<IdxBizPvHealthInde ...@@ -27,7 +28,7 @@ public interface IdxBizPvHealthIndexMapper extends BaseMapper<IdxBizPvHealthInde
int queryForLeftTableListByPointCount(String STATION, String SUBARRAY, String HEALTHLEVEL, String EQUIPMENTNAME,String POINTNAME); int queryForLeftTableListByPointCount(String STATION, String SUBARRAY, String HEALTHLEVEL, String EQUIPMENTNAME,String POINTNAME);
List<Map<String,Object>> warningData(String STATION, String SUBARRAY, String EQUIPMENTNAME); List<IdxBizPvWarningRecord> warningData(String STATION, String SUBARRAY, String EQUIPMENTNAME);
Integer pointNum(String STATION, String SUBARRAY, String EQUIPMENTNAME); Integer pointNum(String STATION, String SUBARRAY, String EQUIPMENTNAME);
......
...@@ -1529,7 +1529,11 @@ public class CommonServiceImpl { ...@@ -1529,7 +1529,11 @@ public class CommonServiceImpl {
value4 = datum.getCurrentValue() == null ? 0.0 : datum.getCurrentValue(); value4 = datum.getCurrentValue() == null ? 0.0 : datum.getCurrentValue();
} }
} }
if (idxBizUhef.getProcess1Min() <= value1 && value1 <= idxBizUhef.getProcess1Max() && idxBizUhef.getProcess2Min() <= value2 && value2 <= idxBizUhef.getPorcess2Max() && idxBizUhef.getProcess3Min() <= value3 && value3 <= idxBizUhef.getProcess3Max()) {
if ((null == idxBizUhef.getProcess1Min() || idxBizUhef.getProcess1Min() <= value1 ) && (value1 <= idxBizUhef.getProcess1Max() || null == idxBizUhef.getProcess1Max())
&&(null == idxBizUhef.getProcess2Min() || idxBizUhef.getProcess2Min() <= value2 ) && (null == idxBizUhef.getPorcess2Max() || value2 <= idxBizUhef.getPorcess2Max())
&&(null == idxBizUhef.getProcess3Min() || idxBizUhef.getProcess3Min() <= value3 ) && (null ==idxBizUhef.getProcess3Max() || value3 <= idxBizUhef.getProcess3Max())) {
if (!analysisVariableIdList.contains(idxBizUhef.getAnalysisPointId())){ if (!analysisVariableIdList.contains(idxBizUhef.getAnalysisPointId())){
analysisVariableList.add(value4); analysisVariableList.add(value4);
stdDevList.add(idxBizUhef.getAnalysisStdDev()); stdDevList.add(idxBizUhef.getAnalysisStdDev());
...@@ -1682,7 +1686,9 @@ public class CommonServiceImpl { ...@@ -1682,7 +1686,9 @@ public class CommonServiceImpl {
value4 = datum.getCurrentValue(); value4 = datum.getCurrentValue();
} }
} }
if (idxBizUhef.getProcess1Min() <= value1 && value1 <= idxBizUhef.getProcess1Max() && idxBizUhef.getProcess2Min() <= value2 && value2 <= idxBizUhef.getProcess2Max() && idxBizUhef.getProcess3Min() <= value3 && value3 <= idxBizUhef.getProcess3Max()) { if ((null == idxBizUhef.getProcess1Min() || idxBizUhef.getProcess1Min() <= value1 ) && (value1 <= idxBizUhef.getProcess1Max() || null == idxBizUhef.getProcess1Max())
&&(null == idxBizUhef.getProcess2Min() || idxBizUhef.getProcess2Min() <= value2 ) && (null == idxBizUhef.getProcess2Max() || value2 <= idxBizUhef.getProcess2Max())
&&(null == idxBizUhef.getProcess3Min() || idxBizUhef.getProcess3Min() <= value3 ) && (null ==idxBizUhef.getProcess3Max() || value3 <= idxBizUhef.getProcess3Max())) {
if (!analysisVariableIdList.contains(idxBizUhef.getAnalysisPointId())){ if (!analysisVariableIdList.contains(idxBizUhef.getAnalysisPointId())){
analysisVariableList.add(value4); analysisVariableList.add(value4);
stdDevList.add(idxBizUhef.getAnalysisStdDev()); stdDevList.add(idxBizUhef.getAnalysisStdDev());
......
...@@ -66,18 +66,19 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth ...@@ -66,18 +66,19 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
public Object getqyt(int type,String address,String statioName,String equipmentName, String arae,String startTime,String endTime){ public Object getqyt(String type,String address,String statioName,String equipmentName, String arae,String startTime,String endTime){
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
try { try {
//获取场站网关 //获取场站网关
String tdid=null; String tdid=null;
if(type==1){ if(type.equals("1")){
IdxBizPvPointProcessVariableClassification idxBizPvPointProcessVariableClassification= idxBizPvPointProcessVariableClassificationMapper.selectOne( IdxBizPvPointProcessVariableClassification idxBizPvPointProcessVariableClassification= idxBizPvPointProcessVariableClassificationMapper.selectOne(
new QueryWrapper<IdxBizPvPointProcessVariableClassification>() new QueryWrapper<IdxBizPvPointProcessVariableClassification>()
.eq("INDEX_ADDRESS", address) .eq("INDEX_ADDRESS", address)
.eq("STATION", statioName) .eq("STATION", statioName)
.eq("EQUIPMENT_NAME", equipmentName) .eq("EQUIPMENT_NAME", equipmentName)
.eq("ARAE", arae) .eq("ARAE", arae)
.last("limit 1")
); );
tdid=address+"_"+idxBizPvPointProcessVariableClassification.getGatewayId(); tdid=address+"_"+idxBizPvPointProcessVariableClassification.getGatewayId();
}else{ }else{
...@@ -87,6 +88,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth ...@@ -87,6 +88,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
.eq("STATION", statioName) .eq("STATION", statioName)
.eq("EQUIPMENT_NAME", equipmentName) .eq("EQUIPMENT_NAME", equipmentName)
.eq("ARAE", arae) .eq("ARAE", arae)
.last("limit 1")
); );
tdid=address+"_"+idxBizFanPointProcessVariableClassification.getGatewayId(); tdid=address+"_"+idxBizFanPointProcessVariableClassification.getGatewayId();
} }
...@@ -114,7 +116,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth ...@@ -114,7 +116,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
List<String> activePowers = new ArrayList<>(); List<String> activePowers = new ArrayList<>();
for (int i = 0; i < indicatorDataListActivePowers.size(); i++) { for (int i = 0; i < indicatorDataListActivePowers.size(); i++) {
activePowers.add(indicatorDataListActivePowers.get(i).getValue()); activePowers.add(indicatorDataListActivePowers.get(i).getValue());
axisData.add(DateUtil.format(indicatorDataListActivePowers.get(i).getCreatedTime(), "HH:mm")); axisData.add(DateUtil.format(indicatorDataListActivePowers.get(i).getCreatedTime(), "yyyy-MM-dd HH:mm:ss"));
} }
// List<Map<String, Object>> seriesData = new ArrayList<>(); // List<Map<String, Object>> seriesData = new ArrayList<>();
...@@ -144,6 +146,14 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth ...@@ -144,6 +146,14 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
return this.getBaseMapper().queryForLeftTableListByPointNum(STATION,HEALTHLEVEL,EQUIPMENTNAME,POINTNAME); return this.getBaseMapper().queryForLeftTableListByPointNum(STATION,HEALTHLEVEL,EQUIPMENTNAME,POINTNAME);
} }
public int pointNum(String STATION, String SUBARRAY,String EQUIPMENTNAME) {
return this.getBaseMapper().pointNum(STATION, SUBARRAY,EQUIPMENTNAME);
}
public List<IdxBizFanWarningRecord> warningData(String STATION, String SUBARRAY , String EQUIPMENTNAME) {
return this.getBaseMapper().warningData(STATION, SUBARRAY, EQUIPMENTNAME);
}
} }
\ No newline at end of file
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvHealthIndex; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvHealthIndexMapper; import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvHealthIndexMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizPvHealthIndexService; import com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizPvHealthIndexService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -61,7 +62,7 @@ public class IdxBizPvHealthIndexServiceImpl extends BaseService<IdxBizPvHealthIn ...@@ -61,7 +62,7 @@ public class IdxBizPvHealthIndexServiceImpl extends BaseService<IdxBizPvHealthIn
return this.getBaseMapper().pointNum(STATION, SUBARRAY,EQUIPMENTNAME); return this.getBaseMapper().pointNum(STATION, SUBARRAY,EQUIPMENTNAME);
} }
public List<Map<String,Object>> warningData(String STATION, String SUBARRAY , String EQUIPMENTNAME) { public List<IdxBizPvWarningRecord> warningData(String STATION, String SUBARRAY , String EQUIPMENTNAME) {
return this.getBaseMapper().warningData(STATION, SUBARRAY, EQUIPMENTNAME); return this.getBaseMapper().warningData(STATION, SUBARRAY, EQUIPMENTNAME);
} }
......
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
<select id="getHealthInfoByStation" resultType="java.util.Map"> <select id="getHealthInfoByStation" resultType="java.util.Map">
SELECT SELECT
a.STATION as station, a.STATION as station,
avg( a.avgHealthIndex ) AS healthIndex CEILING(avg( a.avgHealthIndex )) AS healthIndex
FROM FROM
( (
SELECT SELECT
...@@ -593,7 +593,7 @@ ...@@ -593,7 +593,7 @@
<select id="getPvSubSystemInfo" resultType="java.util.Map"> <select id="getPvSubSystemInfo" resultType="java.util.Map">
SELECT SELECT
IFNULL( AVG( HEALTH_INDEX ), 0 ) AS avgHealthIndex, CEILING(IFNULL( AVG( HEALTH_INDEX ), 100 )) AS avgHealthIndex,
EQUIPMENT_NAME AS equipmentName EQUIPMENT_NAME AS equipmentName
FROM FROM
idx_biz_pv_health_index idx_biz_pv_health_index
...@@ -1171,4 +1171,41 @@ ...@@ -1171,4 +1171,41 @@
</where> </where>
</select> </select>
<select id="warningData" resultType="com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord">
SELECT
*
FROM
idx_biz_fan_warning_record re
WHERE
re.`STATUS` = 0
<if test="EQUIPMENTNAME != '' and EQUIPMENTNAME != null">
AND re.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if test="SUBARRAY != null and SUBARRAY != '' ">
AND re.SUBARRAY = #{SUBARRAY}
</if>
<if test="STATION != null and STATION != '' ">
AND re.STATION = #{STATION}
</if>
</select>
<select id="pointNum" resultType="int">
SELECT
count(1)
FROM
idx_biz_fan_point_process_variable_classification cl
WHERE
cl.TAG_CODE = '分析变量'
<if test="EQUIPMENTNAME != '' and EQUIPMENTNAME != null">
AND cl.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if test="SUBARRAY != null and SUBARRAY != '' ">
AND cl.SUBARRAY = #{SUBARRAY}
</if>
<if test="STATION != null and STATION != '' ">
AND cl.STATION = #{STATION}
</if>
</select>
</mapper> </mapper>
...@@ -239,29 +239,22 @@ ...@@ -239,29 +239,22 @@
</select> </select>
<select id="warningData" resultType="map"> <select id="warningData" resultType="com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord">
SELECT * FROM (SELECT SELECT
cl. STATION, *
cl. SUBARRAY,
cl.EQUIPMENT_NAME
FROM FROM
idx_biz_pv_point_process_variable_classification cl idx_biz_pv_warning_record re
INNER JOIN idx_biz_pv_warning_record re ON re.EQUIPMENT_NAME = cl.EQUIPMENT_NAME AND re.STATION = cl.STATION AND re.SUBARRAY = cl.SUBARRAY
AND re.`STATUS` = 0
WHERE WHERE
cl.TAG_CODE = '分析变量' re.`STATUS` = 0
GROUP BY cl.EQUIPMENT_NAME) a
<where>
<if test="EQUIPMENTNAME != '' and EQUIPMENTNAME != null"> <if test="EQUIPMENTNAME != '' and EQUIPMENTNAME != null">
AND a.EQUIPMENT_NAME = #{EQUIPMENTNAME} AND re.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if> </if>
<if test="SUBARRAY != null and SUBARRAY != '' "> <if test="SUBARRAY != null and SUBARRAY != '' ">
AND a.SUBARRAY = #{SUBARRAY} AND re.SUBARRAY = #{SUBARRAY}
</if> </if>
<if test="STATION != null and STATION != '' "> <if test="STATION != null and STATION != '' ">
AND a.STATION = #{STATION} AND re.STATION = #{STATION}
</if> </if>
</where>
</select> </select>
<select id="pointNum" resultType="int"> <select id="pointNum" resultType="int">
......
...@@ -259,12 +259,12 @@ public class DemoController extends BaseController { ...@@ -259,12 +259,12 @@ public class DemoController extends BaseController {
equipmentsJxiopDocMysqlList.forEach(equipmentsJxiopDocMysql -> { equipmentsJxiopDocMysqlList.forEach(equipmentsJxiopDocMysql -> {
ESEquipments esEquipments = equipmentsRepository.findById(equipmentsJxiopDocMysql.getId()).get(); ESEquipments esEquipments = equipmentsRepository.findById(equipmentsJxiopDocMysql.getId()).get();
//更新模块 //更新模块
if (equipmentsJxiopDocMysql.getFrontModule().contains(pointImportDto.getFrontModule())) { if (!equipmentsJxiopDocMysql.getFrontModule().contains(pointImportDto.getFrontModule())) {
equipmentsJxiopDocMysql.setFrontModule(equipmentsJxiopDocMysql.getFrontModule() + "," + pointImportDto.getFrontModule()); equipmentsJxiopDocMysql.setFrontModule(equipmentsJxiopDocMysql.getFrontModule() + "," + pointImportDto.getFrontModule());
esEquipments.setFrontModule(equipmentsJxiopDocMysql.getFrontModule() + "," + pointImportDto.getFrontModule()); esEquipments.setFrontModule(equipmentsJxiopDocMysql.getFrontModule() + "," + pointImportDto.getFrontModule());
} }
//更新类型 //更新类型
if (equipmentsJxiopDocMysql.getSystemType().contains(pointImportDto.getSystemType())) { if (!equipmentsJxiopDocMysql.getSystemType().contains(pointImportDto.getSystemType())) {
equipmentsJxiopDocMysql.setSystemType(equipmentsJxiopDocMysql.getSystemType()+","+pointImportDto.getSystemType()); equipmentsJxiopDocMysql.setSystemType(equipmentsJxiopDocMysql.getSystemType()+","+pointImportDto.getSystemType());
esEquipments.setSystemType(equipmentsJxiopDocMysql.getSystemType()+","+pointImportDto.getSystemType()); esEquipments.setSystemType(equipmentsJxiopDocMysql.getSystemType()+","+pointImportDto.getSystemType());
} }
......
...@@ -1378,8 +1378,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1378,8 +1378,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
Map<String, List<String>> queryCodtion = new HashMap<>(); Map<String, List<String>> queryCodtion = new HashMap<>();
Map<String, String> likeMap = new HashMap<>(); Map<String, String> likeMap = new HashMap<>();
queryCodtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId)); queryCodtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
queryCodtion.put(CommonConstans.QueryStringSystemTypeKeyword, Arrays.asList("模拟量")); // queryCodtion.put(CommonConstans.QueryStringSystemTypeKeyword, Arrays.asList("模拟量"));
likeMap.put(CommonConstans.QueryStringFrontMoudle, map.get("boosterName")); likeMap.put(CommonConstans.QueryStringFrontMoudle, map.get("boosterName"));
likeMap.put(CommonConstans.QueryStringSystemTypeKeyword, "模拟量");
if ("1主变高压侧".equals(map.get("boosterName")) || "1主变低压侧".equals(map.get("boosterName"))) { if ("1主变高压侧".equals(map.get("boosterName")) || "1主变低压侧".equals(map.get("boosterName"))) {
likeMap.put(CommonConstans.QueryStringFrontMoudle, "压侧"); likeMap.put(CommonConstans.QueryStringFrontMoudle, "压侧");
List<ESEquipments> listData = commonServiceImpl.getListDataByCondtions(queryCodtion, null, ESEquipments.class, likeMap); List<ESEquipments> listData = commonServiceImpl.getListDataByCondtions(queryCodtion, null, ESEquipments.class, likeMap);
...@@ -1407,6 +1408,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1407,6 +1408,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
} }
} else { } else {
List<ESEquipments> listData = commonServiceImpl.getListDataByCondtions(queryCodtion, null, ESEquipments.class, likeMap); List<ESEquipments> listData = commonServiceImpl.getListDataByCondtions(queryCodtion, null, ESEquipments.class, likeMap);
Integer traceIdCount = listData.stream().filter(esEquipments -> !StringUtils.isEmpty(esEquipments.getTraceId())).collect(Collectors.toList()).size();
if (traceIdCount > 0) {
listData = listData.stream().filter(esEquipments -> !StringUtils.isEmpty(esEquipments.getTraceId())).collect(Collectors.toList());
listData.sort(Comparator.comparing(ESEquipments::getTraceId, Comparator.comparingInt(Integer::parseInt)));
}
ArrayList<Map<String, String>> resultList = new ArrayList<>(); ArrayList<Map<String, String>> resultList = new ArrayList<>();
listData.forEach(item -> { listData.forEach(item -> {
HashMap<String, String> stringStringHashMap = new HashMap<>(); HashMap<String, String> stringStringHashMap = new HashMap<>();
......
## DB properties: ## DB properties:
spring.datasource.url=jdbc:mysql://172.16.3.18:3306/amos_idx_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:mysql://172.16.3.221:3306/amos_idx_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=Yeejoin@2020 spring.datasource.password=Yeejoin@2020
## eureka properties: ## eureka properties:
eureka.instance.hostname=172.16.3.18 eureka.instance.hostname=172.16.3.221
eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:10001/eureka/
## redis properties: ## redis properties:
spring.redis.database=1 spring.redis.database=1
spring.redis.host=172.16.3.18 spring.redis.host=172.16.3.221
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=yeejoin@2020 spring.redis.password=yeejoin@2020
...@@ -43,13 +43,13 @@ lettuce.timeout=10000 ...@@ -43,13 +43,13 @@ lettuce.timeout=10000
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.3.18:2883 emqx.broker=tcp://172.16.3.221:2883
emqx.client-user-name=super emqx.client-user-name=super
emqx.client-password=a123456 emqx.client-password=a123456
emqx.max-inflight=1000 emqx.max-inflight=1000
spring.influx.url=http://39.98.246.31:8086 spring.influx.url=http://172.16.3.221:8086
spring.influx.password=Yeejoin@2020 spring.influx.password=Yeejoin@2020
spring.influx.user=root spring.influx.user=root
spring.influx.database=iot_platform spring.influx.database=iot_platform
......
...@@ -55,8 +55,11 @@ spring.http.encoding.charset=utf-8 ...@@ -55,8 +55,11 @@ spring.http.encoding.charset=utf-8
spring.http.encoding.enabled=true spring.http.encoding.enabled=true
spring.http.encoding.force=true spring.http.encoding.force=true
amos.system.socket.port=7777 amos.system.socket.port=7777
amos.system.user.user-name=qms_sys amos.system.maas.url=172.16.3.221:10005
amos.system.user.user-name=kgd_gdd
amos.system.user.password=a1234560 amos.system.user.password=a1234560
amos.system.user.app-key=AMOS_STUDIO amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=AMOS_STUDIO_WEB amos.system.user.product=AMOS_STUDIO_WEB
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