Commit 4ef16636 authored by hezhuozhi's avatar hezhuozhi

Merge remote-tracking branch 'origin/developer_bw' into developer_bw

parents 90659c33 d19961cc
...@@ -12,6 +12,8 @@ import java.util.Map; ...@@ -12,6 +12,8 @@ import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import javax.annotation.PostConstruct;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -121,9 +123,11 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ ...@@ -121,9 +123,11 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
List<SofarStationList> jsonObject = requestUtil.getResPonseList(SoFarConstant.stationListUrl, List<SofarStationList> jsonObject = requestUtil.getResPonseList(SoFarConstant.stationListUrl,
SoFarConstant.requestPost, requestInfo, SoFarConstant.resovleRule_data, SofarStationList.class); SoFarConstant.requestPost, requestInfo, SoFarConstant.resovleRule_data, SofarStationList.class);
// 新增td电站 // 新增td电站
int i = 0;
for (SofarStationList sunlight : jsonObject) { for (SofarStationList sunlight : jsonObject) {
sunlight.setCreatedTime(System.currentTimeMillis()); sunlight.setCreatedTime(System.currentTimeMillis());
sofarStationListMapper.insert(sunlight); sofarStationListMapper.insert(sunlight);
System.out.println(++i);
} }
//删除多余的信息 //删除多余的信息
deleteSHMessage(jsonObject); deleteSHMessage(jsonObject);
...@@ -191,11 +195,18 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ ...@@ -191,11 +195,18 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
} }
} }
List<String> names = jpStations.stream().map(i->i.getName()).collect(Collectors.toList());
// 封装电站数据 // 封装电站数据
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
SofarStationList sunlightDto = list.get(i); SofarStationList sunlightDto = list.get(i);
if(names.contains(sunlightDto.getName()))
{
continue;
}
// System.out.println(i+"===================================================="); // System.out.println(i+"====================================================");
JpStation jpStation = null; JpStation jpStation = null;
if (bodyparam.containsKey(sunlightDto.getId().toString())) { if (bodyparam.containsKey(sunlightDto.getId().toString())) {
...@@ -383,7 +394,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ ...@@ -383,7 +394,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
if (jsonObject1 != null && !jsonObject1.isEmpty()) { if (jsonObject1 != null && !jsonObject1.isEmpty()) {
Map<String, String> maps = jsonObject1.stream() Map<String, String> maps = jsonObject1.stream()
.collect(Collectors.toMap(SofarInverterDto::getKey, SofarInverterDto::getValue)); .collect(Collectors.toMap(SofarInverterDto::getKey, SofarInverterDto::getValue,(k1,k2)->k1));
// // 功率 // // 功率
// jpStation.setRealTimePower( // jpStation.setRealTimePower(
// maps != null && maps.containsKey("TPG") // maps != null && maps.containsKey("TPG")
...@@ -484,7 +495,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ ...@@ -484,7 +495,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) { if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) {
jpStationMapper.updateById(jpStation); jpStationMapper.updateById(jpStation);
} else { } else {
jpStationMapper.insert(jpStation); jpStationMapper.insert(jpStation);
} }
String today = DateUtil.today(); String today = DateUtil.today();
......
...@@ -13,7 +13,7 @@ spring.db2.datasource.password=Yeejoin@2020 ...@@ -13,7 +13,7 @@ spring.db2.datasource.password=Yeejoin@2020
spring.db2.datasource.driver-class-name=com.kingbase8.Driver spring.db2.datasource.driver-class-name=com.kingbase8.Driver
## db3-taosiData ## db3-taosiData
spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource spring.db3.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db3.datasource.url=jdbc:TAOS-RS://47.92.234.253:6041/house_pv_data?user=root&password=taosdata&characterEncoding=utf8 spring.db3.datasource.url=jdbc:TAOS-RS://192.168.0.61:6041/house_pv_data?user=root&password=taosdata&characterEncoding=utf8
spring.db3.datasource.username=root spring.db3.datasource.username=root
spring.db3.datasource.password=taosdata spring.db3.datasource.password=taosdata
spring.db3.datasource.driver-class-name=com.taosdata.jdbc.rs.RestfulDriver spring.db3.datasource.driver-class-name=com.taosdata.jdbc.rs.RestfulDriver
......
spring.application.name=AMOS-API-ACCESSAPI spring.application.name=AMOS-API-ACCESSAPI
server.servlet.context-path=/housepvapi server.servlet.context-path=/housepvapi
server.port=11006 server.port=11006
spring.profiles.active=dev spring.profiles.active=kingbase8
server.compression.enabled=true server.compression.enabled=true
spring.jackson.dateFormat=yyyy-MM-dd HH:mm:ss spring.jackson.dateFormat=yyyy-MM-dd HH:mm:ss
......
...@@ -46,7 +46,10 @@ ...@@ -46,7 +46,10 @@
<!-- 日志输出级别 --> <!-- 日志输出级别 -->
<root level="DEBUG"> <root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT" />
</root> </root>
<root level="ERROR">
<appender-ref ref="FILE" />
</root>
</configuration> </configuration>
\ No newline at end of file
...@@ -74,8 +74,8 @@ public class RegionalCompanies extends BaseEntity { ...@@ -74,8 +74,8 @@ public class RegionalCompanies extends BaseEntity {
private String companyCode; private String companyCode;
@TableField(exist = false) @TableField(exist = false)
private List<Object> children; private List<Object> children;
private int limits;
......
...@@ -362,6 +362,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina ...@@ -362,6 +362,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
FinancingInfo financingInfo = this.getBaseMapper().selectOne(info); FinancingInfo financingInfo = this.getBaseMapper().selectOne(info);
if (params.containsKey("financingCompaniesSeq") && params.get("financingCompaniesSeq")!= null) { if (params.containsKey("financingCompaniesSeq") && params.get("financingCompaniesSeq")!= null) {
financingInfo.setFinancingCompaniesSeq(Long.valueOf(params.get("financingCompaniesSeq").toString())); financingInfo.setFinancingCompaniesSeq(Long.valueOf(params.get("financingCompaniesSeq").toString()));
Map<String, Object> orgInfo = this.getBaseMapper().selectRZOrgInfo(Long.valueOf(params.get("financingCompaniesSeq").toString()));
financingInfo.setFinancingCompaniesName(orgInfo.getOrDefault("COMPANY_NAME", "").toString());
} }
if("融资审核".equals(financingAuditingDto.getNextNodeName())){ if("融资审核".equals(financingAuditingDto.getNextNodeName())){
financingInfo.setTrCreateTime(new Date()); financingInfo.setTrCreateTime(new Date());
......
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