Просмотр исходного кода

[催缴单][修改][联系人]

release_toaliyun_real
gongbiao 6 лет назад
Родитель
Сommit
dd2e710535
2 измененных файлов: 11 добавлений и 10 удалений
  1. +9
    -9
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  2. +2
    -1
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

+ 9
- 9
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java Просмотреть файл

@@ -664,30 +664,30 @@ public class WxBillAllServiceImpl implements WxBillAllService {
List<WxBillAllVo> list = wxBillAllMapper.list(wxBillAll);
if (!list.isEmpty()) {
//租金总额
Long rentSum = list.parallelStream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.RENT.getCode()))
Long rentSum = list.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.RENT.getCode()))
.collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() : b.getOwe()));
//物业总额
Long propertySum = list.parallelStream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.PROPERTY.getCode()))
.collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() : b.getOwe()));
//押金总额
Long depositSum = list.parallelStream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.RENT_DEPOSIT.getCode()) ||
Long depositSum = list.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.RENT_DEPOSIT.getCode()) ||
b.getBillTypeValue().equals(EnumBillTypeParam.PROPERTY_DEPOSIT.getCode()) || b.getBillTypeValue().equals(EnumBillTypeParam.ATHER_DEPOSIT.getCode()))
.collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() : b.getOwe()));
//水费
Long waterSum = list.parallelStream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.WATER.getCode()))
Long waterSum = list.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.WATER.getCode()))
.collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() : b.getOwe()));
//电费
Long powerSum = list.parallelStream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.POWER.getCode()))
Long powerSum = list.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.POWER.getCode()))
.collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() : b.getOwe()));
//空调费
Long airConditioningSum = list.parallelStream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.AIR_CONDITIONING.getCode()))
Long airConditioningSum = list.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.AIR_CONDITIONING.getCode()))
.collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() : b.getOwe()));
//其他费用
Long otherSum = list.parallelStream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.ROUTINE.getCode()))
Long otherSum = list.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.ROUTINE.getCode()))
.collect(Collectors.summingLong(b -> status == null && filterHasPay == null ? b.getReceivePay() : b.getOwe()));
//押金明细
StringBuffer depositDetail = new StringBuffer();
list.parallelStream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.RENT_DEPOSIT.getCode()) ||
list.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.RENT_DEPOSIT.getCode()) ||
b.getBillTypeValue().equals(EnumBillTypeParam.PROPERTY_DEPOSIT.getCode()) || b.getBillTypeValue().equals(EnumBillTypeParam.ATHER_DEPOSIT.getCode()))
.forEach(b -> {
BigDecimal owe = new BigDecimal(status == null && filterHasPay == null ? b.getReceivePay() : b.getOwe()).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN);
@@ -696,7 +696,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {

//其他费用明细
StringBuffer otherDetail = new StringBuffer();
list.parallelStream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.ROUTINE.getCode()))
list.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.ROUTINE.getCode()))
.forEach(b -> {
BigDecimal owe = new BigDecimal(status == null && filterHasPay == null ? b.getReceivePay() : b.getOwe()).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN);
otherDetail.append(b.getName()).append(":[").append(owe.toPlainString()).append("] ");
@@ -731,7 +731,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
List<WxMerchantVo> listCVo = wxMerchantMapper.findListCVo(wxMerchantVo);
wxMerchantVo = listCVo.get(0);
result.put("merchant", wxMerchantVo.getMerchantName());
WxShopVo wxShopVo = wxMerchantVo.getShopVoList().parallelStream().filter(s -> StringUtils.isNotEmpty(s.getLinkPhone())).findAny().orElse(null);
WxShopVo wxShopVo = wxMerchantVo.getShopVoList().stream().filter(s -> StringUtils.isNotEmpty(s.getLinkPerson())).findFirst().orElse(null);
if (wxShopVo != null) {
String linkPerson = wxShopVo.getLinkPerson();
String linkPhone = wxShopVo.getLinkPhone();


+ 2
- 1
mallinkService/src/main/resources/mapper/WxShopMapper.xml Просмотреть файл

@@ -529,6 +529,7 @@
<result column="floor_name" jdbcType="VARCHAR" property="floorName"/>
<result column="baidu_poi" jdbcType="VARCHAR" property="baiduPoi"/>
<result column="manager_phone" jdbcType="VARCHAR" property="linkPhone"/>
<result column="manager" jdbcType="VARCHAR" property="linkPerson"/>
</resultMap>


@@ -538,7 +539,7 @@
</resultMap>
<select id="findShopVoList" parameterType="java.util.Map" resultMap="ShopVoResultMap">
select s.id,s.shop_number,b.building_name,f.floor_name,s.addr,s.baidu_poi,s.manager_phone
select s.id,s.shop_number,b.building_name,f.floor_name,s.addr,s.baidu_poi,s.manager_phone,s.manager
from wx_shop s left join wx_merchant_shop ms on ms.shop_id=s.id
left join wx_merchant m on ms.merchant_id=m.id
left join wx_mall_building b on s.building=b.id


Загрузка…
Отмена
Сохранить