作者 wwmin

修改显示万元

... ... @@ -636,10 +636,10 @@ public class ProjectServiceImpl implements ProjectService {
no_3_1_1_1Dto.setInvestmentEstimation(format.apply(new BigDecimal(num1)));
Double fd = windAh * synthesizeNo26ServiceById.getNo124();
Double num2 = 0d;
if(fd>electricityAll){
if (fd > electricityAll) {
num2 = Double.valueOf(df.format(electricityAll * synthesize_no_2_5.getElectricitySellingPrice() / 10000));
}else{
num2 = Double.valueOf(df.format(fd * synthesize_no_2_5.getElectricitySellingPrice() / 10000));
} else {
num2 = Double.valueOf(df.format(fd * synthesize_no_2_5.getElectricitySellingPrice() / 10000));
}
synthesize_no_3_6.setNo25(num2);
... ... @@ -3774,7 +3774,7 @@ public class ProjectServiceImpl implements ProjectService {
equipmentCapacityDto1.setName("电网");
equipmentCapacityDto1.setData(format.apply(BigDecimal.valueOf(synthesize_no_3_6.getNo50())));
equipmentCapacityDto1.setType("4");
list2.add(equipmentCapacityDto1);
// list2.add(equipmentCapacityDto1);
Double date = 0.0;
for (EquipmentCapacityDto capacityDto : list2) {
date += Double.parseDouble(capacityDto.getData());
... ... @@ -3785,7 +3785,14 @@ public class ProjectServiceImpl implements ProjectService {
} else {
equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh");
}
List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).collect(Collectors.toList());
List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).map(p->{
double d = Double.parseDouble(p.getData());
if (d >= 10000) {
p.setData(format.apply(new BigDecimal(d / 10000)));
p.setUnit("万kWh");
}
return p;
}).collect(Collectors.toList());
equipmentCapacityVo1.setList(collect);
equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1);
list.add(equipmentCapacityDto);
... ... @@ -3855,7 +3862,14 @@ public class ProjectServiceImpl implements ProjectService {
} else {
equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh");
}
List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).collect(Collectors.toList());
List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).map(p->{
double d = Double.parseDouble(p.getData());
if (d >= 10000) {
p.setData(format.apply(new BigDecimal(d / 10000)));
p.setUnit("万kWh");
}
return p;
}).collect(Collectors.toList());
equipmentCapacityVo1.setList(collect);
equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1);
list.add(equipmentCapacityDto);
... ... @@ -3918,7 +3932,14 @@ public class ProjectServiceImpl implements ProjectService {
} else {
equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh");
}
List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).collect(Collectors.toList());
List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).map(p->{
double d = Double.parseDouble(p.getData());
if (d >= 10000) {
p.setData(format.apply(new BigDecimal(d / 10000)));
p.setUnit("万kWh");
}
return p;
}).collect(Collectors.toList());
equipmentCapacityVo1.setList(collect);
equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1);
list.add(equipmentCapacityDto);
... ... @@ -3969,7 +3990,14 @@ public class ProjectServiceImpl implements ProjectService {
} else {
equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh");
}
List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).collect(Collectors.toList());
List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).map(p->{
double d = Double.parseDouble(p.getData());
if (d >= 10000) {
p.setData(format.apply(new BigDecimal(d / 10000)));
p.setUnit("万kWh");
}
return p;
}).collect(Collectors.toList());
equipmentCapacityVo1.setList(collect);
equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1);
list.add(equipmentCapacityDto);
... ... @@ -3984,6 +4012,14 @@ public class ProjectServiceImpl implements ProjectService {
} else {
equipmentCapacityVo.setTotal(format.apply(new BigDecimal(date)) + "kWh");
}
list.stream().filter(item -> !item.getData().equals("0.00")).map(equipmentCapacityDto -> {
double d = Double.parseDouble(equipmentCapacityDto.getData());
if (d >= 10000) {
equipmentCapacityDto.setData(format.apply(new BigDecimal(d / 10000)));
equipmentCapacityDto.setUnit("万kWh");
}
return equipmentCapacityDto;
}).collect(Collectors.toList());
equipmentCapacityVo.setList(list);
return equipmentCapacityVo;
}
... ...