Commit f7095eb3 authored by zhangsen's avatar zhangsen

脑图API

parent 870bdbd9
...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController; ...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
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.IndicatorData; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IndicatorData;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.TdengineTimeServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexMapper; import com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanHealthIndexMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex; import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper; import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
...@@ -55,53 +56,56 @@ public class TestController extends BaseController { ...@@ -55,53 +56,56 @@ public class TestController extends BaseController {
@Autowired @Autowired
FanHealthIndexMapper fanHealthIndexMapper; FanHealthIndexMapper fanHealthIndexMapper;
@Autowired
TdengineTimeServiceImpl tdengineTimeService;
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "POST", value = "saveTest", notes = "saveTest") @ApiOperation(httpMethod = "POST", value = "saveTest", notes = "saveTest")
@PostMapping("/saveTest") @PostMapping("/saveTest")
public void saveTest () { public void saveTest () {
tdengineTimeService.insertHourData();
QueryWrapper<FanHealthIndex> fanHealthIndexQueryWrapper = new QueryWrapper<>(); // QueryWrapper<FanHealthIndex> fanHealthIndexQueryWrapper = new QueryWrapper<>();
List<FanHealthIndex> fanHealthIndices = fanHealthIndexMapper.selectList(fanHealthIndexQueryWrapper); // List<FanHealthIndex> fanHealthIndices = fanHealthIndexMapper.selectList(fanHealthIndexQueryWrapper);
//
List<IdxBizFanHealthIndex> list = new ArrayList<>(); // List<IdxBizFanHealthIndex> list = new ArrayList<>();
IdxBizFanHealthIndex fanHealthIndex = new IdxBizFanHealthIndex(); // IdxBizFanHealthIndex fanHealthIndex = new IdxBizFanHealthIndex();
fanHealthIndex.setHealthIndex(2.0); // fanHealthIndex.setHealthIndex(2.0);
// fanHealthIndex.setTs(System.currentTimeMillis()); //// fanHealthIndex.setTs(System.currentTimeMillis());
fanHealthIndex.setArae("区域"); // fanHealthIndex.setArae("区域");
fanHealthIndex.setAnalysisEndTime(DateUtil.date()); // fanHealthIndex.setAnalysisEndTime(DateUtil.date());
fanHealthIndex.setAnalysisObjSeq("2"); // fanHealthIndex.setAnalysisObjSeq("2");
fanHealthIndex.setHealthLevel("2321"); // fanHealthIndex.setHealthLevel("2321");
fanHealthIndex.setHealthIndex(25.0); // fanHealthIndex.setHealthIndex(25.0);
fanHealthIndex.setAnalysisStartTime(DateUtil.date()); // fanHealthIndex.setAnalysisStartTime(DateUtil.date());
fanHealthIndex.setAnalysisObjType("21"); // fanHealthIndex.setAnalysisObjType("21");
fanHealthIndex.setANALYSISTIME("21"); // fanHealthIndex.setANALYSISTIME("21");
fanHealthIndex.setANOMALY(2.0); // fanHealthIndex.setANOMALY(2.0);
fanHealthIndex.setEquipmentName("21"); // fanHealthIndex.setEquipmentName("21");
fanHealthIndex.setGatewayId("213412"); // fanHealthIndex.setGatewayId("213412");
fanHealthIndex.setPointName("21312"); // fanHealthIndex.setPointName("21312");
fanHealthIndex.setNumber("213"); // fanHealthIndex.setNumber("213");
fanHealthIndex.setKks("213"); // fanHealthIndex.setKks("213");
fanHealthIndex.setRecDate(DateUtil.date()); // fanHealthIndex.setRecDate(DateUtil.date());
fanHealthIndex.setSubSystem("213421"); // fanHealthIndex.setSubSystem("213421");
fanHealthIndex.setWeigth(2.2); // fanHealthIndex.setWeigth(2.2);
fanHealthIndex.setAnalysisType("按时刻"); // fanHealthIndex.setAnalysisType("按时刻");
fanHealthIndex.setStation("rwwrrw"); // fanHealthIndex.setStation("rwwrrw");
fanHealthIndex.setIndexAddress("2321"); // fanHealthIndex.setIndexAddress("2321");
FanHealthIndex fanHealthIndex1 = new FanHealthIndex(); // FanHealthIndex fanHealthIndex1 = new FanHealthIndex();
BeanUtil.copyProperties(fanHealthIndex, fanHealthIndex1); // BeanUtil.copyProperties(fanHealthIndex, fanHealthIndex1);
fanHealthIndex1.setWeight(fanHealthIndex.getWeigth()); // fanHealthIndex1.setWeight(fanHealthIndex.getWeigth());
fanHealthIndex1.setAnomaly(fanHealthIndex.getANOMALY()); // fanHealthIndex1.setAnomaly(fanHealthIndex.getANOMALY());
fanHealthIndex1.setRecDate(DateUtil.now()); // fanHealthIndex1.setRecDate(DateUtil.now());
fanHealthIndex1.setArea(fanHealthIndex.getArae()); // fanHealthIndex1.setArea(fanHealthIndex.getArae());
fanHealthIndex1.setAnalysisTime(DateUtil.now()); // fanHealthIndex1.setAnalysisTime(DateUtil.now());
fanHealthIndex1.setHealthLevel(fanHealthIndex.getHealthLevel()); // fanHealthIndex1.setHealthLevel(fanHealthIndex.getHealthLevel());
fanHealthIndex1.setKks("123456"); // fanHealthIndex1.setKks("123456");
ArrayList<FanHealthIndex> fanHealthIndices1 = new ArrayList<>(); // ArrayList<FanHealthIndex> fanHealthIndices1 = new ArrayList<>();
fanHealthIndices1.add(fanHealthIndex1); // fanHealthIndices1.add(fanHealthIndex1);
list.add(fanHealthIndex); // list.add(fanHealthIndex);
// commonService.healthWarningMinuteByFJ(); //// commonService.healthWarningMinuteByFJ();
fanHealthIndexMapper.saveBatchHealthIndexList(fanHealthIndices1, "fan_health_index_moment"); // fanHealthIndexMapper.saveBatchHealthIndexList(fanHealthIndices1, "fan_health_index_moment");
} }
} }
...@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.jxiop.biz.dto; ...@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.jxiop.biz.dto;
import lombok.Data; import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data @Data
public class FullViewRecallInfoDTO { public class FullViewRecallInfoDTO {
private String key; private String key;
...@@ -12,4 +15,6 @@ public class FullViewRecallInfoDTO { ...@@ -12,4 +15,6 @@ public class FullViewRecallInfoDTO {
private String status = ""; private String status = "";
private Boolean isRoot = false; private Boolean isRoot = false;
private String category = ""; private String category = "";
private List<FullViewRecallInfoDTO> childList = new ArrayList<>();
private String parentKey;
} }
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