Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -41,7 +41,7 @@ public interface PatternRegex {
|
||||
/**
|
||||
* 登录名只能输入3-16位的英文字母或数字
|
||||
*/
|
||||
String LOGIN_NAME_REGEX = "^[a-zA-Z0-9_]{3,16}$";
|
||||
String LOGIN_NAME_REGEX = "[a-zA-Z0-9]{3,16}";
|
||||
|
||||
/**
|
||||
* 手机号必须有11位,并且为数字,是正常的手机·号码开头
|
||||
|
||||
@@ -559,7 +559,11 @@ public class LineGenerator {
|
||||
.setName("(时间)")
|
||||
.setBoundaryGap(false)
|
||||
);
|
||||
persistentTimeOption.setColor(new String[]{"#CCC", "#A0522D"});
|
||||
if(values.size()==2){
|
||||
persistentTimeOption.setColor(new String[]{"#CCC", "#FF33FF"});
|
||||
}else{
|
||||
persistentTimeOption.setColor(new String[]{"#FFCC33", "#339966","#CC0000","#FF33FF","#3399FF"});
|
||||
}
|
||||
Integer max = 0;
|
||||
if (CollUtil.isNotEmpty(limit)) {
|
||||
Integer num = (Integer) limit.get(0).get(1);
|
||||
@@ -577,6 +581,7 @@ public class LineGenerator {
|
||||
.setName(key)
|
||||
.setType("line")
|
||||
.setSmooth(true)
|
||||
.setSymbol("none")
|
||||
.setLabel(new BarLabel().setShow(true).setPosition("bottom"))
|
||||
.setData(value);
|
||||
list.add(proportion);
|
||||
@@ -584,7 +589,8 @@ public class LineGenerator {
|
||||
LineSeries proportion2 = new LineSeries()
|
||||
.setName(limitName)
|
||||
.setSmooth(true)
|
||||
.setLineStyle(new LineStyle().setColor("green").setWidth(1).setType("dashed").setOpacity(1))
|
||||
.setSymbol("none")
|
||||
.setLineStyle(new LineStyle().setColor("#FF33FF").setWidth(2).setType("dotted").setOpacity(1))
|
||||
.setData(limit);
|
||||
list.add(proportion2);
|
||||
SeriesOption[] seriesOptions = list.stream().toArray(SeriesOption[]::new);
|
||||
|
||||
@@ -376,44 +376,4 @@ public class DrawPicUtil {
|
||||
return drawPic(instantJson, width, height);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
DrawPicUtil util=new DrawPicUtil();
|
||||
List<List<Object>> values=new ArrayList<>();
|
||||
List<Object> a = new ArrayList() {{
|
||||
add("2023-10-10 00:10:00");
|
||||
add(12.3);
|
||||
}};
|
||||
values.add(a);
|
||||
List<Object> a1 = new ArrayList() {{
|
||||
add("2023-10-10 00:20:00");
|
||||
add(22.3);
|
||||
}};
|
||||
values.add(a1);
|
||||
List<Object> a2 = new ArrayList() {{
|
||||
add("2023-10-10 00:30:00");
|
||||
add(32.3);
|
||||
}};
|
||||
values.add(a2);
|
||||
|
||||
List<List<Object>> limit=new ArrayList<>();
|
||||
List<Object> b = new ArrayList() {{
|
||||
add("2023-10-10 00:10:00");
|
||||
add(40);
|
||||
}};
|
||||
limit.add(b);
|
||||
List<Object> b1 = new ArrayList() {{
|
||||
add("2023-10-10 00:20:00");
|
||||
add(40);
|
||||
}};
|
||||
limit.add(b1);
|
||||
List<Object> b2 = new ArrayList() {{
|
||||
add("2023-10-10 00:30:00");
|
||||
add(40);
|
||||
}};
|
||||
limit.add(b2);
|
||||
Map<String,List<List<Object>>> da = new HashMap<>();
|
||||
da.put("实际", new ArrayList<>());
|
||||
String s = util.drawSteadyTargetPic("电压", da, "限制", limit);
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.utils.FileUtil;
|
||||
import com.njcn.echarts.pojo.constant.PicCommonData;
|
||||
import com.njcn.echarts.util.DrawPicUtil;
|
||||
import com.njcn.event.file.pojo.bo.WaveDataDetail;
|
||||
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
||||
@@ -189,8 +190,11 @@ public class WavePicComponent {
|
||||
String secondPic;
|
||||
if (waveDataDetails.size() == 1) {
|
||||
//将图片上传到minioss
|
||||
InputStream instantStream = IoUtil.toStream(firstPic, CharsetUtil.UTF_8);
|
||||
picPath = fileStorageUtil.uploadStream(instantStream, OssPath.EVENT_WAVE_PIC, FileUtil.generateFileName("png"));
|
||||
if (firstPic.contains(PicCommonData.PNG_PREFIX)) {
|
||||
firstPic = firstPic.replace(PicCommonData.PNG_PREFIX, "");
|
||||
}
|
||||
byte[] bytes = Base64.getDecoder().decode(firstPic);
|
||||
picPath = fileStorageUtil.uploadStream(new ByteArrayInputStream(bytes), OssPath.EVENT_WAVE_PIC, FileUtil.generateFileName("png"));
|
||||
} else if (waveDataDetails.size() == 2) {
|
||||
//绘制第二个电压瞬时波形图
|
||||
waveDataDetail = waveDataDetails.get(1);
|
||||
@@ -225,8 +229,11 @@ public class WavePicComponent {
|
||||
String secondPic;
|
||||
if (waveDataDetails.size() == 1) {
|
||||
//将图片上传到minioss
|
||||
InputStream instantStream = IoUtil.toStream(firstPic, CharsetUtil.UTF_8);
|
||||
picPath = fileStorageUtil.uploadStream(instantStream, OssPath.EVENT_WAVE_PIC, FileUtil.generateFileName("png"));
|
||||
if (firstPic.contains(PicCommonData.PNG_PREFIX)) {
|
||||
firstPic = firstPic.replace(PicCommonData.PNG_PREFIX, "");
|
||||
}
|
||||
byte[] bytes = Base64.getDecoder().decode(firstPic);
|
||||
picPath = fileStorageUtil.uploadStream(new ByteArrayInputStream(bytes), OssPath.EVENT_WAVE_PIC, FileUtil.generateFileName("png"));
|
||||
} else if (waveDataDetails.size() == 2) {
|
||||
//绘制第二个电压瞬时波形图
|
||||
waveDataDetail = waveDataDetails.get(1);
|
||||
@@ -287,8 +294,10 @@ public class WavePicComponent {
|
||||
*/
|
||||
public String generateSteadyTargetImage(String title, Map<String ,List<List<Object>>> values, String limitName, List<List<Object>> limit) {
|
||||
String firstPic = drawPicUtil.drawSteadyTargetPic(title,values,limitName,limit);
|
||||
//将图片上传到minioss
|
||||
InputStream instantStream = IoUtil.toStream(firstPic, CharsetUtil.UTF_8);
|
||||
return fileStorageUtil.uploadStream(instantStream, OssPath.EVENT_WAVE_PIC, FileUtil.generateFileName("png"));
|
||||
if (firstPic.contains(PicCommonData.PNG_PREFIX)) {
|
||||
firstPic = firstPic.replace(PicCommonData.PNG_PREFIX, "");
|
||||
}
|
||||
byte[] bytes = Base64.getDecoder().decode(firstPic);
|
||||
return fileStorageUtil.uploadStream(new ByteArrayInputStream(bytes), OssPath.EVENT_WAVE_PIC, FileUtil.generateFileName("png"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class CommonServiceImpl implements CommonService {
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(getTableNameByClassId(tableName),StatisticalDataDTO.class);
|
||||
influxQueryWrapper.max(columnName,InfluxDBTableConstant.MAX_VALUE)
|
||||
.min(columnName,InfluxDBTableConstant.MIN_VALUE)
|
||||
.mean(columnName)
|
||||
.mean(columnName,InfluxDBTableConstant.AVG_VALUE)
|
||||
.eq(InfluxDBTableConstant.LINE_ID,lineId)
|
||||
.eq(InfluxDBTableConstant.CL_DID,clDid)
|
||||
.between(InfluxDBTableConstant.TIME, startTime, endTime);
|
||||
|
||||
@@ -109,7 +109,7 @@ public class ExecutionCenter extends BaseController {
|
||||
,methodDescribe
|
||||
,calculatedParam.isFullChain()?"全链":"指定节点:".concat(String.join(StrPool.COMMA,calculatedParam.getTagNames()))
|
||||
,failStep.getNodeId().concat(Objects.isNull(failStep.getTag()) ? "" :StrPool.DASHED.concat(failStep.getTag()))
|
||||
,failStep.getException().getMessage());
|
||||
,Objects.isNull(failStep.getException()) ? null:failStep.getException().getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class MeasurementExecutor extends BaseExecutor {
|
||||
|
||||
|
||||
/**
|
||||
* 算法名: 3.4.1.1-----监测点报表
|
||||
* 算法名: 3.3.1.1-----监测点评价
|
||||
*
|
||||
* @author hongawen
|
||||
* @date 2023年11月01日 11:08
|
||||
|
||||
@@ -23,6 +23,9 @@ import java.util.Map;
|
||||
@FeignClient(value = ServerInfo.SYSTEM,path = "/csDictData",fallbackFactory = EpdFeignClientFallbackFactory.class,contextId = "csDictData")
|
||||
public interface EpdFeignClient {
|
||||
|
||||
@PostMapping("/update")
|
||||
HttpResult<String> update(@RequestBody EleEpdPqdParam.EleEpdPqdUpdateParam updateParam);
|
||||
|
||||
@PostMapping("/addByModel")
|
||||
HttpResult<String> addByModel(@RequestBody List<EleEpdPqdParam> eleEpdPqdParam);
|
||||
|
||||
|
||||
@@ -35,6 +35,12 @@ public class EpdFeignClientFallbackFactory implements FallbackFactory<EpdFeignCl
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new EpdFeignClient() {
|
||||
@Override
|
||||
public HttpResult<String> update(EleEpdPqdParam.EleEpdPqdUpdateParam updateParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","更新字典数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> addByModel(List<EleEpdPqdParam> eleEpdPqdParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","通过模板录入字典数据",cause.toString());
|
||||
|
||||
Reference in New Issue
Block a user