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;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.PostConstruct;
import cn.hutool.core.collection.CollectionUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
......@@ -121,9 +123,11 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
List<SofarStationList> jsonObject = requestUtil.getResPonseList(SoFarConstant.stationListUrl,
SoFarConstant.requestPost, requestInfo, SoFarConstant.resovleRule_data, SofarStationList.class);
// 新增td电站
int i = 0;
for (SofarStationList sunlight : jsonObject) {
sunlight.setCreatedTime(System.currentTimeMillis());
sofarStationListMapper.insert(sunlight);
System.out.println(++i);
}
//删除多余的信息
deleteSHMessage(jsonObject);
......@@ -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++) {
SofarStationList sunlightDto = list.get(i);
if(names.contains(sunlightDto.getName()))
{
continue;
}
// System.out.println(i+"====================================================");
JpStation jpStation = null;
if (bodyparam.containsKey(sunlightDto.getId().toString())) {
......@@ -383,7 +394,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
if (jsonObject1 != null && !jsonObject1.isEmpty()) {
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(
// maps != null && maps.containsKey("TPG")
......@@ -484,7 +495,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
if (!ObjectUtils.isEmpty(jpStation.getSequenceNbr())) {
jpStationMapper.updateById(jpStation);
} else {
jpStationMapper.insert(jpStation);
jpStationMapper.insert(jpStation);
}
String today = DateUtil.today();
......
......@@ -13,7 +13,7 @@ spring.db2.datasource.password=Yeejoin@2020
spring.db2.datasource.driver-class-name=com.kingbase8.Driver
## db3-taosiData
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.password=taosdata
spring.db3.datasource.driver-class-name=com.taosdata.jdbc.rs.RestfulDriver
......
spring.application.name=AMOS-API-ACCESSAPI
server.servlet.context-path=/housepvapi
server.port=11006
spring.profiles.active=dev
spring.profiles.active=kingbase8
server.compression.enabled=true
spring.jackson.dateFormat=yyyy-MM-dd HH:mm:ss
......
......@@ -46,7 +46,10 @@
<!-- 日志输出级别 -->
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
<root level="ERROR">
<appender-ref ref="FILE" />
</root>
</configuration>
\ No newline at end of file
......@@ -74,8 +74,8 @@ public class RegionalCompanies extends BaseEntity {
private String companyCode;
@TableField(exist = false)
private List<Object> children;
private int limits;
......
......@@ -362,6 +362,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
FinancingInfo financingInfo = this.getBaseMapper().selectOne(info);
if (params.containsKey("financingCompaniesSeq") && params.get("financingCompaniesSeq")!= null) {
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())){
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