Dashboard
parent
34f73211a3
commit
0dffccd895
@ -0,0 +1,64 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.controller;
|
||||
|
||||
import com.anji.plus.gaea.annotation.Permission;
|
||||
import com.anji.plus.gaea.annotation.log.GaeaAuditLog;
|
||||
import com.anji.plus.gaea.bean.ResponseBean;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ReportDashboardObjectDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ReportDashboardService;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @desc 大屏设计 controller
|
||||
* @website https://gitee.com/anji-plus/gaea
|
||||
* @author Raod
|
||||
* @date 2021-04-12 14:52:21.761
|
||||
**/
|
||||
@RestController
|
||||
@Api(tags = "大屏设计管理")
|
||||
@RequestMapping("/reportDashboard")
|
||||
public class ReportDashboardController {
|
||||
|
||||
@Autowired
|
||||
private ReportDashboardService reportDashboardService;
|
||||
|
||||
/**
|
||||
* 预览、查询大屏详情
|
||||
* @param reportCode
|
||||
* @return
|
||||
*/
|
||||
@GetMapping({"/{reportCode}"})
|
||||
@Permission(code = "DETAIL", name = "明细")
|
||||
public ResponseBean detail(@PathVariable("reportCode") String reportCode) {
|
||||
return ResponseBean.builder().data(reportDashboardService.getDetail(reportCode)).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存大屏设计
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
@Permission(code = "INSERT", name = "新增")
|
||||
@GaeaAuditLog(pageTitle = "新增")
|
||||
public ResponseBean insert(@RequestBody ReportDashboardObjectDto dto) {
|
||||
reportDashboardService.insertDashboard(dto);
|
||||
return ResponseBean.builder().build();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取去单个图层数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getData")
|
||||
@Permission(code = "DETAIL", name = "明细图表数据")
|
||||
public ResponseBean getData(@RequestBody ChartDto dto) {
|
||||
return ResponseBean.builder().data(reportDashboardService.getChartData(dto)).build();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @description 大屏设计 dto
|
||||
* @author Raod
|
||||
* @date 2021-04-12 14:52:21.761
|
||||
**/
|
||||
@Data
|
||||
public class ChartDto implements Serializable {
|
||||
|
||||
private String chartType;
|
||||
|
||||
/**数据集编码*/
|
||||
private String setCode;
|
||||
|
||||
/** 传入的自定义参数*/
|
||||
private Map<String, Object> contextData;
|
||||
|
||||
/**图表属性*/
|
||||
private Map<String, String> chartProperties;
|
||||
|
||||
/**时间字段*/
|
||||
private String timeLineFiled;
|
||||
|
||||
/**时间颗粒度*/
|
||||
private String particles;
|
||||
|
||||
/**时间格式化*/
|
||||
private String dataTimeFormat;
|
||||
|
||||
/**时间展示层*/
|
||||
private String timeLineFormat;
|
||||
|
||||
private int timeUnit;
|
||||
|
||||
/**时间区间*/
|
||||
private String startTime;
|
||||
|
||||
/**时间区间*/
|
||||
private String endTime;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto.ReportDashboardWidgetDto;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @description 大屏设计 dto
|
||||
* @author Raod
|
||||
* @date 2021-04-12 14:52:21.761
|
||||
**/
|
||||
@Data
|
||||
public class ReportDashboardObjectDto implements Serializable {
|
||||
|
||||
/** 报表编码 */
|
||||
private String reportCode;
|
||||
/**
|
||||
* 报表编码
|
||||
*/
|
||||
private ReportDashboardDto dashboard;
|
||||
|
||||
/**
|
||||
* 大屏画布中的组件
|
||||
*/
|
||||
private List<ReportDashboardWidgetDto> widgets;
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
/**/
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.controller.param;
|
||||
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import com.anji.plus.gaea.annotation.Query;
|
||||
import com.anji.plus.gaea.constant.QueryEnum;
|
||||
import com.anji.plus.gaea.curd.params.PageParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @desc ReportDashboard 大屏设计查询输入类
|
||||
* @author Raod
|
||||
* @date 2021-04-12 14:52:21.761
|
||||
**/
|
||||
@Data
|
||||
public class ReportDashboardParam extends PageParam implements Serializable{
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.dao;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity.ReportDashboard;
|
||||
|
||||
/**
|
||||
* ReportDashboard Mapper
|
||||
* @author Raod
|
||||
* @date 2021-04-12 14:52:21.761
|
||||
**/
|
||||
@Mapper
|
||||
public interface ReportDashboardMapper extends GaeaBaseMapper<ReportDashboard> {
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by raodeming on 2021/4/26.
|
||||
*/
|
||||
public interface ChartStrategy {
|
||||
|
||||
/**
|
||||
* 图表类型
|
||||
* @return
|
||||
*/
|
||||
String type();
|
||||
|
||||
/**
|
||||
* 针对每种图表类型做单独的数据转换解析
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Object transform(ChartDto dto, List<JSONObject> data);
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service;
|
||||
|
||||
import com.anji.plus.gaea.curd.service.GaeaBaseService;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ReportDashboardObjectDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.param.ReportDashboardParam;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.dao.entity.ReportDashboard;
|
||||
|
||||
/**
|
||||
* @desc ReportDashboard 大屏设计服务接口
|
||||
* @author Raod
|
||||
* @date 2021-04-12 14:52:21.761
|
||||
**/
|
||||
public interface ReportDashboardService extends GaeaBaseService<ReportDashboardParam, ReportDashboard> {
|
||||
|
||||
/***
|
||||
* 查询详情
|
||||
*
|
||||
* @param reportCode
|
||||
*/
|
||||
ReportDashboardObjectDto getDetail(String reportCode);
|
||||
|
||||
/***
|
||||
* 保存大屏设计
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
void insertDashboard(ReportDashboardObjectDto dto);
|
||||
|
||||
|
||||
/**
|
||||
* 获取单个图表数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Object getChartData(ChartDto dto);
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 柱状体或者折线图
|
||||
* Created by raodeming on 2021/4/26.
|
||||
*/
|
||||
@Component
|
||||
public class BarChartServiceImpl implements ChartStrategy {
|
||||
/**
|
||||
* 图表类型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String type() {
|
||||
return "widget-barchart|widget-linechart";
|
||||
}
|
||||
|
||||
/**
|
||||
* 针对每种图表类型做单独的数据转换解析
|
||||
*
|
||||
* @param dto
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object transform(ChartDto dto, List<JSONObject> data) {
|
||||
// JSONObject json = new JSONObject();
|
||||
// List<Object> xAxis = new ArrayList<>();
|
||||
// List<Object> series = new ArrayList<>();
|
||||
// data.forEach(jsonObject -> {
|
||||
// jsonObject.forEach((s, o) -> {
|
||||
// if ("xAxis".equals(s)) {
|
||||
// xAxis.add(o);
|
||||
// } else {
|
||||
// series.add(o);
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
//
|
||||
// json.put("xAxis", xAxis);
|
||||
// JSONArray objects = new JSONArray();
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// jsonObject.put("data", series);
|
||||
// objects.add(jsonObject);
|
||||
// json.put("series", objects);
|
||||
// return json.toJSONString();
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/* {
|
||||
"xAxis": [
|
||||
"哈哈",
|
||||
"洗洗",
|
||||
"来了",
|
||||
"问问",
|
||||
"天天"
|
||||
],
|
||||
"series": [
|
||||
{
|
||||
"data": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5
|
||||
]
|
||||
}
|
||||
]
|
||||
}*/
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 折柱图
|
||||
* Created by raodeming on 2021/4/26.
|
||||
*/
|
||||
@Component
|
||||
public class BarLineChartServiceImpl implements ChartStrategy {
|
||||
/**
|
||||
* 图表类型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String type() {
|
||||
return "widget-barlinechart";
|
||||
}
|
||||
|
||||
/**
|
||||
* 针对每种图表类型做单独的数据转换解析
|
||||
*
|
||||
* @param dto
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object transform(ChartDto dto, List<JSONObject> data) {
|
||||
// JSONObject json = new JSONObject();
|
||||
// List<Object> xAxis = new ArrayList<>();
|
||||
// Map<String, List<Object>> series = new HashMap<>();
|
||||
// data.forEach(jsonObject -> {
|
||||
// jsonObject.forEach((s, o) -> {
|
||||
// if ("xAxis".equals(s)) {
|
||||
// xAxis.add(o);
|
||||
// } else {
|
||||
// List<Object> objects;
|
||||
// if (series.containsKey(s)) {
|
||||
// objects = series.get(s);
|
||||
// } else {
|
||||
// objects = new ArrayList<>();
|
||||
//
|
||||
// }
|
||||
// objects.add(o);
|
||||
// series.put(s, objects);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
//
|
||||
// json.put("xAxis", xAxis);
|
||||
// List<JSONObject> result = new ArrayList<>();
|
||||
// series.forEach((s, objects) -> {
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// jsonObject.put("name", s);
|
||||
// if (s.endsWith("bar")) {
|
||||
// jsonObject.put("type", "bar");
|
||||
// } else {
|
||||
// jsonObject.put("type", "line");
|
||||
// }
|
||||
// jsonObject.put("data", objects);
|
||||
// result.add(jsonObject);
|
||||
// });
|
||||
// json.put("series", result);
|
||||
// return json.toJSONString();
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/*{
|
||||
"xAxis": [
|
||||
"1月",
|
||||
"2月",
|
||||
"3月"
|
||||
],
|
||||
"series": [
|
||||
{
|
||||
"name": "指标1", //暂时用不上
|
||||
"type": "bar", //需要处理
|
||||
"data": [
|
||||
2,
|
||||
49,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "指标2",
|
||||
"type": "line",
|
||||
"yAxisIndex": 1,
|
||||
"data": [
|
||||
2,
|
||||
32,
|
||||
4
|
||||
]
|
||||
}
|
||||
]
|
||||
}*/
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 饼图或者空心饼图或者漏斗图
|
||||
* Created by raodeming on 2021/4/26.
|
||||
*/
|
||||
@Component
|
||||
public class GaugeChartServiceImpl implements ChartStrategy {
|
||||
/**
|
||||
* 图表类型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String type() {
|
||||
return "widget-gauge";
|
||||
}
|
||||
|
||||
/**
|
||||
* 针对每种图表类型做单独的数据转换解析
|
||||
*
|
||||
* @param dto
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object transform(ChartDto dto, List<JSONObject> data) {
|
||||
|
||||
// return "{\"value\": 50, \"name\": \"名称1\", \"unit\": \"%\"}";
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.controller.dto.ChartDto;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboard.service.ChartStrategy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 饼图或者空心饼图或者漏斗图
|
||||
* Created by raodeming on 2021/4/26.
|
||||
*/
|
||||
@Component
|
||||
public class PieChartServiceImpl implements ChartStrategy {
|
||||
/**
|
||||
* 图表类型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String type() {
|
||||
return "widget-piechart|widget-hollow-piechart|widget-funnel";
|
||||
}
|
||||
|
||||
/**
|
||||
* 针对每种图表类型做单独的数据转换解析
|
||||
*
|
||||
* @param dto
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object transform(ChartDto dto, List<JSONObject> data) {
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/* [
|
||||
{
|
||||
"value": 11,
|
||||
"name": "指标1"
|
||||
},
|
||||
{
|
||||
"value": 10,
|
||||
"name": "指标2"
|
||||
}
|
||||
]*/
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboard.util;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by raodeming on 2021/4/29.
|
||||
*/
|
||||
public class DateUtil {
|
||||
|
||||
private static String defaultDatePattern = "yyyy-MM-dd";
|
||||
|
||||
private static String defaultDateTimePattern = "yyyy-MM-dd HH:mm:ss.SSS";
|
||||
|
||||
private static String defaultyyyyMMddPattern = "yyyyMMdd";
|
||||
|
||||
private static String defaultYmdHmsPattern = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
private static String defaultHmsPattern = "HH:mm:ss";
|
||||
/**字符串yyyy-MM-dd HH:mm:ss转日期
|
||||
* @param dateStr yyyy-MM-dd HH:mm:ss
|
||||
* @return
|
||||
*/
|
||||
public static Date parseHmsTime(String dateStr) {
|
||||
return parse(dateStr, defaultYmdHmsPattern);
|
||||
}
|
||||
|
||||
/**字符串转日期
|
||||
* @param dateStr
|
||||
* @param pattern
|
||||
* @return
|
||||
*/
|
||||
public static Date parse(String dateStr, String pattern) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
|
||||
if (dateStr == null || "".equals(dateStr)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
Date d = sdf.parse(dateStr);
|
||||
return d;
|
||||
} catch (ParseException e) {
|
||||
System.out.println("日期转换错误: " + e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @description 大屏看板数据渲染 dto
|
||||
* @author Raod
|
||||
* @date 2021-04-12 15:12:43.724
|
||||
**/
|
||||
@Data
|
||||
public class ReportDashboardWidgetDto implements Serializable {
|
||||
|
||||
/**
|
||||
* 组件类型参考字典DASHBOARD_PANEL_TYPE
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* value
|
||||
*/
|
||||
private ReportDashboardWidgetValueDto value;
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.dto;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @description 大屏看板数据渲染 dto
|
||||
* @author Raod
|
||||
* @date 2021-04-12 15:12:43.724
|
||||
**/
|
||||
@Data
|
||||
public class ReportDashboardWidgetValueDto implements Serializable {
|
||||
/** 报表编码 */
|
||||
private String reportCode;
|
||||
|
||||
/** 组件的渲染属性json */
|
||||
private JSONObject setup;
|
||||
|
||||
/** 组件的数据属性json */
|
||||
private JSONObject data;
|
||||
|
||||
/** 组件的配置属性json */
|
||||
private JSONObject collapse;
|
||||
|
||||
/** 组件的大小位置属性json */
|
||||
private JSONObject position;
|
||||
|
||||
/** 0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG */
|
||||
private Integer enableFlag;
|
||||
|
||||
/** 0--未删除 1--已删除 DIC_NAME=DEL_FLAG */
|
||||
private Integer deleteFlag;
|
||||
|
||||
/** 排序,图层的概念 */
|
||||
private Long sort;
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
/**/
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.param;
|
||||
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import com.anji.plus.gaea.annotation.Query;
|
||||
import com.anji.plus.gaea.constant.QueryEnum;
|
||||
import com.anji.plus.gaea.curd.params.PageParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @desc ReportDashboardWidget 大屏看板数据渲染查询输入类
|
||||
* @author Raod
|
||||
* @date 2021-04-12 15:12:43.724
|
||||
**/
|
||||
@Data
|
||||
public class ReportDashboardWidgetParam extends PageParam implements Serializable{
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.entity.ReportDashboardWidget;
|
||||
|
||||
/**
|
||||
* ReportDashboardWidget Mapper
|
||||
* @author Raod
|
||||
* @date 2021-04-12 15:12:43.724
|
||||
**/
|
||||
@Mapper
|
||||
public interface ReportDashboardWidgetMapper extends GaeaBaseMapper<ReportDashboardWidget> {
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.entity;
|
||||
|
||||
import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description 大屏看板数据渲染 entity
|
||||
* @author Raod
|
||||
* @date 2021-04-12 15:12:43.724
|
||||
**/
|
||||
@TableName(value="gaea_report_dashboard_widget")
|
||||
@Data
|
||||
public class ReportDashboardWidget extends GaeaBaseEntity {
|
||||
@ApiModelProperty(value = "报表编码")
|
||||
private String reportCode;
|
||||
|
||||
@ApiModelProperty(value = "组件类型参考字典DASHBOARD_PANEL_TYPE")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "组件的渲染属性json")
|
||||
private String setup;
|
||||
|
||||
@ApiModelProperty(value = "组件的数据属性json")
|
||||
private String data;
|
||||
|
||||
@ApiModelProperty(value = "组件的配置属性json")
|
||||
private String collapse;
|
||||
|
||||
@ApiModelProperty(value = "组件的大小位置属性json")
|
||||
private String position;
|
||||
|
||||
@ApiModelProperty(value = "0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG")
|
||||
private Integer enableFlag;
|
||||
|
||||
@ApiModelProperty(value = " 0--未删除 1--已删除 DIC_NAME=DEL_FLAG")
|
||||
private Integer deleteFlag;
|
||||
|
||||
@ApiModelProperty(value = "排序,图层的概念")
|
||||
private Long sort;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.service;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.entity.ReportDashboardWidget;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.controller.param.ReportDashboardWidgetParam;
|
||||
import com.anji.plus.gaea.curd.service.GaeaBaseService;
|
||||
|
||||
/**
|
||||
* @desc ReportDashboardWidget 大屏看板数据渲染服务接口
|
||||
* @author Raod
|
||||
* @date 2021-04-12 15:12:43.724
|
||||
**/
|
||||
public interface ReportDashboardWidgetService extends GaeaBaseService<ReportDashboardWidgetParam, ReportDashboardWidget> {
|
||||
|
||||
/***
|
||||
* 查询详情
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
ReportDashboardWidget getDetail(Long id);
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
|
||||
package com.anjiplus.template.gaea.business.modules.data.dashboardwidget.service.impl;
|
||||
|
||||
import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.entity.ReportDashboardWidget;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.service.ReportDashboardWidgetService;
|
||||
import com.anjiplus.template.gaea.business.modules.data.dashboardwidget.dao.ReportDashboardWidgetMapper;
|
||||
/**
|
||||
* @desc ReportDashboardWidget 大屏看板数据渲染服务实现
|
||||
* @author Raod
|
||||
* @date 2021-04-12 15:12:43.724
|
||||
**/
|
||||
@Service
|
||||
//@RequiredArgsConstructor
|
||||
public class ReportDashboardWidgetServiceImpl implements ReportDashboardWidgetService {
|
||||
|
||||
@Autowired
|
||||
private ReportDashboardWidgetMapper reportDashboardWidgetMapper;
|
||||
|
||||
@Override
|
||||
public GaeaBaseMapper<ReportDashboardWidget> getMapper() {
|
||||
return reportDashboardWidgetMapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReportDashboardWidget getDetail(Long id) {
|
||||
ReportDashboardWidget reportDashboardWidget = this.selectOne(id);
|
||||
return reportDashboardWidget;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue