winter 1 год назад
Родитель
Сommit
1c7833e12c
32 измененных файлов: 275 добавлений и 37 удалений
  1. +34
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java
  2. +32
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxBillBad.java
  3. +4
    -1
      mallinkService/src/main/java/com/iformall/enums/EnumBillAction.java
  4. +3
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillActionMapper.java
  5. +3
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillActionService.java
  6. +1
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillDailyService.java
  7. +1
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillDepositService.java
  8. +1
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillOtherDepositService.java
  9. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillOtherService.java
  10. +1
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillPropertyDepositService.java
  11. +1
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillPropertyService.java
  12. +1
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillRentManageService.java
  13. +1
    -1
      mallinkService/src/main/java/com/iformall/service/WxBillRentService.java
  14. +22
    -0
      mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java
  15. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillActionServiceImpl.java
  16. +14
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java
  17. +14
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java
  18. +14
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java
  19. +14
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java
  20. +14
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java
  21. +14
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java
  22. +14
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillRentManageServiceImpl.java
  23. +14
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java
  24. +16
    -0
      mallinkService/src/main/resources/mapper/WxBillActionMapper.xml
  25. +4
    -4
      mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml
  26. +6
    -6
      mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml
  27. +4
    -4
      mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml
  28. +4
    -4
      mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml
  29. +4
    -4
      mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml
  30. +4
    -4
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
  31. +4
    -4
      mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml
  32. +4
    -4
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml

+ 34
- 1
mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java Просмотреть файл

@@ -16,6 +16,7 @@ import com.iformall.domain.po.WxMerchant;
import com.iformall.domain.po.WxUserDataRule;
import com.iformall.domain.po.base.WxBillBaseEntity;
import com.iformall.domain.vo.WxBillAll;
import com.iformall.domain.vo.WxBillBad;
import com.iformall.domain.vo.WxBillExcelTemplate;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillJianMian;
@@ -617,11 +618,43 @@ public class WxBillAllController extends BillBaseController {
if (dto.getBillTypeValue().intValue() == Constant.bill_all_type_manage_fee) {
dto.setBillTypeValue(EnumBillAllType.RENT_BUSSINESS_MANAGE.getCode());
}
billAllHelper.returnDeposit(dto, getUser());
billAllHelper.bad(dto, getUser());
return new ResultData();
//return wxBillAllService.updateReceivePay(wxBillAll, getUser(),false);
}
//坏账统计
@GetMapping("badtj")
public ResultData badtj(@ModelAttribute WxBillAction wxBillAction) {
wxBillAction.updateTenantInfo(getTenantInfo());
List<WxBillBad> jList = wxBillActionService.findBad(wxBillAction);
Map<Integer,String> map = new HashMap<Integer,String>();
if (null != jList && jList.size() > 0 ) {
for (int i = 0 ; i < jList.size() ; i++) {
WxBillBad jm = jList.get(i);
map.put(jm.getBillType(), jm.getTotal());
}
}
Map retMap = new HashMap();
BigDecimal total = new BigDecimal("0.00");
List<WxBillBad> retList = new ArrayList<WxBillBad>();
for (EnumBillAllType at : EnumBillAllType.values()) {
String money = map.get(at.getCode());
if (StringUtils.isBlank(money)) {
money = "0.00";
}
WxBillBad bjm = new WxBillBad();
bjm.setBillType(at.getCode());
bjm.setTotal(money);
retList.add(bjm);
total = total.add(new BigDecimal(money));
}
retMap.put("total", total.toPlainString());
retMap.put("list", retList);
return new ResultData(retMap);
}
//###################################### 老代码 ######################################
//


+ 32
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxBillBad.java Просмотреть файл

@@ -0,0 +1,32 @@
package com.iformall.domain.vo;

import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Date;

import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
import com.baomidou.mybatisplus.annotation.TableField;
import com.iformall.enums.EnumBillAllType;

@Data
public class WxBillBad implements Serializable {

private static final long serialVersionUID = 1L;

//账单类型
private Integer billType;
@TableField(exist = false)
private String billTypeName;
//减免总金额
private String total = "0";
public String getBillTypeName() {
if (null != billType) {
return EnumBillAllType.getEnum(billType).getMessage();
}
return "";
}
}

+ 4
- 1
mallinkService/src/main/java/com/iformall/enums/EnumBillAction.java Просмотреть файл

@@ -13,7 +13,8 @@ public enum EnumBillAction {
//IMPORT_PAY(10, "导入缴费"),
UPDATE_LATE_PAY_MONEY(7, "滞纳金变更"),
UPDATE_SERVICE_MONEY(9, "手续费变更"),
NOTIFY(10,"催缴");
NOTIFY(10,"催缴"),
BAD(11,"坏账");

public static EnumBillAction getEnum(Integer code) {
for (EnumBillAction value : values()) {
@@ -66,6 +67,8 @@ public enum EnumBillAction {
sb.append("应付金额").append(oldMoney).append("元变更成").append(newMoney).append("元");
}else if (code.intValue() == NOTIFY.code.intValue()) {
sb.append("在线催缴通知");
}else if (code.intValue() == BAD.code.intValue()){
sb.append("欠缴金额").append(oldMoney).append("元");
}else {
sb.append("应付金额").append(oldMoney).append("元变更成").append(newMoney).append("元");
}


+ 3
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillActionMapper.java Просмотреть файл

@@ -3,6 +3,7 @@ package com.iformall.mapper;
import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxBillAction;
import com.iformall.domain.po.WxShop;
import com.iformall.domain.vo.WxBillBad;
import com.iformall.domain.vo.WxBillJianMian;

import java.util.List;
@@ -17,4 +18,6 @@ public interface WxBillActionMapper extends CommonMapper<WxBillAction, Long> {
List<WxBillAction> findBillActionList(WxBillAction wxBillAction);
List<WxBillJianMian> findJianMian(WxBillAction record);
List<WxBillBad> findBad(WxBillAction record);
}

+ 3
- 0
mallinkService/src/main/java/com/iformall/service/WxBillActionService.java Просмотреть файл

@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.WxBillAction;
import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.vo.WxBillBad;
import com.iformall.domain.vo.WxBillJianMian;

import java.util.List;
@@ -24,4 +25,6 @@ public interface WxBillActionService {
List<WxBillAction> find(WxBillAction record);
List<WxBillJianMian> findJianMian(WxBillAction record);
List<WxBillBad> findBad(WxBillAction record);
}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/WxBillDailyService.java Просмотреть файл

@@ -80,5 +80,6 @@ public interface WxBillDailyService {
public void notify(WxBillPayDTO dto, MallUserInfo user);
public void updatePay(WxBillPayDTO dto, MallUserInfo user);
public void updatePayByMerchant(WxBillPayDTO dto, WxMerchantBUser user,boolean isOnline);
public void bad(WxBillPayDTO dto,MallUserInfo user);

}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/WxBillDepositService.java Просмотреть файл

@@ -83,5 +83,6 @@ public interface WxBillDepositService {
public void updatePay(WxBillPayDTO dto, MallUserInfo user);
public void updatePayByMerchant(WxBillPayDTO dto, WxMerchantBUser user,boolean isOnline);
public void returnDeposit(WxBillPayDTO dto, MallUserInfo user);
public void bad(WxBillPayDTO dto,MallUserInfo user);

}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/WxBillOtherDepositService.java Просмотреть файл

@@ -80,4 +80,5 @@ public interface WxBillOtherDepositService {
public void updatePay(WxBillPayDTO dto, MallUserInfo user);
public void updatePayByMerchant(WxBillPayDTO dto, WxMerchantBUser user,boolean isOnline);
public void returnDeposit(WxBillPayDTO dto, MallUserInfo user);
public void bad(WxBillPayDTO dto,MallUserInfo user);
}

+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxBillOtherService.java Просмотреть файл

@@ -75,4 +75,6 @@ public interface WxBillOtherService {
public void notify(WxBillPayDTO dto, MallUserInfo user);
public void updatePay(WxBillPayDTO dto, MallUserInfo user);
public void updatePayByMerchant(WxBillPayDTO dto, WxMerchantBUser user ,boolean isOnline);
public void bad(WxBillPayDTO dto,MallUserInfo user);
}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/WxBillPropertyDepositService.java Просмотреть файл

@@ -85,4 +85,5 @@ public interface WxBillPropertyDepositService {
public void updatePay(WxBillPayDTO dto, MallUserInfo user);
public void updatePayByMerchant(WxBillPayDTO dto, WxMerchantBUser user,boolean isOnline);
public void returnDeposit(WxBillPayDTO dto, MallUserInfo user);
public void bad(WxBillPayDTO dto,MallUserInfo user);
}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/WxBillPropertyService.java Просмотреть файл

@@ -90,4 +90,5 @@ public interface WxBillPropertyService {
public void notify(WxBillPayDTO dto, MallUserInfo user);
public void updatePay(WxBillPayDTO dto, MallUserInfo user);
public void updatePayByMerchant(WxBillPayDTO dto, WxMerchantBUser user,boolean isOnline);
public void bad(WxBillPayDTO dto,MallUserInfo user);
}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/WxBillRentManageService.java Просмотреть файл

@@ -90,4 +90,5 @@ public interface WxBillRentManageService {
public void notify(WxBillPayDTO dto, MallUserInfo user);
public void updatePay(WxBillPayDTO dto, MallUserInfo user);
public void updatePayByMerchant(WxBillPayDTO dto, WxMerchantBUser user,boolean isOnline);
public void bad(WxBillPayDTO dto,MallUserInfo user);
}

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

@@ -91,6 +91,6 @@ public interface WxBillRentService {
void notify(WxBillPayDTO dto,MallUserInfo user);
void updatePay(WxBillPayDTO dto,MallUserInfo user);
void updatePayByMerchant(WxBillPayDTO dto,WxMerchantBUser user,boolean isOnline);
void bad(WxBillPayDTO dto,MallUserInfo user);
}

+ 22
- 0
mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java Просмотреть файл

@@ -927,4 +927,26 @@ public class WxBillAllHelper {
wxBillOtherDepositService.returnDeposit(dto, user);
}
}
public void bad(WxBillPayDTO dto,MallUserInfo user) {
if (dto.getBillTypeValue().intValue() == EnumBillAllType.RENT.getCode().intValue()) {
wxBillRentService.bad(dto, user);
}else if (dto.getBillTypeValue().intValue() == EnumBillAllType.RENT_BUSSINESS_MANAGE.getCode().intValue()) {
wxBillRentManageService.bad(dto, user);
}else if (dto.getBillTypeValue().intValue() == EnumBillAllType.RENT_OPERATION_MANAGE.getCode().intValue()) {
wxBillRentManageService.bad(dto, user);
}else if (dto.getBillTypeValue().intValue() == EnumBillAllType.RENT_DEPOSIT.getCode().intValue()) {
wxBillRentDepositService.bad(dto, user);
}else if (dto.getBillTypeValue().intValue() == EnumBillAllType.PROPERTY.getCode().intValue()) {
wxBillPropertyService.bad(dto, user);
}else if (dto.getBillTypeValue().intValue() == EnumBillAllType.PROPERTY_DEPOSIT.getCode().intValue()) {
wxBillPropertyDepositService.bad(dto, user);
}else if (dto.getBillTypeValue().intValue() == EnumBillAllType.DAILY.getCode().intValue()) {
wxBillDailyService.bad(dto, user);
}else if (dto.getBillTypeValue().intValue() == EnumBillAllType.OTHER.getCode().intValue()) {
wxBillOtherService.bad(dto, user);
}else if (dto.getBillTypeValue().intValue() == EnumBillAllType.OTHER_DEPOSIT.getCode().intValue()) {
wxBillOtherDepositService.bad(dto, user);
}
}
}

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

@@ -7,6 +7,7 @@ import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.WxBillAction;
import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillBad;
import com.iformall.domain.vo.WxBillJianMian;
import com.iformall.mapper.WxBillActionMapper;
import com.iformall.service.WxBillActionService;
@@ -89,4 +90,9 @@ public class WxBillActionServiceImpl implements WxBillActionService {
return wxBillActionMapper.findJianMian(record);
}

@Override
public List<WxBillBad> findBad(WxBillAction record) {
return wxBillActionMapper.findBad(record);
}

}

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

@@ -598,5 +598,19 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD
this.addBillAction(action, dto.getBillTypeValue(),dto.getId(),
dto.getAddpay(), dto.getAddpay(),wxBillRent.getPayDate(),dto.getPayWay(),dto.getRemark(), user);
}
@Override
public void bad(WxBillPayDTO dto, MallUserInfo user) {
WxBillDaily dbBill = wxBillDailyMapper.selectById(dto.getId(),dto.getTenantId());
WxBillDaily wxBillRent = new WxBillDaily();
wxBillRent.setId(dto.getId());
wxBillRent.updateTenantInfo(dto);
wxBillRent.setUpdatetime(new Date());
wxBillRent.setStatus(EnumBillStatus.BAD.getCode());
wxBillDailyMapper.updateById(wxBillRent);
String badMoney = dbBill.getOwe();
this.addBillAction(EnumBillAction.BAD, dto.getBillTypeValue(),dto.getId(),
badMoney, badMoney,null,null,dto.getRemark(), user);
}

}

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

@@ -553,5 +553,19 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil
this.addBillAction(EnumBillAction.DEPOSIT_RETURN, dto.getBillTypeValue(),dto.getId(),
dto.getAddpay(), dto.getAddpay(),wxBillRent.getPayDate(),dto.getPayWay(),dto.getRemark(), user);
}
@Override
public void bad(WxBillPayDTO dto, MallUserInfo user) {
WxBillDeposit dbBill = wxBillDepositMapper.selectById(dto.getId(),dto.getTenantId());
WxBillDeposit wxBillRent = new WxBillDeposit();
wxBillRent.setId(dto.getId());
wxBillRent.updateTenantInfo(dto);
wxBillRent.setUpdatetime(new Date());
wxBillRent.setStatus(EnumBillStatus.BAD.getCode());
wxBillDepositMapper.updateById(wxBillRent);
String badMoney = dbBill.getOwe();
this.addBillAction(EnumBillAction.BAD, dto.getBillTypeValue(),dto.getId(),
badMoney, badMoney,null,null,dto.getRemark(), user);
}

}

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

@@ -556,5 +556,19 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements
this.addBillAction(EnumBillAction.DEPOSIT_RETURN, dto.getBillTypeValue(),dto.getId(),
dto.getAddpay(), dto.getAddpay(),wxBillRent.getPayDate(),dto.getPayWay(),dto.getRemark(), user);
}
@Override
public void bad(WxBillPayDTO dto, MallUserInfo user) {
WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectById(dto.getId(),dto.getTenantId());
WxBillOtherDeposit wxBillRent = new WxBillOtherDeposit();
wxBillRent.setId(dto.getId());
wxBillRent.updateTenantInfo(dto);
wxBillRent.setUpdatetime(new Date());
wxBillRent.setStatus(EnumBillStatus.BAD.getCode());
wxBillOtherDepositMapper.updateById(wxBillRent);
String badMoney = dbBill.getOwe();
this.addBillAction(EnumBillAction.BAD, dto.getBillTypeValue(),dto.getId(),
badMoney, badMoney,null,null,dto.getRemark(), user);
}

}

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

@@ -482,4 +482,18 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO
this.addBillAction(action, dto.getBillTypeValue(),dto.getId(),
dto.getAddpay(), dto.getAddpay(),wxBillRent.getPayDate(),dto.getPayWay(),dto.getRemark(), user);
}
@Override
public void bad(WxBillPayDTO dto, MallUserInfo user) {
WxBillOther dbBill = wxBillOtherMapper.selectById(dto.getId(),dto.getTenantId());
WxBillOther wxBillRent = new WxBillOther();
wxBillRent.setId(dto.getId());
wxBillRent.updateTenantInfo(dto);
wxBillRent.setUpdatetime(new Date());
wxBillRent.setStatus(EnumBillStatus.BAD.getCode());
wxBillOtherMapper.updateById(wxBillRent);
String badMoney = dbBill.getOwe();
this.addBillAction(EnumBillAction.BAD, dto.getBillTypeValue(),dto.getId(),
badMoney, badMoney,null,null,dto.getRemark(), user);
}
}

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

@@ -532,6 +532,20 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen
this.addBillAction(EnumBillAction.DEPOSIT_RETURN, dto.getBillTypeValue(),dto.getId(),
dto.getAddpay(), dto.getAddpay(),wxBillRent.getPayDate(),dto.getPayWay(),dto.getRemark(), user);
}
@Override
public void bad(WxBillPayDTO dto, MallUserInfo user) {
WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectById(dto.getId(),dto.getTenantId());
WxBillPropertyDeposit wxBillRent = new WxBillPropertyDeposit();
wxBillRent.setId(dto.getId());
wxBillRent.updateTenantInfo(dto);
wxBillRent.setUpdatetime(new Date());
wxBillRent.setStatus(EnumBillStatus.BAD.getCode());
wxBillPropertyDepositMapper.updateById(wxBillRent);
String badMoney = dbBill.getOwe();
this.addBillAction(EnumBillAction.BAD, dto.getBillTypeValue(),dto.getId(),
badMoney, badMoney,null,null,dto.getRemark(), user);
}


}

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

@@ -623,4 +623,18 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi
this.addBillAction(action, dto.getBillTypeValue(),dto.getId(),
dto.getAddpay(), dto.getAddpay(),wxBillRent.getPayDate(),dto.getPayWay(),dto.getRemark(), user);
}
@Override
public void bad(WxBillPayDTO dto, MallUserInfo user) {
WxBillProperty dbBill = wxBillPropertyMapper.selectById(dto.getId(),dto.getTenantId());
WxBillProperty wxBillRent = new WxBillProperty();
wxBillRent.setId(dto.getId());
wxBillRent.updateTenantInfo(dto);
wxBillRent.setUpdatetime(new Date());
wxBillRent.setStatus(EnumBillStatus.BAD.getCode());
wxBillPropertyMapper.updateById(wxBillRent);
String badMoney = dbBill.getOwe();
this.addBillAction(EnumBillAction.BAD, dto.getBillTypeValue(),dto.getId(),
badMoney, badMoney,null,null,dto.getRemark(), user);
}
}

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

@@ -553,5 +553,19 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W
this.addBillAction(action, dto.getBillTypeValue(),dto.getId(),
dto.getAddpay(), dto.getAddpay(),wxBillRent.getPayDate(),dto.getPayWay(),dto.getRemark(), user);
}
@Override
public void bad(WxBillPayDTO dto, MallUserInfo user) {
WxBillRentManage dbBill = wxBillRentManageMapper.selectById(dto.getId(),dto.getTenantId());
WxBillRentManage wxBillRent = new WxBillRentManage();
wxBillRent.setId(dto.getId());
wxBillRent.updateTenantInfo(dto);
wxBillRent.setUpdatetime(new Date());
wxBillRent.setStatus(EnumBillStatus.BAD.getCode());
wxBillRentManageMapper.updateById(wxBillRent);
String badMoney = dbBill.getOwe();
this.addBillAction(EnumBillAction.BAD, dto.getBillTypeValue(),dto.getId(),
badMoney, badMoney,null,null,dto.getRemark(), user);
}

}

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

@@ -717,4 +717,18 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe
this.addBillAction(action, dto.getBillTypeValue(),dto.getId(),
dto.getAddpay(), dto.getAddpay(),wxBillRent.getPayDate(),dto.getPayWay(),dto.getRemark(), user);
}

@Override
public void bad(WxBillPayDTO dto, MallUserInfo user) {
WxBillRent dbBill = wxBillRentMapper.selectById(dto.getId(),dto.getTenantId());
WxBillRent wxBillRent = new WxBillRent();
wxBillRent.setId(dto.getId());
wxBillRent.updateTenantInfo(dto);
wxBillRent.setUpdatetime(new Date());
wxBillRent.setStatus(EnumBillStatus.BAD.getCode());
wxBillRentMapper.updateById(wxBillRent);
String badMoney = dbBill.getOwe();
this.addBillAction(EnumBillAction.BAD, dto.getBillTypeValue(),dto.getId(),
badMoney, badMoney,null,null,dto.getRemark(), user);
}
}

+ 16
- 0
mallinkService/src/main/resources/mapper/WxBillActionMapper.xml Просмотреть файл

@@ -100,5 +100,21 @@
</if>
group by bill_type
</select>
<resultMap id="BadResultMap" type="com.iformall.domain.vo.WxBillBad">
<result column="bill_type" jdbcType="INTEGER" property="billType"/>
<result column="total" jdbcType="VARCHAR" property="total"/>
</resultMap>
<select id="findBad" parameterType="com.iformall.domain.po.WxBillAction" resultMap="BadResultMap">
select bill_type,sum(CAST(old_money AS DECIMAL(20,2))) total
from wx_bill_action where action = 7
<if test=" null != startDate">
and `createtime` &gt;= #{startDate}
</if>
<if test=" null != endDate">
and `createtime` &lt;= #{endDate}
</if>
group by bill_type
</select>

</mapper>

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

@@ -67,7 +67,7 @@
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>
<if test=" null != buildWay ">and `build_way` = #{buildWay}</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -116,13 +116,13 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6,7))
</if>
<if test=" null != buildWay ">and br.`build_way` = #{buildWay}</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">


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

@@ -77,12 +77,12 @@
and date_format(starttime,'%Y-%m') &lt;= #{month} and date_format(endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (`starttime` &lt;= #{oweBillLastTime} and `receive_pay` - `pay` &gt; 0 and status not in (3,6))
and (`starttime` &lt;= #{oweBillLastTime} and `receive_pay` - `pay` &gt; 0 and status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (`starttime` &gt; #{oweBillLastTime} and `starttime` &lt;= #{nearBillLastTime} and status not in (3,6))
and (`starttime` &gt; #{oweBillLastTime} and `starttime` &lt;= #{nearBillLastTime} and status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and `merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -154,12 +154,12 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">


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

@@ -69,7 +69,7 @@
<if test=" null != name ">and `name` = #{name}</if>
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -121,12 +121,12 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">


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

@@ -67,7 +67,7 @@
<if test=" null != name "> and `name` = #{name} </if>
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -114,12 +114,12 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">


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

@@ -68,7 +68,7 @@
<if test=" null != updatetime ">and `updatetime` = #{updatetime}</if>
<if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != propertyContractIdList ">
and property_contract_id in
<foreach collection="propertyContractIdList" index="index" item="pidItem" open="(" separator="," close=")">
@@ -121,12 +121,12 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">


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

@@ -84,7 +84,7 @@
<if test=" null != isPreview ">and is_preview = #{isPreview}</if>
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>
<if test=" null != latePayStatus ">and `late_pay_status` = #{latePayStatus}</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != propertyContractIds ">
and property_contract_id in
<foreach collection="propertyContractIds" index="index" item="pidItem" open="(" separator="," close=")">
@@ -140,17 +140,17 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6,7))
</if>
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != propertyContractId ">and br.`property_contract_id` = #{propertyContractId}</if>
<if test=" null != payWay ">and br.`pay_way` = #{payWay}</if>
<if test=" null != latePayStatus ">and br.`late_pay_status` = #{latePayStatus}</if>
<if test=" null != latePayStatus ">and br.`late_pay_status` = #{latePayStatus}</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != propertyContractIds ">
and br.property_contract_id in
<foreach collection="propertyContractIds" index="index" item="pidItem" open="(" separator="," close=")">


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

@@ -75,7 +75,7 @@
<if test=" null != payWay ">and `pay_way` = #{payWay}</if>
<if test=" null != latePayStatus ">and `late_pay_status` = #{latePayStatus}</if>
<if test=" null != manageFeeType ">and `manage_fee_type` = #{manageFeeType}</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and merchant_id in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -128,14 +128,14 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6,7))
</if>
<if test=" null != manageFeeType ">and br.`manage_fee_type` = #{manageFeeType}</if>
<if test=" null != hasMerchant ">and br.`merchant_id` is not null</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.merchant_id in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">


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

@@ -102,7 +102,7 @@
<if test=" null != endtimeEnd">
and endtime &lt; #{endtimeEnd}
</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -147,12 +147,12 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != rentContractIdList ">
and br.`rent_contract_id` in
<foreach collection="rentContractIdList" index="index" item="ridItem" open="(" separator="," close=")">


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