Commit c896940d authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.修改风电站运行状态接口,增加模拟实际发电功率处理逻辑,完成接口冒烟测试;
2.修改天气数据处理定时任务,解决晚上十一点半天气预报数据处理异常问题,修改风资源预测数据和光伏资源预测数据时间处理逻辑,完成接口冒烟测试;
3.修改风机预测数据模块相关功能接口,增加判断当前部署环境逻辑,解决查询全量数据问题;
4.修改风机预测数据生成模块第三方风力发电数据生成功能,增加数据拆分逻辑,区分15分数据层级,完成功能冒烟测试;
5.修改风机预测监控页面历史风速统计接口,统计数据不显示问题及小数位过多问题;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 82a586a0
......@@ -6,15 +6,15 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Random;
/**
* 验证码
*
* @author ZWT
* @date 2024/09/09
*/
public class VerificationCode {
private static int width = 135;// 定义图片的width
private static int height = 50;// 定义图片的height
private static int codeCount = 4;// 定义图片上显示验证码的个数
private static int xx = 26;
private static int fontHeight = 30;
private static int codeY = 30;
private static char[] codeSequence = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R',
private static final char[] codeSequence = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j',
'k', 'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '2', '3', '4', '5', '6', '7', '8', '9'};
......@@ -26,6 +26,12 @@ public class VerificationCode {
* @return
*/
public static Map<String, Object> generateCodeAndPic() {
// 定义图片的width
int width = 135;
// 定义图片的height
int height = 50;
// 定义字体的height
int fontHeight = 30;
// 定义图像buffer
BufferedImage buffImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
Graphics gd = buffImg.getGraphics();
......@@ -41,6 +47,10 @@ public class VerificationCode {
// randomCode用于保存随机产生的验证码,以便用户登录后进行验证。
StringBuffer randomCode = new StringBuffer();
int red, green, blue;
// 定义图片上显示验证码的个数
int codeCount = 4;
int xx = 26;
int codeY = 30;
// 随机产生codeCount数字的验证码。
for (int i = 0; i < codeCount; i++) {
// 得到随机产生的验证码数字。
......@@ -62,11 +72,4 @@ public class VerificationCode {
map.put("codePic", buffImg);
return map;
}
//测试
public static void main(String[] args) throws Exception {
//创建文件输出流对象
Map<String, Object> map = VerificationCode.generateCodeAndPic();
System.out.println("验证码的值为:" + map.get("code"));
}
}
\ No newline at end of file
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