Commit d495a98d authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.开发间开优化结果统计功能,创建间开优化效果统计表,生成对应代码;
2.修改15天,10天,3天,1天间开优化功能,修改代码结构;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent c5fa02d9
......@@ -31,7 +31,7 @@ public class ExcelSelectedResolve {
public String[] resolveSelectedSource(ExcelSelected excelSelected) {
if (ObjectUtil.isNull(excelSelected)) {
return null;
return new String[0];
}
// 获取固定下拉框的内容
String[] source = excelSelected.source();
......@@ -51,6 +51,6 @@ public class ExcelSelectedResolve {
log.error("解析动态下拉框数据异常", e);
}
}
return null;
return new String[0];
}
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import xstartup.cache.XCacheLife;
import xstartup.cache.XCacheObject;
import xstartup.cache.XListCache;
import java.util.Collections;
import java.util.List;
/**
......@@ -99,7 +100,7 @@ public class RolePermissionCache implements XCacheObject, XCacheLife {
static class Tool extends XListCache<RolePermissionCache> {
@Override
protected List<RolePermissionCache> restore(XContext context, String listKey) {
return null;
return Collections.emptyList();
}
}
}
......@@ -6,6 +6,7 @@ import xstartup.cache.XCacheLife;
import xstartup.cache.XCacheObject;
import xstartup.cache.XListCache;
import java.util.Collections;
import java.util.List;
public class SysAreaCache implements XCacheObject, XCacheLife {
......@@ -96,7 +97,7 @@ public class SysAreaCache implements XCacheObject, XCacheLife {
static class Tool extends XListCache<SysAreaCache> {
@Override
protected List<SysAreaCache> restore(XContext context, String listKey) {
return null;
return Collections.emptyList();
}
}
}
......@@ -9,6 +9,7 @@ import xstartup.cache.XCacheLife;
import xstartup.cache.XCacheObject;
import xstartup.cache.XListCache;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
......@@ -330,7 +331,7 @@ public class SysDictionaryCache implements XCacheObject, XCacheLife {
static class Tool extends XListCache<SysDictionaryCache> {
@Override
protected List<SysDictionaryCache> restore(XContext context, String listKey) {
return null;
return Collections.emptyList();
}
}
}
......@@ -6,6 +6,7 @@ import xstartup.cache.XCacheLife;
import xstartup.cache.XCacheObject;
import xstartup.cache.XListCache;
import java.util.Collections;
import java.util.List;
public class SysOrganizationCache implements XCacheObject, XCacheLife {
......@@ -126,7 +127,7 @@ public class SysOrganizationCache implements XCacheObject, XCacheLife {
static class Tool extends XListCache<SysOrganizationCache> {
@Override
protected List<SysOrganizationCache> restore(XContext context, String listKey) {
return null;
return Collections.emptyList();
}
}
}
......@@ -36,6 +36,7 @@ import xstartup.data.XListResult;
import xstartup.data.XSingleResult;
import java.util.*;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import static pps.core.common.constant.BusinessConstant.LOGIN_FLAG_SIMULATE;
......@@ -103,7 +104,7 @@ public class PpsUserSessionInjectProviderImpl implements XSessionInjectProvider
if (ObjectUtil.isNotNull(mediaTypesView)) {
String mediaType = mediaTypesView.getMediaType();
if (CharSequenceUtil.isNotBlank(mediaType)) {
set.addAll(CharSequenceUtil.split(mediaType, ','));
set.addAll(CharSequenceUtil.split(mediaType, Pattern.quote(",")));
}
}
if (CollUtil.isNotEmpty(set)) {
......@@ -202,7 +203,7 @@ public class PpsUserSessionInjectProviderImpl implements XSessionInjectProvider
if (CharSequenceUtil.equals(OuLevelConstant.JI_GUAN_CHU_SHI.getCode(), org.getOuLevel()) ||
CharSequenceUtil.equals(OuLevelConstant.JI_GUAN_KE_SHI.getCode(), org.getOuLevel())) {
//查找上级机构
List<String> idPathList = CharSequenceUtil.split(org.getOuPath(), '/');
List<String> idPathList = CharSequenceUtil.split(org.getOuPath(), Pattern.quote("/"));
if (CollUtil.isEmpty(idPathList)) {
return null;
} else {
......
......@@ -37,6 +37,7 @@ import xstartup.helper.XTransactionHelper;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@XText("字典接口")
......@@ -315,7 +316,7 @@ public class SysDictionaryService {
List<String> collect = sysDictionaryEnts.stream()
.map(p -> {
if (CharSequenceUtil.isNotBlank(p.getDicPath())) {
String[] split = p.getDicPath().split("/");
String[] split = p.getDicPath().split(Pattern.quote("/"));
if (ArrayUtil.isNotEmpty(split)) {
return split[1];
} else {
......@@ -369,7 +370,7 @@ public class SysDictionaryService {
//添加子节点是否打开的标志
out.setChildren(null);
}
out.setXh(++i + "");
out.setXh(String.valueOf(++i));
}
}
return query;
......@@ -400,7 +401,7 @@ public class SysDictionaryService {
tree.setChildren(null);
if (CharSequenceUtil.isBlank(tree.getPid()) || "1".equals(tree.getPid())) {
trees.add(tree);
tree.setXh(++i + "");
tree.setXh(String.valueOf(++i));
}
//子集
int j = 0;
......@@ -409,7 +410,7 @@ public class SysDictionaryService {
if (CollUtil.isEmpty(tree.getChildren())) {
tree.setChildren(Collections.emptyList());
}
it.setXh(++j + "");
it.setXh(String.valueOf(++j));
tree.set_showChildren(true);
tree.setBeHasChildren(1);
tree.getChildren().add(it);
......@@ -447,7 +448,7 @@ public class SysDictionaryService {
if (CollUtil.isNotEmpty(sysDictionaryEnts)) {
List<String> collect = sysDictionaryEnts.stream().map(p -> {
if (CharSequenceUtil.isNotBlank(p.getDicPath())) {
String[] split = p.getDicPath().split("/");
String[] split = p.getDicPath().split(Pattern.quote("/"));
if (ArrayUtil.isNotEmpty(split)) {
return split[1];
} else {
......@@ -506,7 +507,7 @@ public class SysDictionaryService {
//添加子节点是否打开的标志
out.setChildren(null);
}
out.setXh(++i + "");
out.setXh(String.valueOf(++i));
}
}
return query;
......
......@@ -31,6 +31,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@XText("角色管理")
......@@ -83,7 +84,7 @@ public class SysRoleService {
SysOrganizationRelEnt relEnt = ouRelEnts.get(0);
String ouIdPath = relEnt.getOuIdPath();
if (CharSequenceUtil.isNotBlank(ouIdPath)) {
List<String> ouIds = CharSequenceUtil.split(ouIdPath, '/').stream()
List<String> ouIds = CharSequenceUtil.split(ouIdPath, Pattern.quote("/")).stream()
.filter(id -> !CharSequenceUtil.equals(id, input.getOuId()))
.collect(Collectors.toList());
record.setOuIds(ouIds);
......
package pps.cloud.base.service;
import pps.cloud.base.service.data.CrawlBaseWatherInput;
import xstartup.annotation.XService;
import xstartup.annotation.XText;
import xstartup.base.XContext;
import xstartup.data.XServiceResult;
@XService
public interface BaseWatherCloudService {
@XText("获取电站天气信息")
XServiceResult crawlPlantBaseWatherData(XContext context);
@XText("获取天气信息")
XServiceResult crawlBaseWatherData(XContext context);
@XText("获取天气信息")
XServiceResult crawlBaseWatherDataByCityCode(XContext context, CrawlBaseWatherInput input);
}
......@@ -208,7 +208,12 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService {
dateTime = DateUtil.date(dailyData.getDateTime());
for (int i = 0; i < 8; i++) {
int hour = LocalTime.parse(dailyData.getHourTimeArray().get(i)).getHour();
DateTime parse = DateUtil.parse(DateUtil.formatDate(dateTime) + ' ' + this.int2Str(hour) + ':' + BusinessConstant.START_OF_DAY_TIME);
DateTime parse = DateUtil.parse(String.format(
"%s %s:%s",
DateUtil.formatDate(dateTime),
this.int2Str(hour),
BusinessConstant.START_OF_DAY_TIME
));
if (DateUtil.compare(parse, dateTime) < 0 && flag == 0) {
parse = DateUtil.offsetDay(parse, 1);
dateTime = DateUtil.offsetDay(dateTime, 1);
......@@ -389,7 +394,12 @@ public class BaseWeatherCloudServiceImpl implements IBaseWeatherCloudService {
}
//判断小时数与查到的小时数,如果查到的小时数小,判断为第二天
int hour = LocalTime.parse(dailyData.getHourTimeArray().get(i)).getHour();
DateTime parse = DateUtil.parse(DateUtil.formatDate(dateTime) + ' ' + this.int2Str(hour) + ':' + BusinessConstant.START_OF_DAY_TIME);
DateTime parse = DateUtil.parse(String.format(
"%s %s:%s",
DateUtil.formatDate(dateTime),
this.int2Str(hour),
BusinessConstant.START_OF_DAY_TIME
));
if (hour == 23) {
nextDay = true;
} else {
......
package pps.cloud.prediction.service;
import xstartup.annotation.XService;
import xstartup.annotation.XText;
import xstartup.base.XContext;
import xstartup.data.XServiceResult;
@XService
@XText("光伏预测长期")
public interface PlantPredictedPowerLongTermDataCloudService {
@XText("定时运行预测长期数据")
XServiceResult runPlantPredictedPowerLongTermData(XContext context);
}
\ 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