Commit 7ba50b34 authored by 朱晨阳's avatar 朱晨阳

装机容量单位换算

parent f680428b
...@@ -146,9 +146,7 @@ public class JpStationController extends BaseController { ...@@ -146,9 +146,7 @@ public class JpStationController extends BaseController {
qug3.eq(JpStation::getThirdStationId, id); qug3.eq(JpStation::getThirdStationId, id);
JpStation JpStation = jpStationMapper.selectOne(qug3); JpStation JpStation = jpStationMapper.selectOne(qug3);
// 单位转换
double capacity = (JpStation.getCapacity() == null ? 0: JpStation.getCapacity())/1000;
JpStation.setCapacity(capacity);
JpStationDto jpStationDto = jpStationServiceImpl.queryBySeq(JpStation.getSequenceNbr()); JpStationDto jpStationDto = jpStationServiceImpl.queryBySeq(JpStation.getSequenceNbr());
LambdaQueryWrapper<JpInverter> qug = new LambdaQueryWrapper<>(); LambdaQueryWrapper<JpInverter> qug = new LambdaQueryWrapper<>();
...@@ -166,9 +164,13 @@ public class JpStationController extends BaseController { ...@@ -166,9 +164,13 @@ public class JpStationController extends BaseController {
RegionalCompanies personnelBusiness = regionalCompaniesMapper.selectOne(qug2); RegionalCompanies personnelBusiness = regionalCompaniesMapper.selectOne(qug2);
String names = jpCollector.stream().map(JpCollector::getSnCode).collect(Collectors.joining(",")); String names = jpCollector.stream().map(JpCollector::getSnCode).collect(Collectors.joining(","));
String name = jpInverter.stream().map(JpInverter::getSnCode).collect(Collectors.joining(",")); String name = jpInverter.stream().map(JpInverter::getSnCode).collect(Collectors.joining(","));
// 单位转换
double capacity = Double.parseDouble(String.format("%.3f", (JpStation.getCapacity() == null ? 0: JpStation.getCapacity())/1000)) ;
jpStationDto.setNbsn(name); jpStationDto.setNbsn(name);
jpStationDto.setCjsn(names); jpStationDto.setCjsn(names);
jpStationDto.setCapacity(jpStationDto.getCapacity());
jpStationDto.setCapacity(capacity);
jpStationDto.setRegionalCompaniesName(personnelBusiness.getRegionalCompaniesName()); jpStationDto.setRegionalCompaniesName(personnelBusiness.getRegionalCompaniesName());
return ResponseHelper.buildResponse(jpStationDto); return ResponseHelper.buildResponse(jpStationDto);
} }
......
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