提交修改

This commit is contained in:
quyixiao 2025-10-21 09:30:32 +08:00
parent ad41f274f7
commit 3e3e6bb16f
5 changed files with 65 additions and 77 deletions

View File

@ -9,7 +9,7 @@ import java.util.Date;
/** /**
*所有数据表 *所有数据表
* @author quyixiao * @author quyixiao
* @since 2025-10-20 * @since 2025-10-21
*/ */
@Data @Data
@ -27,9 +27,6 @@ private static final long serialVersionUID = 1L;
public final static String name_ = CLASS_NAME + "name"; // token public final static String name_ = CLASS_NAME + "name"; // token
public final static String x_ = CLASS_NAME + "x"; // 用户名 public final static String x_ = CLASS_NAME + "x"; // 用户名
public final static String y_ = CLASS_NAME + "y"; // y值 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 create_timestamp = CLASS_NAME + "create_timestamp"; // 创建日期
public final static String run_date = CLASS_NAME + "run_date"; // 运行日期 public final static String run_date = CLASS_NAME + "run_date"; // 运行日期
public final static String run_id = CLASS_NAME + "run_id"; // 运行id public final static String run_id = CLASS_NAME + "run_id"; // 运行id
@ -48,12 +45,6 @@ private static final long serialVersionUID = 1L;
private String x; private String x;
//y值 //y值
private double y; private double y;
//头部标题
private String headerTitle;
//x 标题
private String xTitle;
//y 标题
private String yTitle;
//创建日期 //创建日期
private Long createTimestamp; private Long createTimestamp;
//运行日期 //运行日期
@ -165,51 +156,6 @@ private static final long serialVersionUID = 1L;
this.y = y; 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 * @return
@ -265,9 +211,6 @@ private static final long serialVersionUID = 1L;
",name=" + name + ",name=" + name +
",x=" + x + ",x=" + x +
",y=" + y + ",y=" + y +
",headerTitle=" + headerTitle +
",xTitle=" + xTitle +
",yTitle=" + yTitle +
",createTimestamp=" + createTimestamp + ",createTimestamp=" + createTimestamp +
",runDate=" + runDate + ",runDate=" + runDate +
",runId=" + runId + ",runId=" + runId +

View File

@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
/** /**
*图表配置 *图表配置
* @author quyixiao * @author quyixiao
* @since 2025-10-20 * @since 2025-10-21
*/ */
@Data @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 run_id = CLASS_NAME + "run_id"; // 运行id
public final static String type_ = CLASS_NAME + "type"; // line_chart public final static String type_ = CLASS_NAME + "type"; // line_chart
public final static String cron_exp = CLASS_NAME + "cron_exp"; // 表达式 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) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
@ -49,6 +52,12 @@ private static final long serialVersionUID = 1L;
private String type; private String type;
//表达式 //表达式
private String cronExp; private String cronExp;
//标题
private String headerTitle;
//x轴标题
private String xTitle;
//y轴标题
private String yTitle;
/** /**
* *
* @return * @return
@ -184,6 +193,51 @@ private static final long serialVersionUID = 1L;
this.cronExp = cronExp; 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 @Override
public String toString() { public String toString() {
return "VvChartConfigEntity{" + return "VvChartConfigEntity{" +
@ -196,6 +250,9 @@ private static final long serialVersionUID = 1L;
",runId=" + runId + ",runId=" + runId +
",type=" + type + ",type=" + type +
",cronExp=" + cronExp + ",cronExp=" + cronExp +
",headerTitle=" + headerTitle +
",xTitle=" + xTitle +
",yTitle=" + yTitle +
"}"; "}";
} }
} }

View File

@ -49,7 +49,7 @@ public class MysqlMain_update {
List<TablesBean> list = new ArrayList<TablesBean>(); List<TablesBean> list = new ArrayList<TablesBean>();
String a = "vv_chart_config"; String a = "vv_all_data";
for (String s : a.split(",")) { for (String s : a.split(",")) {
list.add(new TablesBean(s)); list.add(new TablesBean(s));
} }

View File

@ -52,7 +52,6 @@ public class SendDingDingQueueSimpleRabbitListener {
try { try {
VvChartConfigEntity vvChartConfigEntity = JSONObject.parseObject(message, VvChartConfigEntity.class); VvChartConfigEntity vvChartConfigEntity = JSONObject.parseObject(message, VvChartConfigEntity.class);
String configSql = vvChartConfigEntity.getSqlConfig(); String configSql = vvChartConfigEntity.getSqlConfig();
String paramsConfig = vvChartConfigEntity.getParamsConfig(); String paramsConfig = vvChartConfigEntity.getParamsConfig();
@ -64,11 +63,9 @@ public class SendDingDingQueueSimpleRabbitListener {
StrSubstitutor sub = new StrSubstitutor(valuesMap); StrSubstitutor sub = new StrSubstitutor(valuesMap);
String resolvedString = sub.replace(configSql); String resolvedString = sub.replace(configSql);
String headerName = vvChartConfigEntity.getHeaderTitle();
String xName = vvChartConfigEntity.getYTitle();
String headerName = ""; String yName = vvChartConfigEntity.getYTitle();
String xName = "";
String yName = "";
List<LineChartDTO> list = new ArrayList<>(); List<LineChartDTO> list = new ArrayList<>();
@ -76,16 +73,10 @@ public class SendDingDingQueueSimpleRabbitListener {
if (!CollectionUtils.isEmpty(mapList)) { if (!CollectionUtils.isEmpty(mapList)) {
for (Map<String, Object> objectMap : mapList) { for (Map<String, Object> objectMap : mapList) {
VvAllDataEntity vvAllDataEntity = JSONObject.parseObject(JSON.toJSONString(objectMap), VvAllDataEntity.class); VvAllDataEntity vvAllDataEntity = JSONObject.parseObject(JSON.toJSONString(objectMap), VvAllDataEntity.class);
LineChartDTO lineChartDTO = new LineChartDTO(); LineChartDTO lineChartDTO = new LineChartDTO();
lineChartDTO.setName(vvAllDataEntity.getName()); lineChartDTO.setName(vvAllDataEntity.getName());
lineChartDTO.setX(vvAllDataEntity.getX()); lineChartDTO.setX(vvAllDataEntity.getX());
lineChartDTO.setY(vvAllDataEntity.getY()); lineChartDTO.setY(vvAllDataEntity.getY());
headerName = vvAllDataEntity.getHeaderTitle();
xName = vvAllDataEntity.getXTitle();
yName = vvAllDataEntity.getYTitle();
list.add(lineChartDTO); list.add(lineChartDTO);
} }
} }
@ -93,19 +84,16 @@ public class SendDingDingQueueSimpleRabbitListener {
File file1 = new File(chartPic); File file1 = new File(chartPic);
String picUrl = "repayPic/repayChart" +System.currentTimeMillis()+ ".jpg"; String picUrl = "repayPic/repayChart" +System.currentTimeMillis()+ ".jpg";
InputStream inputStream = new FileInputStream(file1); InputStream inputStream = new FileInputStream(file1);
OssUploadResult ossUploadResult = ossFileUploadService.uploadImageToOss(inputStream, picUrl, Integer.parseInt(String.valueOf(file1.length()))); OssUploadResult ossUploadResult = ossFileUploadService.uploadImageToOss(inputStream, picUrl, Integer.parseInt(String.valueOf(file1.length())));
// file1.delete(); file1.delete();
String url = ossUploadResult.getUrl(); String url = ossUploadResult.getUrl();
log.info("chartPic :{} url:{}",chartPic,url); log.info("chartPic :{} url:{}",chartPic,url);
GouDeZhaoDDUtils.sendMarkDownOrder(headerName,url); GouDeZhaoDDUtils.sendMarkDownOrder(headerName,url);
} catch (Exception e) { } catch (Exception e) {

View File

@ -208,7 +208,7 @@ public class CronTriggerUtils {
// //
// 0 15 10 ? * 6#3每月的第三个星期五上午 10:15 触发 // 0 15 10 ? * 6#3每月的第三个星期五上午 10:15 触发
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
String cronExpression = "0 0 6 * * ?"; String cronExpression = "0 0 1 * * ?";
CronExpression cronMonth = new CronExpression(cronExpression); CronExpression cronMonth = new CronExpression(cronExpression);
Date date = DateUtils.formateDate(new Date(), "yyyy-MM-dd HH:mm:00"); Date date = DateUtils.formateDate(new Date(), "yyyy-MM-dd HH:mm:00");