提交修改
This commit is contained in:
parent
ad41f274f7
commit
3e3e6bb16f
@ -9,7 +9,7 @@ import java.util.Date;
|
||||
/**
|
||||
*所有数据表
|
||||
* @author quyixiao
|
||||
* @since 2025-10-20
|
||||
* @since 2025-10-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -27,9 +27,6 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String name_ = CLASS_NAME + "name"; // token
|
||||
public final static String x_ = CLASS_NAME + "x"; // 用户名
|
||||
public final static String y_ = CLASS_NAME + "y"; // y值
|
||||
public final static String header_title = CLASS_NAME + "header_title"; // 头部标题
|
||||
public final static String x_title = CLASS_NAME + "x_title"; // x 标题
|
||||
public final static String y_title = CLASS_NAME + "y_title"; // y 标题
|
||||
public final static String create_timestamp = CLASS_NAME + "create_timestamp"; // 创建日期
|
||||
public final static String run_date = CLASS_NAME + "run_date"; // 运行日期
|
||||
public final static String run_id = CLASS_NAME + "run_id"; // 运行id
|
||||
@ -48,12 +45,6 @@ private static final long serialVersionUID = 1L;
|
||||
private String x;
|
||||
//y值
|
||||
private double y;
|
||||
//头部标题
|
||||
private String headerTitle;
|
||||
//x 标题
|
||||
private String xTitle;
|
||||
//y 标题
|
||||
private String yTitle;
|
||||
//创建日期
|
||||
private Long createTimestamp;
|
||||
//运行日期
|
||||
@ -165,51 +156,6 @@ private static final long serialVersionUID = 1L;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
/**
|
||||
* 头部标题
|
||||
* @return
|
||||
*/
|
||||
public String getHeaderTitle() {
|
||||
return headerTitle;
|
||||
}
|
||||
/**
|
||||
* 头部标题
|
||||
* @param headerTitle
|
||||
*/
|
||||
public void setHeaderTitle(String headerTitle) {
|
||||
this.headerTitle = headerTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* x 标题
|
||||
* @return
|
||||
*/
|
||||
public String getXTitle() {
|
||||
return xTitle;
|
||||
}
|
||||
/**
|
||||
* x 标题
|
||||
* @param xTitle
|
||||
*/
|
||||
public void setXTitle(String xTitle) {
|
||||
this.xTitle = xTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* y 标题
|
||||
* @return
|
||||
*/
|
||||
public String getYTitle() {
|
||||
return yTitle;
|
||||
}
|
||||
/**
|
||||
* y 标题
|
||||
* @param yTitle
|
||||
*/
|
||||
public void setYTitle(String yTitle) {
|
||||
this.yTitle = yTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日期
|
||||
* @return
|
||||
@ -265,9 +211,6 @@ private static final long serialVersionUID = 1L;
|
||||
",name=" + name +
|
||||
",x=" + x +
|
||||
",y=" + y +
|
||||
",headerTitle=" + headerTitle +
|
||||
",xTitle=" + xTitle +
|
||||
",yTitle=" + yTitle +
|
||||
",createTimestamp=" + createTimestamp +
|
||||
",runDate=" + runDate +
|
||||
",runId=" + runId +
|
||||
|
||||
@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*图表配置
|
||||
* @author quyixiao
|
||||
* @since 2025-10-20
|
||||
* @since 2025-10-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -30,6 +30,9 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String run_id = CLASS_NAME + "run_id"; // 运行id
|
||||
public final static String type_ = CLASS_NAME + "type"; // line_chart
|
||||
public final static String cron_exp = CLASS_NAME + "cron_exp"; // 表达式
|
||||
public final static String header_title = CLASS_NAME + "header_title"; // 标题
|
||||
public final static String x_title = CLASS_NAME + "x_title"; // x轴标题
|
||||
public final static String y_title = CLASS_NAME + "y_title"; // y轴标题
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -49,6 +52,12 @@ private static final long serialVersionUID = 1L;
|
||||
private String type;
|
||||
//表达式
|
||||
private String cronExp;
|
||||
//标题
|
||||
private String headerTitle;
|
||||
//x轴标题
|
||||
private String xTitle;
|
||||
//y轴标题
|
||||
private String yTitle;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -184,6 +193,51 @@ private static final long serialVersionUID = 1L;
|
||||
this.cronExp = cronExp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 标题
|
||||
* @return
|
||||
*/
|
||||
public String getHeaderTitle() {
|
||||
return headerTitle;
|
||||
}
|
||||
/**
|
||||
* 标题
|
||||
* @param headerTitle
|
||||
*/
|
||||
public void setHeaderTitle(String headerTitle) {
|
||||
this.headerTitle = headerTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* x轴标题
|
||||
* @return
|
||||
*/
|
||||
public String getXTitle() {
|
||||
return xTitle;
|
||||
}
|
||||
/**
|
||||
* x轴标题
|
||||
* @param xTitle
|
||||
*/
|
||||
public void setXTitle(String xTitle) {
|
||||
this.xTitle = xTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* y轴标题
|
||||
* @return
|
||||
*/
|
||||
public String getYTitle() {
|
||||
return yTitle;
|
||||
}
|
||||
/**
|
||||
* y轴标题
|
||||
* @param yTitle
|
||||
*/
|
||||
public void setYTitle(String yTitle) {
|
||||
this.yTitle = yTitle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvChartConfigEntity{" +
|
||||
@ -196,6 +250,9 @@ private static final long serialVersionUID = 1L;
|
||||
",runId=" + runId +
|
||||
",type=" + type +
|
||||
",cronExp=" + cronExp +
|
||||
",headerTitle=" + headerTitle +
|
||||
",xTitle=" + xTitle +
|
||||
",yTitle=" + yTitle +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -49,7 +49,7 @@ public class MysqlMain_update {
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
|
||||
|
||||
String a = "vv_chart_config";
|
||||
String a = "vv_all_data";
|
||||
for (String s : a.split(",")) {
|
||||
list.add(new TablesBean(s));
|
||||
}
|
||||
|
||||
@ -52,7 +52,6 @@ public class SendDingDingQueueSimpleRabbitListener {
|
||||
try {
|
||||
|
||||
VvChartConfigEntity vvChartConfigEntity = JSONObject.parseObject(message, VvChartConfigEntity.class);
|
||||
|
||||
String configSql = vvChartConfigEntity.getSqlConfig();
|
||||
String paramsConfig = vvChartConfigEntity.getParamsConfig();
|
||||
|
||||
@ -64,11 +63,9 @@ public class SendDingDingQueueSimpleRabbitListener {
|
||||
|
||||
StrSubstitutor sub = new StrSubstitutor(valuesMap);
|
||||
String resolvedString = sub.replace(configSql);
|
||||
|
||||
|
||||
String headerName = "";
|
||||
String xName = "";
|
||||
String yName = "";
|
||||
String headerName = vvChartConfigEntity.getHeaderTitle();
|
||||
String xName = vvChartConfigEntity.getYTitle();
|
||||
String yName = vvChartConfigEntity.getYTitle();
|
||||
|
||||
List<LineChartDTO> list = new ArrayList<>();
|
||||
|
||||
@ -76,16 +73,10 @@ public class SendDingDingQueueSimpleRabbitListener {
|
||||
if (!CollectionUtils.isEmpty(mapList)) {
|
||||
for (Map<String, Object> objectMap : mapList) {
|
||||
VvAllDataEntity vvAllDataEntity = JSONObject.parseObject(JSON.toJSONString(objectMap), VvAllDataEntity.class);
|
||||
|
||||
LineChartDTO lineChartDTO = new LineChartDTO();
|
||||
lineChartDTO.setName(vvAllDataEntity.getName());
|
||||
lineChartDTO.setX(vvAllDataEntity.getX());
|
||||
lineChartDTO.setY(vvAllDataEntity.getY());
|
||||
|
||||
headerName = vvAllDataEntity.getHeaderTitle();
|
||||
xName = vvAllDataEntity.getXTitle();
|
||||
yName = vvAllDataEntity.getYTitle();
|
||||
|
||||
list.add(lineChartDTO);
|
||||
}
|
||||
}
|
||||
@ -93,19 +84,16 @@ public class SendDingDingQueueSimpleRabbitListener {
|
||||
|
||||
File file1 = new File(chartPic);
|
||||
|
||||
|
||||
|
||||
String picUrl = "repayPic/repayChart" +System.currentTimeMillis()+ ".jpg";
|
||||
|
||||
InputStream inputStream = new FileInputStream(file1);
|
||||
|
||||
OssUploadResult ossUploadResult = ossFileUploadService.uploadImageToOss(inputStream, picUrl, Integer.parseInt(String.valueOf(file1.length())));
|
||||
|
||||
// file1.delete();
|
||||
file1.delete();
|
||||
|
||||
String url = ossUploadResult.getUrl();
|
||||
log.info("chartPic :{} url:{}",chartPic,url);
|
||||
|
||||
GouDeZhaoDDUtils.sendMarkDownOrder(headerName,url);
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
@ -208,7 +208,7 @@ public class CronTriggerUtils {
|
||||
//
|
||||
// 0 15 10 ? * 6#3:每月的第三个星期五上午 10:15 触发
|
||||
public static void main(String[] args) throws Exception {
|
||||
String cronExpression = "0 0 6 * * ?";
|
||||
String cronExpression = "0 0 1 * * ?";
|
||||
CronExpression cronMonth = new CronExpression(cronExpression);
|
||||
Date date = DateUtils.formateDate(new Date(), "yyyy-MM-dd HH:mm:00");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user