Browse Source

1、优化预测出现null

dev
mh 5 months ago
parent
commit
2b3b9fbdd5
  1. 3
      user-service/src/main/java/com/mh/user/service/impl/HistoryDataPreServiceImpl.java
  2. 20
      user-service/src/main/resources/application-prod.yml

3
user-service/src/main/java/com/mh/user/service/impl/HistoryDataPreServiceImpl.java

@ -74,6 +74,9 @@ public class HistoryDataPreServiceImpl implements HistoryDataPreService {
@Override @Override
public void startTrainData(String buildingId) throws Exception { public void startTrainData(String buildingId) throws Exception {
List<HistoryDataPre> trainData = historyDataPreMapper.getTrainData(buildingId); List<HistoryDataPre> trainData = historyDataPreMapper.getTrainData(buildingId);
if (trainData == null || trainData.size() == 0) {
return;
}
List<String[]> historyDataPreList = new ArrayList<>(); List<String[]> historyDataPreList = new ArrayList<>();
for (HistoryDataPre dataPre : trainData) { for (HistoryDataPre dataPre : trainData) {
historyDataPreList.add(convert(dataPre)); historyDataPreList.add(convert(dataPre));

20
user-service/src/main/resources/application-prod.yml

@ -1,5 +1,5 @@
server: server:
port: 8762 #8761创新、8762广商、8763华厦、广州理工 port: 8763 #8761创新、8762广商、8763华厦、广州理工
spring: spring:
application: application:
name: user-service name: user-service
@ -14,10 +14,10 @@ spring:
# password: mh@803 # password: mh@803
## url: jdbc:sqlserver://120.25.220.177:32012;DatabaseName=M_CHWS;allowMultiQueries=true ## url: jdbc:sqlserver://120.25.220.177:32012;DatabaseName=M_CHWS;allowMultiQueries=true
#阿里云服务器-广州理工 #阿里云服务器-广州理工
# url: jdbc:sqlserver://120.25.220.177:32012;DatabaseName=CHWS;allowMultiQueries=true url: jdbc:sqlserver://111.230.50.186:32012;DatabaseName=CHWS;allowMultiQueries=true
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
# username: test username: test
# password: minghan123456@ password: minghan123456@
#华厦云服务器 #华厦云服务器
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=CHWS;allowMultiQueries=true # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=CHWS;allowMultiQueries=true
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
@ -28,11 +28,11 @@ spring:
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
# username: chws # username: chws
# password: mh@803 # password: mh@803
#广商服务器 # #广商服务器
url: jdbc:sqlserver://119.29.33.133:2008;DatabaseName=chws_gsh;allowMultiQueries=true # url: jdbc:sqlserver://119.29.33.133:2008;DatabaseName=chws_gsh;allowMultiQueries=true
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
username: chws # username: chws
password: mh@803 # password: mh@803
#本机 #本机
# url: jdbc:sqlserver://127.0.0.1:9956;DatabaseName=CHWS;allowMultiQueries=true # url: jdbc:sqlserver://127.0.0.1:9956;DatabaseName=CHWS;allowMultiQueries=true
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

Loading…
Cancel
Save