Commit 13152cd7 authored by linruibiao's avatar linruibiao

整改接口

parent b5c12fc1
...@@ -18,7 +18,7 @@ import java.util.List; ...@@ -18,7 +18,7 @@ import java.util.List;
* @author : lin * @author : lin
* @date : 2021-03-25 18:39 * @date : 2021-03-25 18:39
**/ **/
@RequestMapping("/depts") @RequestMapping("/departments")
@RestController @RestController
@Api(value = "部门信息接口", description = "部门信息接口") @Api(value = "部门信息接口", description = "部门信息接口")
public class DeptController { public class DeptController {
......
...@@ -2,12 +2,10 @@ package com.syc.slm.slmbi.controller; ...@@ -2,12 +2,10 @@ package com.syc.slm.slmbi.controller;
import com.syc.slm.common.core.util.R; import com.syc.slm.common.core.util.R;
import com.syc.slm.slmbi.dto.InstrumentPanelConfigDTO; import com.syc.slm.slmbi.dto.InstrumentPanelConfigDTO;
import com.syc.slm.slmbi.dto.InstrumentPanelPermissionDTO;
import com.syc.slm.slmbi.service.InstrumentPanelConfigService; import com.syc.slm.slmbi.service.InstrumentPanelConfigService;
import com.syc.slm.slmbi.vo.InstrumentPanelConfigVo; import com.syc.slm.slmbi.vo.InstrumentPanelConfigVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
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.*;
...@@ -22,7 +20,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -22,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
@RequestMapping("/panel-configs") @RequestMapping("/panel-configs")
@RestController @RestController
@Api(value = "仪表板样式以及数据配置", description = "仪表板样式以及数据配置") @Api(value = "仪表板样式以及数据配置")
public class InstrumentPanelConfigController { public class InstrumentPanelConfigController {
@Autowired @Autowired
...@@ -30,34 +28,22 @@ public class InstrumentPanelConfigController { ...@@ -30,34 +28,22 @@ public class InstrumentPanelConfigController {
@PostMapping @PostMapping
@ApiOperation("保存仪表板样式以及数据配置") @ApiOperation("保存仪表板样式以及数据配置")
@ApiImplicitParams({@ApiImplicitParam(name = "instrumentPanelId", value = "仪表板id", required = true),
@ApiImplicitParam(name = "visitPermission",
value = "访问权限",
required = true,
dataTypeClass = InstrumentPanelPermissionDTO.class),
@ApiImplicitParam(name = "configDetails", value = "仪表板配置详情", required = true)})
public R<String> saveInstrumentPanelConfig(@RequestBody InstrumentPanelConfigDTO config) { public R<String> saveInstrumentPanelConfig(@RequestBody InstrumentPanelConfigDTO config) {
return R.ok(instrumentPanelConfigService.saveInstrumentPanelConfig(config, 1)); return R.ok(instrumentPanelConfigService.saveConfig(config));
} }
@PostMapping("/publish") @PostMapping("/publish")
@ApiOperation("保存发布仪表板样式以及数据配置") @ApiOperation("保存发布仪表板样式以及数据配置")
@ApiImplicitParams({@ApiImplicitParam(name = "instrumentPanelId", value = "仪表板id", required = true),
@ApiImplicitParam(name = "visitPermission",
value = "访问权限",
required = true,
dataTypeClass = InstrumentPanelPermissionDTO.class),
@ApiImplicitParam(name = "configDetails", value = "仪表板配置详情", required = true)})
public R<String> publish(@RequestBody InstrumentPanelConfigDTO config) { public R<String> publish(@RequestBody InstrumentPanelConfigDTO config) {
return R.ok(instrumentPanelConfigService.publish(config)); return R.ok(instrumentPanelConfigService.publish(config));
} }
@GetMapping("{panelId}") @GetMapping("/{panelId}")
@ApiOperation("根据仪表板id获取仪表板配置") @ApiOperation("根据仪表板id获取仪表板配置")
@ApiImplicitParam(name = "panelId", value = "仪表板id") @ApiImplicitParam(name = "panelId", value = "仪表板id")
public R<InstrumentPanelConfigVo> getInstrumentPanelConfigByInstrumentPanelId( public R<InstrumentPanelConfigVo> getConfigByPanelId(
@PathVariable("panelId") String panelId) { @PathVariable("panelId") String panelId) {
return R.ok(instrumentPanelConfigService.getInstrumentPanelConfigByInstrumentPanelId(panelId)); return R.ok(instrumentPanelConfigService.getConfigByPanelId(panelId));
} }
} }
...@@ -2,8 +2,8 @@ package com.syc.slm.slmbi.controller; ...@@ -2,8 +2,8 @@ package com.syc.slm.slmbi.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.syc.slm.common.core.util.R; import com.syc.slm.common.core.util.R;
import com.syc.slm.slmbi.dto.InstrumentPanelDTO; import com.syc.slm.slmbi.dto.SaveInstrumentPanelDTO;
import com.syc.slm.slmbi.entity.InstrumentPanel; import com.syc.slm.slmbi.dto.SearchInstrumentPanelDTO;
import com.syc.slm.slmbi.service.InstrumentPanelService; import com.syc.slm.slmbi.service.InstrumentPanelService;
import com.syc.slm.slmbi.vo.InstrumentPanelVo; import com.syc.slm.slmbi.vo.InstrumentPanelVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -29,24 +29,29 @@ public class InstrumentPanelController { ...@@ -29,24 +29,29 @@ public class InstrumentPanelController {
@Autowired @Autowired
private InstrumentPanelService instrumentPanelService; private InstrumentPanelService instrumentPanelService;
/**
* where :{name:'',creator:'',updater:'',startDate:'' ,endDate:'',recordStatus:''}
*
* @param where
* @return
*/
@GetMapping @GetMapping
@ApiOperation("仪表板列表") @ApiOperation("仪表板列表")
public R<IPage<InstrumentPanelVo>> selectInstrumentPanelList(@RequestBody public R<IPage<InstrumentPanelVo>> selectInstrumentPanelList(@RequestBody SearchInstrumentPanelDTO where) {
InstrumentPanelDTO where) { //where :{name:'',creator:'',updater:'',startDate:'' ,endDate:'',recordStatus:''}
return R.ok(instrumentPanelService.selectInstrumentPanelList(where)); return R.ok(instrumentPanelService.selectInstrumentPanelList(where));
} }
@PostMapping @PostMapping
@ApiOperation("新增仪表板") @ApiOperation("新增仪表板")
public R<String> saveInstrumentPanel(@RequestBody InstrumentPanel panel) { public R<String> saveInstrumentPanel(@RequestBody SaveInstrumentPanelDTO panel) {
return R.ok(instrumentPanelService.saveInstrumentPanel(panel)); return R.ok(instrumentPanelService.savePanel(panel));
} }
@PutMapping("/batch-push") @PutMapping("/batch-publish")
@ApiOperation("批量发布") @ApiOperation("批量发布")
@ApiImplicitParam(name = "ids", value = "仪表板id集合", required = true) @ApiImplicitParam(name = "ids", value = "仪表板id集合", required = true)
public R<Boolean> batchPush(@RequestBody List<String> ids) { public R<Boolean> batchPublish(@RequestBody List<String> ids) {
return R.ok(instrumentPanelService.batchPushInstrumentPanel(ids, 1)); return R.ok(instrumentPanelService.batchPublish(ids));
} }
@PutMapping("/{id}/offline") @PutMapping("/{id}/offline")
...@@ -59,28 +64,28 @@ public class InstrumentPanelController { ...@@ -59,28 +64,28 @@ public class InstrumentPanelController {
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
@ApiOperation("删除仪表板") @ApiOperation("删除仪表板")
@ApiImplicitParam(name = "id", value = "仪表板id", required = true) @ApiImplicitParam(name = "id", value = "仪表板id", required = true)
public R<String> delPushInstrumentPanel(@PathVariable("id") String id) { public R<String> delInstrumentPanel(@PathVariable("id") String id) {
return R.ok(instrumentPanelService.delPushInstrumentPanel(id)); return R.ok(instrumentPanelService.delPanel(id));
} }
@PostMapping("/save-as") @PostMapping("/save-as")
@ApiOperation("另存为") @ApiOperation("另存为")
public R<String> saveAs(@RequestBody InstrumentPanelDTO instrumentPanelDTO) { public R<String> saveAs(@RequestBody SaveInstrumentPanelDTO panelDTO) {
return R.ok(instrumentPanelService.saveInstrumentPanel(instrumentPanelDTO)); return R.ok(instrumentPanelService.saveAsPanel(panelDTO));
} }
@PostMapping("/show-recovery-btn/{id}") @PostMapping("/{id}/show-recovery-btn")
@ApiOperation("是否显示恢复按钮") @ApiOperation("是否显示恢复按钮")
@ApiImplicitParam(name = "id", value = "仪表板id", required = true) @ApiImplicitParam(name = "id", value = "仪表板id", required = true)
public R<Boolean> showRecoveryBtn(@PathVariable("id") String id) { public R<Boolean> showRecoveryBtn(@PathVariable("id") String id) {
return R.ok(instrumentPanelService.showRecoveryBtn(id)); return R.ok(instrumentPanelService.showRecoveryBtn(id));
} }
@PutMapping("/recovery/{id}") @PutMapping("/{id}/recovery")
@ApiOperation("恢复按钮操作") @ApiOperation("恢复按钮操作")
@ApiImplicitParam(name = "id", value = "仪表板id", required = true) @ApiImplicitParam(name = "id", value = "仪表板id", required = true)
public R<String> recoveryInstrumentPanel(@PathVariable("id") String id) { public R<String> recoveryInstrumentPanel(@PathVariable("id") String id) {
return R.ok(instrumentPanelService.recoveryInstrumentPanel(id)); return R.ok(instrumentPanelService.recoveryPanel(id));
} }
} }
...@@ -2,7 +2,6 @@ package com.syc.slm.slmbi.controller; ...@@ -2,7 +2,6 @@ package com.syc.slm.slmbi.controller;
import com.syc.slm.common.core.util.R; import com.syc.slm.common.core.util.R;
import com.syc.slm.slmbi.dto.InstrumentPanelGroupDTO; import com.syc.slm.slmbi.dto.InstrumentPanelGroupDTO;
import com.syc.slm.slmbi.entity.InstrumentPanelGroup;
import com.syc.slm.slmbi.service.InstrumentPanelGroupService; import com.syc.slm.slmbi.service.InstrumentPanelGroupService;
import com.syc.slm.slmbi.vo.InstrumentPanelGroupVo; import com.syc.slm.slmbi.vo.InstrumentPanelGroupVo;
import com.syc.slm.slmbi.vo.PanelGroupVo; import com.syc.slm.slmbi.vo.PanelGroupVo;
...@@ -33,7 +32,7 @@ public class InstrumentPanelGroupController { ...@@ -33,7 +32,7 @@ public class InstrumentPanelGroupController {
@GetMapping @GetMapping
@ApiOperation("第一次进入页面,或者点击查询,获取全部分组下的仪表板数据,以及分组数据") @ApiOperation("第一次进入页面,或者点击查询,获取全部分组下的仪表板数据,以及分组数据")
@ApiImplicitParam(name = "name", value = "分组名称或者仪表板名称") @ApiImplicitParam(name = "name", value = "分组名称或者仪表板名称")
public R<List<PanelGroupVo>> selectInstrumentPanelGroupList( public R<List<PanelGroupVo>> loadTrees(
@RequestParam(value = "name", required = false) String name) { @RequestParam(value = "name", required = false) String name) {
return R.ok(instrumentPanelGroupService.loadTrees(name)); return R.ok(instrumentPanelGroupService.loadTrees(name));
} }
...@@ -50,25 +49,25 @@ public class InstrumentPanelGroupController { ...@@ -50,25 +49,25 @@ public class InstrumentPanelGroupController {
@GetMapping("/selectInstrumentPanelGroups") @GetMapping("/selectInstrumentPanelGroups")
@ApiOperation("获取所有的仪表板分组以及分组下的仪表板以及仪表板下的组件") @ApiOperation("获取所有的仪表板分组以及分组下的仪表板以及仪表板下的组件")
public R<List<InstrumentPanelGroupVo>> selectInstrumentPanelGroups() { public R<List<InstrumentPanelGroupVo>> selectInstrumentPanelGroups() {
return R.ok(instrumentPanelGroupService.selectInstrumentPanelGroupList()); return R.ok(instrumentPanelGroupService.selectGroupList());
} }
@PostMapping @PostMapping
@ApiOperation("保存仪表板分组") @ApiOperation("保存仪表板分组")
public R<String> saveInstrumentPanelGroup(@RequestBody InstrumentPanelGroupDTO group) { public R<String> saveGroup(@RequestBody InstrumentPanelGroupDTO group) {
return R.ok(instrumentPanelGroupService.saveInstrumentPanelGroup(group)); return R.ok(instrumentPanelGroupService.saveGroup(group));
} }
@PutMapping @PutMapping
@ApiOperation("更新仪表板分组") @ApiOperation("更新仪表板分组")
public R<String> updateInstrumentPanelGroup(@RequestBody InstrumentPanelGroupDTO group) { public R<String> updateGroup(@RequestBody InstrumentPanelGroupDTO group) {
return R.ok(instrumentPanelGroupService.updateInstrumentPanelGroup(group)); return R.ok(instrumentPanelGroupService.updateGroup(group));
} }
@DeleteMapping("/{groupId}") @DeleteMapping("/{groupId}")
@ApiOperation("删除仪表板分组") @ApiOperation("删除仪表板分组")
public R<String> delInstrumentPanelGroup(@PathVariable String groupId) { public R<String> delGroup(@PathVariable String groupId) {
return R.ok(instrumentPanelGroupService.delInstrumentPanelGroup(groupId)); return R.ok(instrumentPanelGroupService.delGroup(groupId));
} }
} }
...@@ -21,38 +21,37 @@ import java.util.List; ...@@ -21,38 +21,37 @@ import java.util.List;
**/ **/
@Api(value = "仪表板权限控制") @Api(value = "仪表板权限控制")
@RestController @RestController
@RequestMapping("/panel/permissions") @RequestMapping("/panel-permissions")
public class InstrumentPanelPermissionController { public class InstrumentPanelPermissionController {
@Autowired @Autowired
private InstrumentPanelPermissionService instrumentPanelPermissionService; private InstrumentPanelPermissionService instrumentPanelPermissionService;
@PostMapping @PostMapping
@ApiOperation("保存仪表板权限") @ApiOperation("保存仪表板权限(列表的属性保存)")
public R<String> saveInstrumentPanelPermission(@RequestBody List<InstrumentPanelPermissionDTO> permissions) { public R<String> savePermission(@RequestBody List<InstrumentPanelPermissionDTO> permissions) {
return R.ok(instrumentPanelPermissionService.saveInstrumentPanelPermission(permissions)); return R.ok(instrumentPanelPermissionService.savePermission(permissions));
} }
@PostMapping("/to-copy/{panelId}") @PostMapping("/{panelId}/to-copy")
@ApiOperation("从其他仪表板复制配置") @ApiOperation("从其他仪表板复制配置")
@ApiImplicitParam(name = "panelId", value = "其他仪表板id", required = true) @ApiImplicitParam(name = "panelId", value = "其他仪表板id", required = true)
public R<List<InstrumentPanelPermissionVo>> saveCopyOtherInstrumentPanelPermission(@PathVariable String panelId) { public R<List<InstrumentPanelPermissionVo>> saveCopyOtherPermission(@PathVariable String panelId) {
return R.ok(instrumentPanelPermissionService.saveCopyOtherInstrumentPanelPermission(panelId)); return R.ok(instrumentPanelPermissionService.saveCopyOtherPermission(panelId));
} }
@PostMapping("/copy-to/{panelId}") @PostMapping("/{panelId}/copy-to")
@ApiOperation("将仪表板权限复制给其他仪表板") @ApiOperation("将仪表板权限复制给其他仪表板")
@ApiImplicitParam(name = "panelId", value = "其他仪表板id", required = true) @ApiImplicitParam(name = "panelId", value = "其他仪表板id", required = true)
public R<String> saveCopyToOtherInstrumentPanelPermission( public R<String> saveCopyToOtherPermission(@RequestBody List<InstrumentPanelPermissionDTO> permissions,
@RequestBody List<InstrumentPanelPermissionDTO> permissions, @PathVariable("panelId") String panelId) { @PathVariable String panelId) {
return R.ok(instrumentPanelPermissionService.saveCopyToOtherInstrumentPanelPermission(permissions, panelId)); return R.ok(instrumentPanelPermissionService.saveCopyToOtherPermission(permissions, panelId));
} }
@GetMapping("/{panelId}") @GetMapping("/{panelId}")
@ApiOperation("根据仪表板id获取仪表板权限") @ApiOperation("根据仪表板id获取仪表板权限")
@ApiImplicitParam(name = "panelId", value = "仪表板id", required = true) @ApiImplicitParam(name = "panelId", value = "仪表板id", required = true)
public R<List<InstrumentPanelPermissionVo>> selectInstrumentPanelPermissionById( public R<List<InstrumentPanelPermissionVo>> selectPermissionByPanelId(@PathVariable String panelId) {
@PathVariable("panelId") String panelId) { return R.ok(instrumentPanelPermissionService.selectPermissionByPanelId(panelId));
return R.ok(instrumentPanelPermissionService.selectInstrumentPanelPermissionById(panelId));
} }
} }
...@@ -2,14 +2,12 @@ package com.syc.slm.slmbi.controller; ...@@ -2,14 +2,12 @@ package com.syc.slm.slmbi.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.syc.slm.common.core.util.R; import com.syc.slm.common.core.util.R;
import com.syc.slm.slmbi.dto.HistoryVariableDTO;
import com.syc.slm.slmbi.dto.RealTimeVariableDTO;
import com.syc.slm.slmbi.dto.VariableDTO; import com.syc.slm.slmbi.dto.VariableDTO;
import com.syc.slm.slmbi.service.VariableService; import com.syc.slm.slmbi.service.VariableService;
import com.syc.slm.slmbi.vo.VariableDeviceVo; import com.syc.slm.slmbi.vo.*;
import com.syc.slm.slmbi.vo.VariableSourceVo;
import com.syc.slm.slmbi.vo.VariableVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -18,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -18,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* slm-bi * slm-bi
...@@ -35,44 +34,32 @@ public class VariableController { ...@@ -35,44 +34,32 @@ public class VariableController {
@GetMapping @GetMapping
@ApiOperation("获取变量列表") @ApiOperation("获取变量列表")
@ApiImplicitParams({@ApiImplicitParam(name = "sourceId", value = "变量来源"),
@ApiImplicitParam(name = "deviceId", value = "所属设备"),
@ApiImplicitParam(name = "variableName", value = "变量名称"),
@ApiImplicitParam(name = "description", value = "描述")})
public R<IPage<VariableVo>> getVariableList(@RequestBody VariableDTO variableDTO) { public R<IPage<VariableVo>> getVariableList(@RequestBody VariableDTO variableDTO) {
return R.ok(variableService.getVariableList(variableDTO)); return R.ok(variableService.getVariableList(variableDTO));
} }
@GetMapping("real-time") @GetMapping("/real-time")
@ApiOperation("获取变量实时数据") @ApiOperation("获取变量实时数据")
@ApiImplicitParams({@ApiImplicitParam(name = "variableIds", value = "变量集合ids", required = true), public R<Map<String, List<Map<String, RealTimeVariableVo>>>> getVariableRealTimeDataList(
@ApiImplicitParam(name = "format", value = "时间格式", required = true), @RequestBody RealTimeVariableDTO variableDTO) {
@ApiImplicitParam(name = "interval", value = "时间间隔,代表(天,时,分,秒)", required = true), return R.ok(variableService.getVariableRealTimeDataList(variableDTO));
@ApiImplicitParam(name = "deviceId", value = "所属设备", required = true)})
public R getVariableRealTimeDataList(@RequestBody VariableDTO variableDTO) {
return R.ok();
} }
@GetMapping("source") @GetMapping("/source")
@ApiOperation("获取变量来源列表") @ApiOperation("获取变量来源列表")
public R<List<VariableSourceVo>> getVariableSourceList() { public R<List<VariableSourceVo>> getVariableSourceList() {
return R.ok(variableService.getVariableSourceList()); return R.ok(variableService.getVariableSourceList());
} }
@GetMapping("device") @GetMapping("/device")
@ApiOperation("获取变量所属设备列表") @ApiOperation("获取变量所属设备列表")
public R<List<VariableDeviceVo>> getVariableDeviceList() { public R<List<VariableDeviceVo>> getVariableDeviceList() {
return R.ok(variableService.getVariableDeviceList()); return R.ok(variableService.getVariableDeviceList());
} }
@GetMapping("history") @GetMapping("/history")
@ApiOperation("获取变量历史数据") @ApiOperation("获取变量历史数据")
@ApiImplicitParams({@ApiImplicitParam(name = "variableIds", value = "变量集合ids", required = true), public R<Map<String, List<Map<String, HistoryVariableVo>>>> getVariableHistoryDataList(@RequestBody HistoryVariableDTO variableDTO) {
@ApiImplicitParam(name = "deviceId", value = "所属设备", required = true), return R.ok(variableService.getVariableHistoryDataList(variableDTO));
@ApiImplicitParam(name = "statisticsType", value = "统计类型,代表(合计值,平均值,最大值,最小值)", required = true),
@ApiImplicitParam(name = "startTime", value = "开始时间", required = true),
@ApiImplicitParam(name = "endTime", value = "结束时间", required = true)})
public R getVariableHistoryDataList(@RequestBody VariableDTO variableDTO) {
return R.ok();
} }
} }
package com.syc.slm.slmbi.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
* slm-bi
* 历史变量数据查询DTO
* @author : lin
* @date : 2021-03-30 15:21
**/
@Data
@ApiModel(value = "历史变量数据查询DTO")
@EqualsAndHashCode(callSuper=false)
public class HistoryVariableDTO {
@ApiModelProperty(value = "所属设备", required = true)
private String deviceId;
@ApiModelProperty(value = "统计类型,代表(合计值 1,平均值 2,最大值 3,最小值 4)", required = true)
private Integer statisticsType;
@ApiModelProperty(value = "变量集合ids", required = true)
private List<String> variableIds;
@ApiModelProperty(value = "开始时间",required = true)
private Date startTime;
@ApiModelProperty(value = "结束时间", required = true)
private Date endTime;
@ApiModelProperty(value = "以变量为维度是1 , 以时间为维度是2", required = true)
private Integer dimension;
}
package com.syc.slm.slmbi.dto; package com.syc.slm.slmbi.dto;
import com.syc.slm.slmbi.entity.InstrumentPanelConfig;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.List; /**
import java.util.Map; * slm-bi
* 仪表板样式,数据配置显示类
*
* @author : lin
* @date : 2021-03-25 15:39
**/
@Data @Data
@ApiModel(value = "仪表板配置DTO",description ="仪表板配置DTO" ) @ApiModel(value = "仪表板配置DTO")
@EqualsAndHashCode(callSuper=true) @EqualsAndHashCode(callSuper = false)
public class InstrumentPanelConfigDTO extends InstrumentPanelConfig { public class InstrumentPanelConfigDTO {
@ApiModelProperty("配置详情集合") @ApiModelProperty(value = "仪表板id", required = true)
private List<Map<String,Object>> configs; private String instrumentPanelId;
@ApiModelProperty(value = "仪表板配置详情,包含了样式,数据配置", required = true)
private String configDetails;
@ApiModelProperty(value = "访问权限", required = true)
private InstrumentPanelPermissionDTO visitPermission;
} }
package com.syc.slm.slmbi.dto; package com.syc.slm.slmbi.dto;
import com.syc.slm.slmbi.entity.InstrumentPanelGroup;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -12,9 +12,14 @@ import lombok.EqualsAndHashCode; ...@@ -12,9 +12,14 @@ import lombok.EqualsAndHashCode;
* @author : lin * @author : lin
* @date : 2021-03-25 16:47 * @date : 2021-03-25 16:47
**/ **/
@ApiModel(value = "仪表板分组DTO",description = "仪表板分组DTO") @ApiModel(value = "仪表板分组DTO", description = "仪表板分组DTO")
@Data @Data
@EqualsAndHashCode(callSuper=true) @EqualsAndHashCode(callSuper = false)
public class InstrumentPanelGroupDTO extends InstrumentPanelGroup { public class InstrumentPanelGroupDTO {
@ApiModelProperty(value = "仪表板分组主键(保存非必填)", required = true)
private String id;
@ApiModelProperty(value = "仪表板分组父级主键", required = true)
private String parentId;
@ApiModelProperty(value = "仪表板分组名称", required = true)
private String name;
} }
...@@ -18,19 +18,19 @@ import lombok.EqualsAndHashCode; ...@@ -18,19 +18,19 @@ import lombok.EqualsAndHashCode;
public class InstrumentPanelPermissionDTO { public class InstrumentPanelPermissionDTO {
@ApiModelProperty(value = "主键id") @ApiModelProperty(value = "主键id")
private String id; private String id;
@ApiModelProperty(value = "仪表板id") @ApiModelProperty(value = "仪表板id",required = true)
private String instrumentPanelId; private String instrumentPanelId;
@ApiModelProperty(value = "仪表板名称") @ApiModelProperty(value = "仪表板名称",required = true)
private String instrumentPanelName; private String instrumentPanelName;
@ApiModelProperty(value = "仪表板分组id") @ApiModelProperty(value = "仪表板分组id",required = true)
private String instrumentPanelGroupId; private String instrumentPanelGroupId;
@ApiModelProperty(value = "仪表板分组名称") @ApiModelProperty(value = "仪表板分组名称",required = true)
private String instrumentPanelGroupName; private String instrumentPanelGroupName;
@ApiModelProperty(value = "存储类型,1代表岗位,2代表部门,3 代表个体用户") @ApiModelProperty(value = "存储类型,1代表岗位,2代表部门,3 代表个体用户",required = true)
private Integer permissionType; private Integer permissionType;
@ApiModelProperty(value = "代表岗位,部门,个体用户id") @ApiModelProperty(value = "代表岗位1,部门2,个体用户id 3")
private String bizId; private String bizId;
@ApiModelProperty(value = "代表岗位,部门,个体用户名称") @ApiModelProperty(value = "代表岗位,部门,个体用户名称")
private String bizName; private String bizName;
......
package com.syc.slm.slmbi.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* slm-bi
* 实时变量DTO
* @author : lin
* @date : 2021-03-30 15:05
**/
@ApiModel("实时变量DTO")
@Data
public class RealTimeVariableDTO {
@ApiModelProperty(value = "所属设备", required = true)
private String deviceId;
@ApiModelProperty(value = "时间格式", required = true)
private String format;
@ApiModelProperty(value = "时间间隔,代表(天,时,分,秒)", required = true)
private Integer interval;
@ApiModelProperty(value = "统计类型,代表(合计值,平均值,最大值,最小值)", required = true)
private Integer statisticsType;
@ApiModelProperty(value = "变量集合ids", required = true)
private List<String> variableIds;
@ApiModelProperty(value = "以变量为维度是1 , 以时间为维度是2", required = true)
private Integer dimension;
}
package com.syc.slm.slmbi.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* slm-bi
* 保存仪表板DTO
*
* @author : lin
* @date : 2021-03-30 16:11
**/
@ApiModel(value = "查询仪表板列表DTO")
@Data
@EqualsAndHashCode(callSuper = false)
public class SaveInstrumentPanelDTO {
@ApiModelProperty(value = "仪表板名称", required = true)
private String name;
@ApiModelProperty(value = "仪表板归属分组", required = true)
private String groupId;
}
package com.syc.slm.slmbi.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* slm-bi
* 查询仪表板列表DTO
*
* @author : lin
* @date : 2021-03-30 16:07
**/
@ApiModel(value = "查询仪表板列表DTO")
@Data
@EqualsAndHashCode(callSuper = false)
public class SearchInstrumentPanelDTO {
@ApiModelProperty(value = "仪表板名称")
private String name;
@ApiModelProperty(value = "仪表板归属分组")
private String groupId;
@ApiModelProperty(value = "创建人名称")
private String creatorName;
@ApiModelProperty(value = "修改人名称")
private String updaterName;
@ApiModelProperty(value = "修改时间")
private Date updateTime;
@ApiModelProperty(value = "状态")
private Integer recordStatus;
}
...@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode; ...@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
* @date : 2021-03-25 19:05 * @date : 2021-03-25 19:05
**/ **/
@Data @Data
@ApiModel(value = "变量DTO",description = "变量DTO") @ApiModel(value = "变量DTO")
@EqualsAndHashCode(callSuper=false) @EqualsAndHashCode(callSuper=false)
public class VariableDTO { public class VariableDTO {
@ApiModelProperty(value = "变量来源") @ApiModelProperty(value = "变量来源")
......
...@@ -22,6 +22,9 @@ public class InstrumentPanel extends BaseEntity<InstrumentPanel>{ ...@@ -22,6 +22,9 @@ public class InstrumentPanel extends BaseEntity<InstrumentPanel>{
private String name; private String name;
@ApiModelProperty(value = "仪表板归属分组") @ApiModelProperty(value = "仪表板归属分组")
private String groupId; private String groupId;
@ApiModelProperty(value = "访问权限(公开 1,自定义 2,私有 3)")
private String visitPermission;
} }
...@@ -4,21 +4,31 @@ import com.sun.istack.NotNull; ...@@ -4,21 +4,31 @@ import com.sun.istack.NotNull;
import com.syc.slm.slmbi.dto.InstrumentPanelConfigDTO; import com.syc.slm.slmbi.dto.InstrumentPanelConfigDTO;
import com.syc.slm.slmbi.vo.InstrumentPanelConfigVo; import com.syc.slm.slmbi.vo.InstrumentPanelConfigVo;
/**
* slm-bi
* 仪表板配置
*
* @author : lin
* @date : 2021-03-25 15:10
**/
public interface InstrumentPanelConfigService { public interface InstrumentPanelConfigService {
/**
* 保存仪表板配置
* @param config
* @param optType
* @return
*/
String saveInstrumentPanelConfig(InstrumentPanelConfigDTO config,Integer optType);
/** /**
* 根据仪表板id获取对应配置 * 根据仪表板id获取对应配置
* @param instrumentPanelId * @param instrumentPanelId
* @return * @return
*/ */
InstrumentPanelConfigVo getInstrumentPanelConfigByInstrumentPanelId(@NotNull String instrumentPanelId); InstrumentPanelConfigVo getConfigByPanelId(@NotNull String instrumentPanelId);
/**
* 保存发布仪表板配置
* @param config
* @return
*/
String publish(InstrumentPanelConfigDTO config); String publish(InstrumentPanelConfigDTO config);
/**
* 保存仪表板配置
* @param config
* @return
*/
String saveConfig(InstrumentPanelConfigDTO config);
} }
...@@ -22,28 +22,28 @@ public interface InstrumentPanelGroupService extends IService<InstrumentPanelGro ...@@ -22,28 +22,28 @@ public interface InstrumentPanelGroupService extends IService<InstrumentPanelGro
* 查询仪表板分组 * 查询仪表板分组
* @return * @return
*/ */
List<InstrumentPanelGroupVo> selectInstrumentPanelGroupList(); List<InstrumentPanelGroupVo> selectGroupList();
/** /**
* 删除仪表板分组 * 删除仪表板分组
* @param groupId * @param groupId
* @return * @return
*/ */
String delInstrumentPanelGroup(@NonNull String groupId); String delGroup(@NonNull String groupId);
/** /**
* 修改仪表板分组 * 修改仪表板分组
* @param group * @param group
* @return * @return
*/ */
String updateInstrumentPanelGroup(InstrumentPanelGroupDTO group); String updateGroup(InstrumentPanelGroupDTO group);
/** /**
* 保存仪表板分组 * 保存仪表板分组
* @param group * @param group
* @return * @return
*/ */
String saveInstrumentPanelGroup(InstrumentPanelGroupDTO group); String saveGroup(InstrumentPanelGroupDTO group);
/** /**
* 加载仪表板树 * 加载仪表板树
......
...@@ -9,30 +9,34 @@ import java.util.List; ...@@ -9,30 +9,34 @@ import java.util.List;
public interface InstrumentPanelPermissionService { public interface InstrumentPanelPermissionService {
/** /**
* 保存仪表板权限 * 保存仪表板权限
*
* @param permissions * @param permissions
* @return * @return
*/ */
String saveInstrumentPanelPermission(List<InstrumentPanelPermissionDTO> permissions); String savePermission(List<InstrumentPanelPermissionDTO> permissions);
/** /**
* 从其他仪表板复制配置 * 从其他仪表板复制配置
*
* @param instrumentPanelId * @param instrumentPanelId
* @return * @return
*/ */
List<InstrumentPanelPermissionVo> saveCopyOtherInstrumentPanelPermission(@NonNull String instrumentPanelId); List<InstrumentPanelPermissionVo> saveCopyOtherPermission(@NonNull String instrumentPanelId);
/** /**
* 将仪表板权限复制给其他仪表板 * 将仪表板权限复制给其他仪表板
*
* @param permissions * @param permissions
* @param otherInstrumentPanelId * @param otherInstrumentPanelId
* @return * @return
*/ */
String saveCopyToOtherInstrumentPanelPermission(List<InstrumentPanelPermissionDTO> permissions, String otherInstrumentPanelId); String saveCopyToOtherPermission(List<InstrumentPanelPermissionDTO> permissions, String otherInstrumentPanelId);
/** /**
* 根据仪表板id获取仪表板权限 * 根据仪表板id获取仪表板权限
*
* @param instrumentPanelId * @param instrumentPanelId
* @return * @return
*/ */
List<InstrumentPanelPermissionVo> selectInstrumentPanelPermissionById(@NonNull String instrumentPanelId); List<InstrumentPanelPermissionVo> selectPermissionByPanelId(@NonNull String instrumentPanelId);
} }
...@@ -2,7 +2,8 @@ package com.syc.slm.slmbi.service; ...@@ -2,7 +2,8 @@ package com.syc.slm.slmbi.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.syc.slm.slmbi.dto.InstrumentPanelDTO; import com.syc.slm.slmbi.dto.SaveInstrumentPanelDTO;
import com.syc.slm.slmbi.dto.SearchInstrumentPanelDTO;
import com.syc.slm.slmbi.entity.InstrumentPanel; import com.syc.slm.slmbi.entity.InstrumentPanel;
import com.syc.slm.slmbi.vo.InstrumentPanelVo; import com.syc.slm.slmbi.vo.InstrumentPanelVo;
...@@ -18,42 +19,47 @@ import java.util.List; ...@@ -18,42 +19,47 @@ import java.util.List;
public interface InstrumentPanelService extends IService<InstrumentPanel> { public interface InstrumentPanelService extends IService<InstrumentPanel> {
/** /**
* 仪表板列表 * 仪表板列表
*
* @param where * @param where
* @return * @return
*/ */
IPage<InstrumentPanelVo> selectInstrumentPanelList(InstrumentPanelDTO where); IPage<InstrumentPanelVo> selectInstrumentPanelList(SearchInstrumentPanelDTO where);
/** /**
* 保存仪表板 * 保存仪表板
*
* @param panel * @param panel
* @return * @return
*/ */
String saveInstrumentPanel(InstrumentPanel panel); String savePanel(SaveInstrumentPanelDTO panel);
/** /**
* 批量推送 * 批量推送
*
* @param ids * @param ids
* @param optType
* @return * @return
*/ */
Boolean batchPushInstrumentPanel(List<String> ids, Integer optType); Boolean batchPublish(List<String> ids);
/** /**
* 删除仪表板 * 删除仪表板
*
* @param id * @param id
* @return * @return
*/ */
String delPushInstrumentPanel(String id); String delPanel(String id);
/** /**
* 另存为 * 另存为
*
* @param instrumentPanelDTO * @param instrumentPanelDTO
* @return * @return
*/ */
String saveAsInstrumentPanel(InstrumentPanelDTO instrumentPanelDTO); String saveAsPanel(SaveInstrumentPanelDTO instrumentPanelDTO);
/** /**
* 是否显示恢复按钮 * 是否显示恢复按钮
*
* @param id * @param id
* @return * @return
*/ */
...@@ -61,13 +67,15 @@ public interface InstrumentPanelService extends IService<InstrumentPanel> { ...@@ -61,13 +67,15 @@ public interface InstrumentPanelService extends IService<InstrumentPanel> {
/** /**
* 恢复按钮操作 * 恢复按钮操作
*
* @param id * @param id
* @return * @return
*/ */
String recoveryInstrumentPanel(String id); String recoveryPanel(String id);
/** /**
* 下线 * 下线
*
* @param id * @param id
* @return * @return
*/ */
......
package com.syc.slm.slmbi.service; package com.syc.slm.slmbi.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.syc.slm.slmbi.dto.HistoryVariableDTO;
import com.syc.slm.slmbi.dto.RealTimeVariableDTO;
import com.syc.slm.slmbi.dto.VariableDTO; import com.syc.slm.slmbi.dto.VariableDTO;
import com.syc.slm.slmbi.vo.VariableDeviceVo; import com.syc.slm.slmbi.vo.*;
import com.syc.slm.slmbi.vo.VariableSourceVo;
import com.syc.slm.slmbi.vo.VariableVo;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* slm-bi * slm-bi
...@@ -35,4 +36,7 @@ public interface VariableService { ...@@ -35,4 +36,7 @@ public interface VariableService {
*/ */
List<VariableDeviceVo> getVariableDeviceList(); List<VariableDeviceVo> getVariableDeviceList();
Map<String, List<Map<String, RealTimeVariableVo>>> getVariableRealTimeDataList(RealTimeVariableDTO variableDTO);
Map<String, List<Map<String, HistoryVariableVo>>> getVariableHistoryDataList(HistoryVariableDTO variableDTO);
} }
...@@ -14,18 +14,20 @@ import org.springframework.stereotype.Service; ...@@ -14,18 +14,20 @@ import org.springframework.stereotype.Service;
**/ **/
@Service @Service
public class InstrumentPanelConfigServiceImpl implements InstrumentPanelConfigService { public class InstrumentPanelConfigServiceImpl implements InstrumentPanelConfigService {
@Override @Override
public String saveInstrumentPanelConfig(InstrumentPanelConfigDTO config,Integer optType) { public InstrumentPanelConfigVo getConfigByPanelId(String instrumentPanelId) {
return null; return null;
} }
@Override @Override
public InstrumentPanelConfigVo getInstrumentPanelConfigByInstrumentPanelId(String instrumentPanelId) { public String publish(InstrumentPanelConfigDTO config) {
return null; return null;
} }
@Override @Override
public String publish(InstrumentPanelConfigDTO config) { public String saveConfig(InstrumentPanelConfigDTO config) {
return null; return null;
} }
} }
...@@ -24,22 +24,22 @@ import java.util.List; ...@@ -24,22 +24,22 @@ import java.util.List;
@Service @Service
public class InstrumentPanelGroupServiceImpl extends ServiceImpl<InstrumentPanelGroupMapper, InstrumentPanelGroup> implements InstrumentPanelGroupService { public class InstrumentPanelGroupServiceImpl extends ServiceImpl<InstrumentPanelGroupMapper, InstrumentPanelGroup> implements InstrumentPanelGroupService {
@Override @Override
public List<InstrumentPanelGroupVo> selectInstrumentPanelGroupList() { public List<InstrumentPanelGroupVo> selectGroupList() {
return null; return null;
} }
@Override @Override
public String delInstrumentPanelGroup(@NonNull String groupId) { public String delGroup(@NonNull String groupId) {
return null; return null;
} }
@Override @Override
public String updateInstrumentPanelGroup(InstrumentPanelGroupDTO group) { public String updateGroup(InstrumentPanelGroupDTO group) {
return null; return null;
} }
@Override @Override
public String saveInstrumentPanelGroup(InstrumentPanelGroupDTO group) { public String saveGroup(InstrumentPanelGroupDTO group) {
return null; return null;
} }
......
...@@ -18,7 +18,7 @@ import java.util.List; ...@@ -18,7 +18,7 @@ import java.util.List;
@Service @Service
public class InstrumentPanelPermissionImpl implements InstrumentPanelPermissionService { public class InstrumentPanelPermissionImpl implements InstrumentPanelPermissionService {
@Override @Override
public String saveInstrumentPanelPermission(List<InstrumentPanelPermissionDTO> permissions){ public String savePermission(List<InstrumentPanelPermissionDTO> permissions){
//判断仪表板的名称是否重复 //判断仪表板的名称是否重复
//删除原本的权限 //删除原本的权限
//插入现有的权限 //插入现有的权限
...@@ -27,17 +27,17 @@ public class InstrumentPanelPermissionImpl implements InstrumentPanelPermissionS ...@@ -27,17 +27,17 @@ public class InstrumentPanelPermissionImpl implements InstrumentPanelPermissionS
} }
@Override @Override
public List<InstrumentPanelPermissionVo> saveCopyOtherInstrumentPanelPermission(@NonNull String instrumentPanelId) { public List<InstrumentPanelPermissionVo> saveCopyOtherPermission(@NonNull String instrumentPanelId) {
return null; return null;
} }
@Override @Override
public String saveCopyToOtherInstrumentPanelPermission(List<InstrumentPanelPermissionDTO> permissions, String otherInstrumentPanelId) { public String saveCopyToOtherPermission(List<InstrumentPanelPermissionDTO> permissions, String otherInstrumentPanelId) {
return null; return null;
} }
@Override @Override
public List<InstrumentPanelPermissionVo> selectInstrumentPanelPermissionById(@NonNull String instrumentPanelId) { public List<InstrumentPanelPermissionVo> selectPermissionByPanelId(@NonNull String instrumentPanelId) {
return null; return null;
} }
} }
...@@ -3,7 +3,8 @@ package com.syc.slm.slmbi.service.impl; ...@@ -3,7 +3,8 @@ package com.syc.slm.slmbi.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.syc.slm.slmbi.dao.InstrumentPanelMapper; import com.syc.slm.slmbi.dao.InstrumentPanelMapper;
import com.syc.slm.slmbi.dto.InstrumentPanelDTO; import com.syc.slm.slmbi.dto.SaveInstrumentPanelDTO;
import com.syc.slm.slmbi.dto.SearchInstrumentPanelDTO;
import com.syc.slm.slmbi.entity.InstrumentPanel; import com.syc.slm.slmbi.entity.InstrumentPanel;
import com.syc.slm.slmbi.service.InstrumentPanelService; import com.syc.slm.slmbi.service.InstrumentPanelService;
import com.syc.slm.slmbi.vo.InstrumentPanelVo; import com.syc.slm.slmbi.vo.InstrumentPanelVo;
...@@ -19,29 +20,30 @@ import java.util.List; ...@@ -19,29 +20,30 @@ import java.util.List;
* @date : 2021-03-25 16:17 * @date : 2021-03-25 16:17
**/ **/
@Service @Service
public class InstrumentPanelServiceImpl extends ServiceImpl<InstrumentPanelMapper, InstrumentPanel> implements InstrumentPanelService { public class InstrumentPanelServiceImpl extends ServiceImpl<InstrumentPanelMapper, InstrumentPanel>
implements InstrumentPanelService {
@Override @Override
public IPage<InstrumentPanelVo> selectInstrumentPanelList(InstrumentPanelDTO where) { public IPage<InstrumentPanelVo> selectInstrumentPanelList(SearchInstrumentPanelDTO where) {
return null; return null;
} }
@Override @Override
public String saveInstrumentPanel(InstrumentPanel panel) { public String savePanel(SaveInstrumentPanelDTO panel) {
return null; return null;
} }
@Override @Override
public Boolean batchPushInstrumentPanel(List<String> ids, Integer optType) { public Boolean batchPublish(List<String> ids) {
return null; return null;
} }
@Override @Override
public String delPushInstrumentPanel(String id) { public String delPanel(String id) {
return null; return null;
} }
@Override @Override
public String saveAsInstrumentPanel(InstrumentPanelDTO instrumentPanelDTO) { public String saveAsPanel(SaveInstrumentPanelDTO instrumentPanelDTO) {
return null; return null;
} }
...@@ -51,7 +53,7 @@ public class InstrumentPanelServiceImpl extends ServiceImpl<InstrumentPanelMappe ...@@ -51,7 +53,7 @@ public class InstrumentPanelServiceImpl extends ServiceImpl<InstrumentPanelMappe
} }
@Override @Override
public String recoveryInstrumentPanel(String id) { public String recoveryPanel(String id) {
return null; return null;
} }
......
package com.syc.slm.slmbi.service.impl; package com.syc.slm.slmbi.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.syc.slm.slmbi.dto.HistoryVariableDTO;
import com.syc.slm.slmbi.dto.RealTimeVariableDTO;
import com.syc.slm.slmbi.dto.VariableDTO; import com.syc.slm.slmbi.dto.VariableDTO;
import com.syc.slm.slmbi.service.VariableService; import com.syc.slm.slmbi.service.VariableService;
import com.syc.slm.slmbi.vo.VariableDeviceVo; import com.syc.slm.slmbi.vo.*;
import com.syc.slm.slmbi.vo.VariableSourceVo;
import com.syc.slm.slmbi.vo.VariableVo;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* slm-bi * slm-bi
...@@ -33,4 +34,14 @@ public class VariableServiceImpl implements VariableService { ...@@ -33,4 +34,14 @@ public class VariableServiceImpl implements VariableService {
public List<VariableDeviceVo> getVariableDeviceList() { public List<VariableDeviceVo> getVariableDeviceList() {
return null; return null;
} }
@Override
public Map<String, List<Map<String, RealTimeVariableVo>>> getVariableRealTimeDataList(RealTimeVariableDTO variableDTO) {
return null;
}
@Override
public Map<String, List<Map<String, HistoryVariableVo>>> getVariableHistoryDataList(HistoryVariableDTO variableDTO) {
return null;
}
} }
package com.syc.slm.slmbi.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
/**
* slm-bi
* 变量历史数据Vo
* @author : lin
* @date : 2021-03-30 15:29
**/
@Data
@ApiModel(value = "变量历史数据Vo")
@EqualsAndHashCode(callSuper=false)
public class HistoryVariableVo {
@ApiModelProperty(value = "所属设备id")
private String deviceId;
@ApiModelProperty(value = "所属设备名称")
private String deviceName;
@ApiModelProperty(value = "工作状态")
private String workStatus;
@ApiModelProperty(value = "时间")
private String time;
@ApiModelProperty(value = "变量id")
private String variableId;
@ApiModelProperty(value = "变量code")
private String variableCode;
@ApiModelProperty(value = "变量名称")
private String variableName;
@ApiModelProperty(value = "合计值")
private BigDecimal sum;
@ApiModelProperty(value = "平均值")
private BigDecimal avg;
@ApiModelProperty(value = "最大值")
private BigDecimal max;
@ApiModelProperty(value = "最小值")
private BigDecimal min;
}
package com.syc.slm.slmbi.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* slm-bi
* 实时变量查询vo
* @author : lin
* @date : 2021-03-30 14:22
**/
@Data
@ApiModel(value = "实时变量查询vo")
@EqualsAndHashCode(callSuper=false)
public class RealTimeVariableVo {
@ApiModelProperty(value = "所属设备id")
private String deviceId;
@ApiModelProperty(value = "所属设备名称")
private String deviceName;
@ApiModelProperty(value = "工作状态")
private String workStatus;
@ApiModelProperty(value = "时间")
private String time;
@ApiModelProperty(value = "变量id")
private String variableId;
@ApiModelProperty(value = "变量code")
private String variableCode;
@ApiModelProperty(value = "变量名称")
private String variableName;
}
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