作者 wwmin

修改显示万元

@@ -636,10 +636,10 @@ public class ProjectServiceImpl implements ProjectService { @@ -636,10 +636,10 @@ public class ProjectServiceImpl implements ProjectService {
636 no_3_1_1_1Dto.setInvestmentEstimation(format.apply(new BigDecimal(num1))); 636 no_3_1_1_1Dto.setInvestmentEstimation(format.apply(new BigDecimal(num1)));
637 Double fd = windAh * synthesizeNo26ServiceById.getNo124(); 637 Double fd = windAh * synthesizeNo26ServiceById.getNo124();
638 Double num2 = 0d; 638 Double num2 = 0d;
639 - if(fd>electricityAll){ 639 + if (fd > electricityAll) {
640 num2 = Double.valueOf(df.format(electricityAll * synthesize_no_2_5.getElectricitySellingPrice() / 10000)); 640 num2 = Double.valueOf(df.format(electricityAll * synthesize_no_2_5.getElectricitySellingPrice() / 10000));
641 - }else{  
642 - num2 = Double.valueOf(df.format(fd * synthesize_no_2_5.getElectricitySellingPrice() / 10000)); 641 + } else {
  642 + num2 = Double.valueOf(df.format(fd * synthesize_no_2_5.getElectricitySellingPrice() / 10000));
643 } 643 }
644 644
645 synthesize_no_3_6.setNo25(num2); 645 synthesize_no_3_6.setNo25(num2);
@@ -3774,7 +3774,7 @@ public class ProjectServiceImpl implements ProjectService { @@ -3774,7 +3774,7 @@ public class ProjectServiceImpl implements ProjectService {
3774 equipmentCapacityDto1.setName("电网"); 3774 equipmentCapacityDto1.setName("电网");
3775 equipmentCapacityDto1.setData(format.apply(BigDecimal.valueOf(synthesize_no_3_6.getNo50()))); 3775 equipmentCapacityDto1.setData(format.apply(BigDecimal.valueOf(synthesize_no_3_6.getNo50())));
3776 equipmentCapacityDto1.setType("4"); 3776 equipmentCapacityDto1.setType("4");
3777 - list2.add(equipmentCapacityDto1); 3777 +// list2.add(equipmentCapacityDto1);
3778 Double date = 0.0; 3778 Double date = 0.0;
3779 for (EquipmentCapacityDto capacityDto : list2) { 3779 for (EquipmentCapacityDto capacityDto : list2) {
3780 date += Double.parseDouble(capacityDto.getData()); 3780 date += Double.parseDouble(capacityDto.getData());
@@ -3785,7 +3785,14 @@ public class ProjectServiceImpl implements ProjectService { @@ -3785,7 +3785,14 @@ public class ProjectServiceImpl implements ProjectService {
3785 } else { 3785 } else {
3786 equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh"); 3786 equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh");
3787 } 3787 }
3788 - List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).collect(Collectors.toList()); 3788 + List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).map(p->{
  3789 + double d = Double.parseDouble(p.getData());
  3790 + if (d >= 10000) {
  3791 + p.setData(format.apply(new BigDecimal(d / 10000)));
  3792 + p.setUnit("万kWh");
  3793 + }
  3794 + return p;
  3795 + }).collect(Collectors.toList());
3789 equipmentCapacityVo1.setList(collect); 3796 equipmentCapacityVo1.setList(collect);
3790 equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1); 3797 equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1);
3791 list.add(equipmentCapacityDto); 3798 list.add(equipmentCapacityDto);
@@ -3855,7 +3862,14 @@ public class ProjectServiceImpl implements ProjectService { @@ -3855,7 +3862,14 @@ public class ProjectServiceImpl implements ProjectService {
3855 } else { 3862 } else {
3856 equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh"); 3863 equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh");
3857 } 3864 }
3858 - List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).collect(Collectors.toList()); 3865 + List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).map(p->{
  3866 + double d = Double.parseDouble(p.getData());
  3867 + if (d >= 10000) {
  3868 + p.setData(format.apply(new BigDecimal(d / 10000)));
  3869 + p.setUnit("万kWh");
  3870 + }
  3871 + return p;
  3872 + }).collect(Collectors.toList());
3859 equipmentCapacityVo1.setList(collect); 3873 equipmentCapacityVo1.setList(collect);
3860 equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1); 3874 equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1);
3861 list.add(equipmentCapacityDto); 3875 list.add(equipmentCapacityDto);
@@ -3918,7 +3932,14 @@ public class ProjectServiceImpl implements ProjectService { @@ -3918,7 +3932,14 @@ public class ProjectServiceImpl implements ProjectService {
3918 } else { 3932 } else {
3919 equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh"); 3933 equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh");
3920 } 3934 }
3921 - List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).collect(Collectors.toList()); 3935 + List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).map(p->{
  3936 + double d = Double.parseDouble(p.getData());
  3937 + if (d >= 10000) {
  3938 + p.setData(format.apply(new BigDecimal(d / 10000)));
  3939 + p.setUnit("万kWh");
  3940 + }
  3941 + return p;
  3942 + }).collect(Collectors.toList());
3922 equipmentCapacityVo1.setList(collect); 3943 equipmentCapacityVo1.setList(collect);
3923 equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1); 3944 equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1);
3924 list.add(equipmentCapacityDto); 3945 list.add(equipmentCapacityDto);
@@ -3969,7 +3990,14 @@ public class ProjectServiceImpl implements ProjectService { @@ -3969,7 +3990,14 @@ public class ProjectServiceImpl implements ProjectService {
3969 } else { 3990 } else {
3970 equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh"); 3991 equipmentCapacityVo1.setTotal(format.apply(new BigDecimal(date)) + "kWh");
3971 } 3992 }
3972 - List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).collect(Collectors.toList()); 3993 + List<EquipmentCapacityDto> collect = list2.stream().filter(item -> !item.getData().equals("0.00")).map(p->{
  3994 + double d = Double.parseDouble(p.getData());
  3995 + if (d >= 10000) {
  3996 + p.setData(format.apply(new BigDecimal(d / 10000)));
  3997 + p.setUnit("万kWh");
  3998 + }
  3999 + return p;
  4000 + }).collect(Collectors.toList());
3973 equipmentCapacityVo1.setList(collect); 4001 equipmentCapacityVo1.setList(collect);
3974 equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1); 4002 equipmentCapacityDto.setEquipmentCapacityDto2(equipmentCapacityVo1);
3975 list.add(equipmentCapacityDto); 4003 list.add(equipmentCapacityDto);
@@ -3984,6 +4012,14 @@ public class ProjectServiceImpl implements ProjectService { @@ -3984,6 +4012,14 @@ public class ProjectServiceImpl implements ProjectService {
3984 } else { 4012 } else {
3985 equipmentCapacityVo.setTotal(format.apply(new BigDecimal(date)) + "kWh"); 4013 equipmentCapacityVo.setTotal(format.apply(new BigDecimal(date)) + "kWh");
3986 } 4014 }
  4015 + list.stream().filter(item -> !item.getData().equals("0.00")).map(equipmentCapacityDto -> {
  4016 + double d = Double.parseDouble(equipmentCapacityDto.getData());
  4017 + if (d >= 10000) {
  4018 + equipmentCapacityDto.setData(format.apply(new BigDecimal(d / 10000)));
  4019 + equipmentCapacityDto.setUnit("万kWh");
  4020 + }
  4021 + return equipmentCapacityDto;
  4022 + }).collect(Collectors.toList());
3987 equipmentCapacityVo.setList(list); 4023 equipmentCapacityVo.setList(list);
3988 return equipmentCapacityVo; 4024 return equipmentCapacityVo;
3989 } 4025 }