| @@ -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); | |||
| } | |||
| //###################################### 老代码 ###################################### | |||
| // | |||
| @@ -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 ""; | |||
| } | |||
| } | |||
| @@ -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,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); | |||
| } | |||
| @@ -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); | |||
| } | |||
| @@ -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); | |||
| } | |||
| @@ -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); | |||
| } | |||
| @@ -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); | |||
| } | |||
| @@ -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); | |||
| } | |||
| @@ -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); | |||
| } | |||
| @@ -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); | |||
| } | |||
| @@ -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); | |||
| } | |||
| @@ -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); | |||
| } | |||
| @@ -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); | |||
| } | |||
| } | |||
| } | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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); | |||
| } | |||
| } | |||
| @@ -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` >= #{startDate} | |||
| </if> | |||
| <if test=" null != endDate"> | |||
| and `createtime` <= #{endDate} | |||
| </if> | |||
| group by bill_type | |||
| </select> | |||
| </mapper> | |||
| @@ -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` > 0 and status not in (3,6) )</if> | |||
| <if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` > 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') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} | |||
| </if> | |||
| <if test=" null == nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6)) | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||
| </if> | |||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6)) | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{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` > 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` > 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=")"> | |||
| @@ -77,12 +77,12 @@ | |||
| and date_format(starttime,'%Y-%m') <= #{month} and date_format(endtime,'%Y-%m') >= #{month} | |||
| </if> | |||
| <if test=" null == nearBillLastTime and null != oweBillLastTime"> | |||
| and (`starttime` <= #{oweBillLastTime} and `receive_pay` - `pay` > 0 and status not in (3,6)) | |||
| and (`starttime` <= #{oweBillLastTime} and `receive_pay` - `pay` > 0 and status not in (3,6,7)) | |||
| </if> | |||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | |||
| and (`starttime` > #{oweBillLastTime} and `starttime` <= #{nearBillLastTime} and status not in (3,6)) | |||
| and (`starttime` > #{oweBillLastTime} and `starttime` <= #{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` > 0 and status not in (3,6) )</if> | |||
| <if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` > 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') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} | |||
| </if> | |||
| <if test=" null == nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6)) | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||
| </if> | |||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6)) | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{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` > 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` > 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=")"> | |||
| @@ -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` > 0 and status not in (3,6) )</if> | |||
| <if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` > 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') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} | |||
| </if> | |||
| <if test=" null == nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6)) | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||
| </if> | |||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6)) | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{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` > 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` > 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=")"> | |||
| @@ -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` > 0 and status not in (3,6) )</if> | |||
| <if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` > 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') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} | |||
| </if> | |||
| <if test=" null == nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6)) | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||
| </if> | |||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6)) | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{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` > 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` > 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=")"> | |||
| @@ -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` > 0 and status not in (3,6) )</if> | |||
| <if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` > 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') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} | |||
| </if> | |||
| <if test=" null == nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6)) | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||
| </if> | |||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6)) | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{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` > 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` > 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=")"> | |||
| @@ -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` > 0 and status not in (3,6) )</if> | |||
| <if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` > 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') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} | |||
| </if> | |||
| <if test=" null == nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6)) | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||
| </if> | |||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6)) | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{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` > 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` > 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=")"> | |||
| @@ -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` > 0 and status not in (3,6) )</if> | |||
| <if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` > 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') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} | |||
| </if> | |||
| <if test=" null == nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6)) | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||
| </if> | |||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6)) | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{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` > 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` > 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=")"> | |||
| @@ -102,7 +102,7 @@ | |||
| <if test=" null != endtimeEnd"> | |||
| and endtime < #{endtimeEnd} | |||
| </if> | |||
| <if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` > 0 and status not in (3,6) )</if> | |||
| <if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` > 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') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} | |||
| </if> | |||
| <if test=" null == nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6)) | |||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||
| </if> | |||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6)) | |||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{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` > 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` > 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=")"> | |||