Browse Source

fix

release_toaliyun_real
winter 1 year ago
parent
commit
834adb270c
44 changed files with 646 additions and 204 deletions
  1. +141
    -147
      mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java
  2. +13
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java
  3. +10
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java
  4. +13
    -2
      mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java
  5. +12
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java
  6. +10
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java
  7. +10
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java
  8. +10
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java
  9. +15
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java
  10. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/base/WxBillBaseEntity.java
  11. +26
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxBillNotify.java
  12. +3
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillDailyMapper.java
  13. +3
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillDepositMapper.java
  14. +3
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillOtherDepositMapper.java
  15. +3
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillOtherMapper.java
  16. +3
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyDepositMapper.java
  17. +3
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java
  18. +3
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillRentManageMapper.java
  19. +3
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillRentMapper.java
  20. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillDailyService.java
  21. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillDepositService.java
  22. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillOtherDepositService.java
  23. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillOtherService.java
  24. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillPropertyDepositService.java
  25. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillPropertyService.java
  26. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillRentManageService.java
  27. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxBillRentService.java
  28. +137
    -0
      mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java
  29. +7
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java
  30. +7
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java
  31. +7
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java
  32. +7
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java
  33. +7
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java
  34. +7
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java
  35. +7
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillRentManageServiceImpl.java
  36. +7
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java
  37. +20
    -6
      mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml
  38. +19
    -4
      mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml
  39. +19
    -5
      mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml
  40. +20
    -6
      mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml
  41. +14
    -6
      mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml
  42. +19
    -6
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
  43. +19
    -8
      mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml
  44. +19
    -5
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml

+ 141
- 147
mallinkBApi/src/main/java/com/iformall/controller/WxBillController.java View File

@@ -64,27 +64,6 @@ public class WxBillController extends BaseController {
@Autowired
WxBillAllHelper billAllHelper;

// @ApiOperation("所有欠缴和待缴的数据")
// @PostMapping("listBillOweAndWaitPay")
// public ResultData listBillOweAndWaitPay(@RequestBody WxBillAll wxBillAll) {
//
// if(StringUtils.isEmpty(wxBillAll.getTenantId())){
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"tenantId不能为空");
// }
// if(wxBillAll.getMerchantId()==null){
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"merchantId不能为空");
// }
// WxMerchant wxMerchant = wxMerchantService.getById(wxBillAll.getMerchantId());
// if(wxMerchant==null){
// return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND);
// }
// if(wxMerchant.getStatus().equals(EnumMerchantStatus.NOT_VALID.getCode())){
// return new ResultData(ErrorCode.MERCHANT_INFO_NOT_VALID);
// }
// List<Map<String,Object>> result=wxBillAllService.listBillOweAndWaitPay(wxBillAll);
// return new ResultData(result);
// }
/**
* 账单类型
* @return
@@ -98,6 +77,22 @@ public class WxBillController extends BaseController {
return new ResultData(tmap);
}
/**
* 商户催缴账单列表
* @param wxBillAll
* @param pageNum
* @param pageSize
* @return
*/
@GetMapping("notifyList")
public ResultData notifyList(@ModelAttribute WxMerchant wxMerchant) {
wxMerchant.setId(this.getLoginBUser().getMerchantId());
return new ResultData(billAllHelper.getBillNotifyList(wxMerchant));
}
private Integer getOweBillBeforeDays() {
SysConfig config = sysConfigService.getByKey(SysConfigConstant.bill_before_days, getTenantInfo());
Integer oweBillBeforeDays = 0 ;
@@ -199,136 +194,135 @@ public class WxBillController extends BaseController {
return billAllHelper.getBillList(btype, wxMerchant,pageNum,pageSize);
}
//###### 待切换 #######################
// @ApiOperation("分类查询账单")
// @GetMapping("listBill")
// public ResultData listBill(@ModelAttribute WxMerchant wxMerchant,Integer billTypeValue, Integer pageNum, Integer pageSize) {
// if (null == billTypeValue) {
// return new ResultData(Result.ERROR,"请选择分类");
// }
// EnumBillAllType btype;
// if (billTypeValue.intValue() == Constant.bill_all_type_manage_fee) {
// btype = EnumBillAllType.RENT_BUSSINESS_MANAGE;
// }else {
// btype = EnumBillAllType.getEnum(billTypeValue);
// if (null == btype) {
// return new ResultData(Result.ERROR,"分类非法");
// }
// }
// wxMerchant.setId(this.getLoginBUser().getMerchantId());
// wxMerchant.updateTenantInfo(getTenantInfo());
// return new ResultData(billAllHelper.getBillList(btype, wxMerchant,pageNum,pageSize));
// }
@ApiOperation("分类查询账单")
@PostMapping("listBill")
public ResultData listBill(@RequestBody WxBillAll wxBillAll) {
if(StringUtils.isEmpty(wxBillAll.getTenantId())){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"tenantId不能为空");
}
if(wxBillAll.getMerchantId()==null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"merchantId不能为空");
}
if(wxBillAll.getBillTypeValue()==null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"billTypeValue不能为空");
}
WxMerchant wxMerchant = wxMerchantService.getById(wxBillAll.getMerchantId());
if(wxMerchant==null){
return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND);
}
if(wxMerchant.getStatus().equals(EnumMerchantStatus.NOT_VALID.getCode())){
return new ResultData(ErrorCode.MERCHANT_INFO_NOT_VALID);
}
if(!StringUtils.isEmpty(wxBillAll.getStarttime()) && StringUtils.isEmpty(wxBillAll.getEndtime())){
logger.info("开始时间和结束时间要同时存在或不存在");
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"starttime和endtime要同时存在或不存在");
}
if(StringUtils.isEmpty(wxBillAll.getStarttime()) && !StringUtils.isEmpty(wxBillAll.getEndtime())){
logger.info("开始时间和结束时间要同时存在或不存在");
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"starttime和endtime要同时存在或不存在");
}
return wxBillAllService.pageListBill(wxBillAll,wxMerchant,true,true,true);
}

@GetMapping("/findSettleById")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
@ApiOperation("账单管理-结算单-id查找")
public ResultData findById(Long id) {
return new ResultData(Result.SUCCESS, "查询成功", wxBillSettleService.getById(id, EnumFilterSettle.NO.getCode()));
}
@ApiOperation("完结账单")
@PostMapping("finishBill")
public ResultData finishBill(@RequestBody WxBillAll wxBillAll) {
if(!billFinishHasWorkFlow(wxBillAll)) {
return new ResultData(ErrorCode.FLOW_FAIL.getCode(),"商户账单完结审批不存在工作流,不能提交审批。");
}
WxMerchantBUser buser = getLoginBUser();
Map<String,Object> billObject = wxBillAllService.detail(wxBillAll.getId(), wxBillAll.getBillTypeValue());
if (null == billObject) {
return new ResultData(ErrorCode.FLOW_FAIL.getCode(),"查询不到记录。");
@GetMapping("listBill")
public ResultData listBill(@ModelAttribute WxMerchant wxMerchant,Integer billTypeValue, Integer pageNum, Integer pageSize) {
if (null == billTypeValue) {
return new ResultData(Result.ERROR,"请选择分类");
}
Map<String,Object> map = new HashMap<String,Object>();
map.put("businessType", EnumFlowKey.BILL_FINISH.getCode());
//map.put("payMoney", wxBillAll.getNewPrice());
map.put("businessId", wxBillAll.getId());
List<Map> variablesList = new ArrayList<Map>();
Map billTypeMap = new HashMap<String,Object>();
billTypeMap.put("key","billType");
billTypeMap.put("value",wxBillAll.getBillTypeValue());
variablesList.add(billTypeMap);
Map billUpdateTypeMap = new HashMap<String,Object>();
billUpdateTypeMap.put("key","billUpdateType");
billUpdateTypeMap.put("value",EnumBillUpdateType.OTHER.getCode());
variablesList.add(billUpdateTypeMap);
Long needPayL = (Long) billObject.get("needPay");
Integer needPay = 0;
if (null == needPayL) {
needPay = needPayL.intValue();
EnumBillAllType btype;
if (billTypeValue.intValue() == Constant.bill_all_type_manage_fee) {
btype = EnumBillAllType.RENT_BUSSINESS_MANAGE;
}else {
btype = EnumBillAllType.getEnum(billTypeValue);
if (null == btype) {
return new ResultData(Result.ERROR,"分类非法");
}
}
Map oldPriceMap = new HashMap<String,Object>();
oldPriceMap.put("key","oldPrice");
oldPriceMap.put("value",needPay);
variablesList.add(oldPriceMap);
Map newPriceMap = new HashMap<String,Object>();
newPriceMap.put("key","newPrice");
newPriceMap.put("value",needPay);
variablesList.add(newPriceMap);
Map forcePaidMap = new HashMap<String,Object>();
forcePaidMap.put("key","forcePaid");
forcePaidMap.put("value",1);
variablesList.add(forcePaidMap);
Map payImgMap = new HashMap<String,Object>();
payImgMap.put("key","payImg");
payImgMap.put("value",wxBillAll.getPayImg());
variablesList.add(payImgMap);
map.put("variables", variablesList);
map.put("phone", buser.getPhone());
wxFlowService.start(map, buser.getId(), buser.getName(), this.getTenantInfo());
return new ResultData();
wxMerchant.setId(this.getLoginBUser().getMerchantId());
wxMerchant.updateTenantInfo(getTenantInfo());
return new ResultData(billAllHelper.getBillList(btype, wxMerchant,pageNum,pageSize));
}
private boolean billFinishHasWorkFlow(WxBillAll wxBillAll) {
WxFlowModel wxFlowModel = new WxFlowModel();
wxFlowModel.setFlowType(EnumFlowKey.BILL_FINISH.getCode());
wxFlowModel.updateTenantInfo(this.getTenantInfo());
List<WxFlowModel> flows = wxFlowService.getModelBybusiness(wxFlowModel);
if (null != flows && flows.size() > 0) {
return true;
}
return false;
}
// @ApiOperation("分类查询账单")
// @PostMapping("listBill")
// public ResultData listBill(@RequestBody WxBillAll wxBillAll) {
//
// if(StringUtils.isEmpty(wxBillAll.getTenantId())){
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"tenantId不能为空");
// }
// if(wxBillAll.getMerchantId()==null){
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"merchantId不能为空");
// }
// if(wxBillAll.getBillTypeValue()==null){
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"billTypeValue不能为空");
// }
// WxMerchant wxMerchant = wxMerchantService.getById(wxBillAll.getMerchantId());
// if(wxMerchant==null){
// return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND);
// }
// if(wxMerchant.getStatus().equals(EnumMerchantStatus.NOT_VALID.getCode())){
// return new ResultData(ErrorCode.MERCHANT_INFO_NOT_VALID);
// }
// if(!StringUtils.isEmpty(wxBillAll.getStarttime()) && StringUtils.isEmpty(wxBillAll.getEndtime())){
// logger.info("开始时间和结束时间要同时存在或不存在");
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"starttime和endtime要同时存在或不存在");
// }
// if(StringUtils.isEmpty(wxBillAll.getStarttime()) && !StringUtils.isEmpty(wxBillAll.getEndtime())){
// logger.info("开始时间和结束时间要同时存在或不存在");
// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"starttime和endtime要同时存在或不存在");
// }
//
// return wxBillAllService.pageListBill(wxBillAll,wxMerchant,true,true,true);
// }

// @GetMapping("/findSettleById")
// @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
// @ApiOperation("账单管理-结算单-id查找")
// public ResultData findById(Long id) {
// return new ResultData(Result.SUCCESS, "查询成功", wxBillSettleService.getById(id, EnumFilterSettle.NO.getCode()));
// }
//
// @ApiOperation("完结账单")
// @PostMapping("finishBill")
// public ResultData finishBill(@RequestBody WxBillAll wxBillAll) {
// if(!billFinishHasWorkFlow(wxBillAll)) {
// return new ResultData(ErrorCode.FLOW_FAIL.getCode(),"商户账单完结审批不存在工作流,不能提交审批。");
// }
// WxMerchantBUser buser = getLoginBUser();
//
// Map<String,Object> billObject = wxBillAllService.detail(wxBillAll.getId(), wxBillAll.getBillTypeValue());
//
// if (null == billObject) {
// return new ResultData(ErrorCode.FLOW_FAIL.getCode(),"查询不到记录。");
// }
//
// Map<String,Object> map = new HashMap<String,Object>();
// map.put("businessType", EnumFlowKey.BILL_FINISH.getCode());
// //map.put("payMoney", wxBillAll.getNewPrice());
// map.put("businessId", wxBillAll.getId());
// List<Map> variablesList = new ArrayList<Map>();
// Map billTypeMap = new HashMap<String,Object>();
// billTypeMap.put("key","billType");
// billTypeMap.put("value",wxBillAll.getBillTypeValue());
// variablesList.add(billTypeMap);
//
// Map billUpdateTypeMap = new HashMap<String,Object>();
// billUpdateTypeMap.put("key","billUpdateType");
// billUpdateTypeMap.put("value",EnumBillUpdateType.OTHER.getCode());
// variablesList.add(billUpdateTypeMap);
//
// Long needPayL = (Long) billObject.get("needPay");
// Integer needPay = 0;
// if (null == needPayL) {
// needPay = needPayL.intValue();
// }
//
// Map oldPriceMap = new HashMap<String,Object>();
// oldPriceMap.put("key","oldPrice");
// oldPriceMap.put("value",needPay);
// variablesList.add(oldPriceMap);
//
// Map newPriceMap = new HashMap<String,Object>();
// newPriceMap.put("key","newPrice");
// newPriceMap.put("value",needPay);
// variablesList.add(newPriceMap);
//
// Map forcePaidMap = new HashMap<String,Object>();
// forcePaidMap.put("key","forcePaid");
// forcePaidMap.put("value",1);
// variablesList.add(forcePaidMap);
//
// Map payImgMap = new HashMap<String,Object>();
// payImgMap.put("key","payImg");
// payImgMap.put("value",wxBillAll.getPayImg());
// variablesList.add(payImgMap);
//
// map.put("variables", variablesList);
// map.put("phone", buser.getPhone());
// wxFlowService.start(map, buser.getId(), buser.getName(), this.getTenantInfo());
// return new ResultData();
// }
//
// private boolean billFinishHasWorkFlow(WxBillAll wxBillAll) {
// WxFlowModel wxFlowModel = new WxFlowModel();
// wxFlowModel.setFlowType(EnumFlowKey.BILL_FINISH.getCode());
// wxFlowModel.updateTenantInfo(this.getTenantInfo());
// List<WxFlowModel> flows = wxFlowService.getModelBybusiness(wxFlowModel);
// if (null != flows && flows.size() > 0) {
// return true;
// }
// return false;
// }

}

+ 13
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java View File

@@ -7,6 +7,7 @@ import com.iformall.common.SortColumn;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.base.WxBillBaseEntity;
import com.iformall.enums.EnumBillAllType;
import com.iformall.enums.EnumBillDailyType;

import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -108,9 +109,20 @@ public class WxBillDaily extends WxBillBaseEntity {
@TableField(exist = false)
private List<Long> notInIds;
//TODO billTypeName应该也这么处理,不应该到mapper.xml里面写,后面再改
@Override
public Integer getBillType() {
return EnumBillAllType.DAILY.getCode();
}
@Override
public String getBillTypeName() {
if (this.type == EnumBillDailyType.WATER.getCode()) {
return EnumBillDailyType.WATER.getMessage();
}else if (this.type == EnumBillDailyType.POWER.getCode()) {
return EnumBillDailyType.POWER.getMessage();
}else if (this.type == EnumBillDailyType.AIR_CONDITIONING.getCode()) {
return EnumBillDailyType.AIR_CONDITIONING.getMessage();
}
return EnumBillAllType.DAILY.getMessage();
}
}

+ 10
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java View File

@@ -81,9 +81,18 @@ public class WxBillDeposit extends WxBillBaseEntity {
@TableField(exist = false)
private List<Long> merchantIds;
//TODO billTypeName应该也这么处理,不应该到mapper.xml里面写,后面再改
@Override
public Integer getBillType() {
return EnumBillAllType.RENT_DEPOSIT.getCode();
}
@Override
public String getBillTypeName() {
return EnumBillAllType.RENT_DEPOSIT.getMessage();
}
@Override
public String getBillRemark() {
return "";
}
}

+ 13
- 2
mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java View File

@@ -1,10 +1,10 @@
package com.iformall.domain.po;

import cn.afterturn.easypoi.excel.annotation.Excel;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.common.SortColumn;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.base.WxBillBaseEntity;
import com.iformall.enums.EnumBillAllType;

@@ -16,6 +16,8 @@ import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

/**
* @author gongbiao
*/
@@ -109,9 +111,18 @@ public class WxBillOther extends WxBillBaseEntity {
@TableField(exist = false)
private List<Long> notInIds;
//TODO billTypeName应该也这么处理,不应该到mapper.xml里面写,后面再改
@Override
public Integer getBillType() {
return EnumBillAllType.OTHER.getCode();
}
@Override
public String getBillTypeName() {
return EnumBillAllType.OTHER.getMessage();
}
@Override
public String getBillRemark() {
return StringUtils.trimToEmpty(name)+StringUtils.trimToEmpty(comments);
}
}

+ 12
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java View File

@@ -17,6 +17,8 @@ import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;

/**
* @author gongbiao
*/
@@ -118,10 +120,19 @@ public class WxBillOtherDeposit extends WxBillBaseEntity {
@TableField(exist = false)
private List<Long> notInIds;
//TODO billTypeName应该也这么处理,不应该到mapper.xml里面写,后面再改
@Override
public Integer getBillType() {
return EnumBillAllType.OTHER_DEPOSIT.getCode();
}
@Override
public String getBillTypeName() {
return EnumBillAllType.OTHER_DEPOSIT.getMessage();
}
@Override
public String getBillRemark() {
return StringUtils.trimToEmpty(name)+StringUtils.trimToEmpty(comments);
}
}

+ 10
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java View File

@@ -145,12 +145,21 @@ public class WxBillProperty extends WxBillBaseEntity {
@TableField(exist = false)
private List<Long> merchantIds;
//TODO billTypeName应该也这么处理,不应该到mapper.xml里面写,后面再改
@Override
public Integer getBillType() {
return EnumBillAllType.PROPERTY.getCode();
}
@Override
public String getBillTypeName() {
return EnumBillAllType.PROPERTY.getMessage();
}
@Override
public String getBillRemark() {
return "";
}
@TableField(exist = false)
private String totalFee;
public void calcuteTotalFee(Integer decimalSize) {


+ 10
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java View File

@@ -94,10 +94,19 @@ public class WxBillPropertyDeposit extends WxBillBaseEntity {
return sb.toString();
}
//TODO billTypeName应该也这么处理,不应该到mapper.xml里面写,后面再改
@Override
public Integer getBillType() {
return EnumBillAllType.PROPERTY_DEPOSIT.getCode();
}
@Override
public String getBillTypeName() {
return EnumBillAllType.PROPERTY_DEPOSIT.getMessage();
}
@Override
public String getBillRemark() {
return "";
}
}

+ 10
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java View File

@@ -88,11 +88,20 @@ public class WxBillRent extends WxBillBaseEntity {
return infoStr;
}
//TODO billTypeName应该也这么处理,不应该到mapper.xml里面写,后面再改
@Override
public Integer getBillType() {
return EnumBillAllType.RENT.getCode();
}
@Override
public String getBillTypeName() {
return EnumBillAllType.RENT.getMessage();
}
@Override
public String getBillRemark() {
return "";
}

@io.swagger.annotations.ApiModelProperty(value="商业管理费应收金额",name="bussinessManageFeeNeedPay")
private String bussinessManageFeeNeedPay;


+ 15
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java View File

@@ -148,7 +148,6 @@ public class WxBillRentManage extends WxBillBaseEntity {
this.latePayRatio = billRent.getLatePayRatio();
}
//TODO billTypeName应该也这么处理,不应该到mapper.xml里面写,后面再改
@Override
public Integer getBillType() {
if (this.manageFeeType == EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode()) {
@@ -159,6 +158,21 @@ public class WxBillRentManage extends WxBillBaseEntity {
return Constant.bill_all_type_manage_fee;
}
@Override
public String getBillTypeName() {
if (this.manageFeeType == EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode()) {
return EnumBillAllType.RENT_BUSSINESS_MANAGE.getMessage();
}else if (this.manageFeeType == EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode()) {
return EnumBillAllType.RENT_OPERATION_MANAGE.getMessage();
}
return "商业&运营管理费";
}
@Override
public String getBillRemark() {
return "";
}
@TableField(exist = false)
private List<Long> merchantIds;
@TableField(exist = false)


+ 4
- 0
mallinkService/src/main/java/com/iformall/domain/po/base/WxBillBaseEntity.java View File

@@ -119,5 +119,9 @@ public class WxBillBaseEntity extends TenantEntity {
//临期计算截止时间
@TableField(exist = false)
private Date nearBillLastTime;
//临期计算截止时间
@TableField(exist = false)
private Integer notifyed;

}

+ 26
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxBillNotify.java View File

@@ -0,0 +1,26 @@
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;

@Data
public class WxBillNotify implements Serializable {

private static final long serialVersionUID = 1L;

//EnumBillAllType
private Integer billType;
private String billTypeName;
private Long billId;
private Date starttime;
private Date endtime;
private String receivePay;
private String pay;
private Long merchantId;
private String merchantName;
}

+ 3
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillDailyMapper.java View File

@@ -4,6 +4,7 @@ import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxBillDaily;
import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import java.util.List;
@@ -24,6 +25,8 @@ public interface WxBillDailyMapper extends CommonMapper<WxBillDaily, Long> {

List<WxBillDaily> queryBillDailyList(WxBillDaily record);
List<WxBillNotify> getBillNotifyList(WxBillDaily record);
WxBillSum getBillMonthSum(WxBillDaily record);
List<Long> getMerchantIdList(WxBillDaily record);


+ 3
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillDepositMapper.java View File

@@ -6,6 +6,7 @@ import com.iformall.domain.po.WxBillDeposit;
import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import java.util.List;
@@ -22,6 +23,8 @@ public interface WxBillDepositMapper extends CommonMapper<WxBillDeposit, Long> {
List<Long> findRentContractIds(WxBillDeposit wxBillDeposit);

List<WxBillDeposit> queryBillDepositList(WxBillDeposit record);
List<WxBillNotify> getBillNotifyList(WxBillDeposit record);

Map<String,Object> queryPayInfo(Map<String,Object> params);



+ 3
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillOtherDepositMapper.java View File

@@ -4,6 +4,7 @@ import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxBillOtherDeposit;
import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import java.util.List;
@@ -24,6 +25,8 @@ public interface WxBillOtherDepositMapper extends CommonMapper<WxBillOtherDeposi

List<WxBillOtherDeposit> queryBillList(WxBillOtherDeposit record);
List<WxBillNotify> getBillNotifyList(WxBillOtherDeposit record);
WxBillSum getBillMonthSum(WxBillOtherDeposit record);
List<Long> getMerchantIdList(WxBillOtherDeposit record);


+ 3
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillOtherMapper.java View File

@@ -4,6 +4,7 @@ import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxBillOther;
import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import java.util.List;
@@ -23,6 +24,8 @@ public interface WxBillOtherMapper extends CommonMapper<WxBillOther, Long> {
void updateWaitPayStatus(Map<String, Object> params);

List<WxBillOther> queryBillList(WxBillOther record);
List<WxBillNotify> getBillNotifyList(WxBillOther record);

Map<String,Object> queryPayInfoTotal(Map<String,Object> params);



+ 3
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyDepositMapper.java View File

@@ -5,6 +5,7 @@ import com.iformall.domain.po.WxBillPropertyDeposit;
import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxPropertyContract;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import java.util.List;
@@ -22,6 +23,8 @@ public interface WxBillPropertyDepositMapper extends CommonMapper<WxBillProperty
List<Long> findPropertyContractIds(WxBillPropertyDeposit wxBillPropertyDeposit);

List<WxBillPropertyDeposit> queryBillDepositList(WxBillPropertyDeposit record);
List<WxBillNotify> getBillNotifyList(WxBillPropertyDeposit record);

Map<String,Object> queryPayInfo(Map<String,Object> params);



+ 3
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java View File

@@ -7,6 +7,7 @@ import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.po.WxPropertyContract;
import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import java.util.List;
@@ -23,6 +24,8 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Long>

List<WxBillProperty> queryBillPropertyList(WxBillProperty record);
List<WxBillNotify> getBillNotifyList(WxBillProperty record);
List<Long> queryPropertyContractIdList(WxBillProperty record);

Map<String,Object> queryPayInfo(Map<String,Object> params);


+ 3
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillRentManageMapper.java View File

@@ -4,6 +4,7 @@ import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxBillRentManage;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import org.apache.ibatis.annotations.Param;
@@ -21,6 +22,8 @@ public interface WxBillRentManageMapper extends CommonMapper<WxBillRentManage, L
List<WxBillRentManage> queryBillManageList(WxBillRentManage wxBillRentManage);
List<Long> queryRentContractIds(WxBillRentManage wxBillRentManage);
List<WxBillNotify> getBillNotifyList(WxBillRentManage record);
Map<String,Object> queryPayInfoTotal(Map<String,Object> params);
void updateNotPaidStatus(Map<String,Object> params);


+ 3
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillRentMapper.java View File

@@ -5,6 +5,7 @@ import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import org.apache.ibatis.annotations.Param;
@@ -21,6 +22,8 @@ public interface WxBillRentMapper extends CommonMapper<WxBillRent, Long> {

List<WxBillRent> queryBillRentList(WxBillRent record);
List<Long> queryBillRentContractIdList(WxBillRent record);
List<WxBillNotify> getBillNotifyList(WxBillRent record);

Map<String,Object> queryPayInfo(Map<String,Object> params);



+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxBillDailyService.java View File

@@ -11,6 +11,7 @@ import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillDailyVo;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import java.util.List;
@@ -32,6 +33,7 @@ public interface WxBillDailyService {
* @return
*/
PageInfo<WxBillDaily> listAsPage(WxBillDaily record, Integer pageIndex, Integer pageSize);
List<WxBillNotify> notifyList(WxBillDaily record);

void updateBillStatus(WxBillDaily record);



+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxBillDepositService.java View File

@@ -17,6 +17,7 @@ import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

public interface WxBillDepositService {
@@ -30,6 +31,7 @@ public interface WxBillDepositService {
* @return
*/
PageInfo<WxBillDeposit> listAsPage(WxBillDeposit record, Integer pageIndex, Integer pageSize);
List<WxBillNotify> notifyList(WxBillDeposit record);

void updateBillStatus(WxBillDeposit record);



+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxBillOtherDepositService.java View File

@@ -10,6 +10,7 @@ import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import java.util.List;
@@ -31,6 +32,7 @@ public interface WxBillOtherDepositService {
* @return
*/
PageInfo<WxBillOtherDeposit> listAsPage(WxBillOtherDeposit record, Integer pageIndex, Integer pageSize);
List<WxBillNotify> notifyList(WxBillOtherDeposit record);

void updateBillStatus(WxBillOtherDeposit record);



+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxBillOtherService.java View File

@@ -10,6 +10,7 @@ import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import java.util.List;
@@ -31,6 +32,7 @@ public interface WxBillOtherService {
* @return
*/
PageInfo<WxBillOther> listAsPage(WxBillOther record, Integer pageIndex, Integer pageSize);
List<WxBillNotify> notifyList(WxBillOther record);

void updateBillStatus(WxBillOther record);



+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxBillPropertyDepositService.java View File

@@ -17,6 +17,7 @@ import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

/**
@@ -33,6 +34,7 @@ public interface WxBillPropertyDepositService {
* @return
*/
PageInfo<WxBillPropertyDeposit> listAsPage(WxBillPropertyDeposit record, Integer pageIndex, Integer pageSize);
List<WxBillNotify> notifyList(WxBillPropertyDeposit record);

void updateBillStatus(WxBillPropertyDeposit record);



+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxBillPropertyService.java View File

@@ -10,6 +10,7 @@ import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import java.util.List;
@@ -32,6 +33,7 @@ public interface WxBillPropertyService {
* @return
*/
PageInfo<WxBillProperty> listAsPage(WxBillProperty record, Integer pageIndex, Integer pageSize);
List<WxBillNotify> notifyList(WxBillProperty record);

void updateBillStatus(WxBillProperty record);



+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxBillRentManageService.java View File

@@ -11,6 +11,7 @@ import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;

import java.util.List;
@@ -30,6 +31,7 @@ public interface WxBillRentManageService {
* @return
*/
PageInfo<WxBillRentManage> listAsPage(WxBillRentManage wxBillRentManage, Integer pageIndex, Integer pageSize);
List<WxBillNotify> notifyList(WxBillRentManage wxBillRentManage);

void updateBillStatus(WxBillRentManage record);



+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxBillRentService.java View File

@@ -9,6 +9,7 @@ import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;
import com.iformall.enums.EnumBillAction;

@@ -30,6 +31,7 @@ public interface WxBillRentService {
* @return
*/
PageInfo<WxBillRent> listAsPage(WxBillRent record, Integer pageIndex, Integer pageSize);
List<WxBillNotify> notifyList(WxBillRent record);

void updateBillStatus(WxBillRent record);



+ 137
- 0
mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java View File

@@ -36,6 +36,7 @@ import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.base.WxBillBaseEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;
import com.iformall.domain.vo.WxShopVo;
import com.iformall.enums.EnumBillAction;
@@ -584,6 +585,142 @@ public class WxBillAllHelper {
return null;
}
public List<WxBillNotify> getBillNotifyList(WxMerchant wxMerchant) {
List<WxBillNotify> retList = new ArrayList<WxBillNotify>();
List<WxBillNotify> rentList = getBillNotifyList(EnumBillAllType.RENT,wxMerchant);
if (null != rentList) {
retList.addAll(rentList);
}
List<WxBillNotify> rentBussinessList = getBillNotifyList(EnumBillAllType.RENT_BUSSINESS_MANAGE,wxMerchant);
if (null != rentBussinessList) {
retList.addAll(rentBussinessList);
}
List<WxBillNotify> rentOperationList = getBillNotifyList(EnumBillAllType.RENT_OPERATION_MANAGE,wxMerchant);
if (null != rentOperationList) {
retList.addAll(rentOperationList);
}
List<WxBillNotify> rentDepositList = getBillNotifyList(EnumBillAllType.RENT_DEPOSIT,wxMerchant);
if (null != rentDepositList) {
retList.addAll(rentDepositList);
}
List<WxBillNotify> propertyList = getBillNotifyList(EnumBillAllType.PROPERTY,wxMerchant);
if (null != propertyList) {
retList.addAll(propertyList);
}
List<WxBillNotify> propertyDepositList = getBillNotifyList(EnumBillAllType.PROPERTY_DEPOSIT,wxMerchant);
if (null != propertyDepositList) {
retList.addAll(propertyDepositList);
}
List<WxBillNotify> dailyList = getBillNotifyList(EnumBillAllType.DAILY,wxMerchant);
if (null != dailyList) {
retList.addAll(dailyList);
}
List<WxBillNotify> otherList = getBillNotifyList(EnumBillAllType.OTHER,wxMerchant);
if (null != otherList) {
retList.addAll(otherList);
}
List<WxBillNotify> otherDepositList = getBillNotifyList(EnumBillAllType.OTHER_DEPOSIT,wxMerchant);
if (null != otherDepositList) {
retList.addAll(otherDepositList);
}
if (retList.size() > 0 ) {
//单个商户的就不查了
if (null == wxMerchant.getId()) {
Map<Long, WxMerchant> merchantMap = wxMerchantService.findMerchantMap(wxMerchant);
for (int i = 0 ; i < retList.size() ; i++) {
WxBillNotify bn = retList.get(i);
if (null != bn.getMerchantId() && null != merchantMap) {
WxMerchant m = merchantMap.get(bn.getMerchantId());
if (null != m) {
bn.setMerchantName(m.getName());
}
}
}
}
}
return retList;
}
private List<WxBillNotify> getBillNotifyList(EnumBillAllType billType,WxMerchant wxMerchant) {
if (billType == EnumBillAllType.RENT) {
WxBillRent wxBillRent = new WxBillRent();
updateQueryParm(wxMerchant, wxBillRent,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillRent.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillRent.setBillType(EnumBillAllType.RENT.getCode());
wxBillRent.setBillTypeName(EnumBillAllType.RENT.getMessage());
wxBillRent.setSortColumns("starttime asc");
return wxBillRentService.notifyList(wxBillRent);
}else if (billType == EnumBillAllType.RENT_BUSSINESS_MANAGE) {
WxBillRentManage wxBillRentManage = new WxBillRentManage();
wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE.getCode());
updateQueryParm(wxMerchant, wxBillRentManage,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillRentManage.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillRentManage.setBillType(EnumBillAllType.RENT_BUSSINESS_MANAGE.getCode());
wxBillRentManage.setBillTypeName(EnumBillAllType.RENT_BUSSINESS_MANAGE.getMessage());
wxBillRentManage.setSortColumns("starttime asc");
return wxBillRentManageService.notifyList(wxBillRentManage);
}else if (billType == EnumBillAllType.RENT_OPERATION_MANAGE) {
WxBillRentManage wxBillRentManage = new WxBillRentManage();
wxBillRentManage.setManageFeeType(EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE.getCode());
updateQueryParm(wxMerchant, wxBillRentManage,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillRentManage.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillRentManage.setBillType(EnumBillAllType.RENT_OPERATION_MANAGE.getCode());
wxBillRentManage.setBillTypeName(EnumBillAllType.RENT_OPERATION_MANAGE.getMessage());
wxBillRentManage.setSortColumns("starttime asc");
return wxBillRentManageService.notifyList(wxBillRentManage);
}else if (billType == EnumBillAllType.RENT_DEPOSIT) {
WxBillDeposit wxBillDeposit = new WxBillDeposit();
updateQueryParm(wxMerchant, wxBillDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillDeposit.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillDeposit.setBillType(EnumBillAllType.RENT_DEPOSIT.getCode());
wxBillDeposit.setBillTypeName(EnumBillAllType.RENT_DEPOSIT.getMessage());
wxBillDeposit.setSortColumns("starttime asc");
return wxBillRentDepositService.notifyList(wxBillDeposit);
}else if (billType == EnumBillAllType.PROPERTY) {
WxBillProperty wxBillProperty = new WxBillProperty();
updateQueryParm(wxMerchant, wxBillProperty,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillProperty.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillProperty.setBillType(EnumBillAllType.PROPERTY.getCode());
wxBillProperty.setBillTypeName(EnumBillAllType.PROPERTY.getMessage());
wxBillProperty.setSortColumns("starttime asc");
return wxBillPropertyService.notifyList(wxBillProperty);
}else if (billType == EnumBillAllType.PROPERTY_DEPOSIT) {
WxBillPropertyDeposit wxBillPropertyDeposit = new WxBillPropertyDeposit();
updateQueryParm(wxMerchant, wxBillPropertyDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillPropertyDeposit.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillPropertyDeposit.setBillType(EnumBillAllType.PROPERTY_DEPOSIT.getCode());
wxBillPropertyDeposit.setBillTypeName(EnumBillAllType.PROPERTY_DEPOSIT.getMessage());
wxBillPropertyDeposit.setSortColumns("starttime asc");
return wxBillPropertyDepositService.notifyList(wxBillPropertyDeposit);
}else if (billType == EnumBillAllType.DAILY) {
WxBillDaily wxBillDaily = new WxBillDaily();
updateQueryParm(wxMerchant, wxBillDaily,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillDaily.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillDaily.setBillType(EnumBillAllType.DAILY.getCode());
wxBillDaily.setBillTypeName(EnumBillAllType.DAILY.getMessage());
wxBillDaily.setSortColumns("starttime asc");
return wxBillDailyService.notifyList(wxBillDaily);
}else if (billType == EnumBillAllType.OTHER) {
WxBillOther wxBillOther = new WxBillOther();
updateQueryParm(wxMerchant, wxBillOther,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillOther.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillOther.setBillType(EnumBillAllType.OTHER.getCode());
wxBillOther.setBillTypeName(EnumBillAllType.OTHER.getMessage());
wxBillOther.setSortColumns("starttime asc");
return wxBillOtherService.notifyList(wxBillOther);
}else if (billType == EnumBillAllType.OTHER_DEPOSIT) {
WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit();
updateQueryParm(wxMerchant, wxBillOtherDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillOtherDeposit.setNotifyed(EnumYesOrNo.YES.getCode());
wxBillOtherDeposit.setBillType(EnumBillAllType.OTHER_DEPOSIT.getCode());
wxBillOtherDeposit.setBillTypeName(EnumBillAllType.OTHER_DEPOSIT.getMessage());
wxBillOtherDeposit.setSortColumns("starttime asc");
return wxBillOtherDepositService.notifyList(wxBillOtherDeposit);
}
return null;
}
public void exportOneBillOweWord(boolean isOwe,WxBillBaseEntity bill,HttpServletRequest request, HttpServletResponse response) {
String templatePath = "contract-word-template/bill_owe_one.docx";
if (!isOwe) {


+ 7
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java View File

@@ -15,6 +15,7 @@ import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillDailyExportVo;
import com.iformall.domain.vo.WxBillDailyVo;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;
import com.iformall.enums.*;
import com.iformall.exception.MallinkException;
@@ -81,6 +82,12 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD
return getBillRentPropertyList(pageIndex, pageSize, record, wxPayAccountBill);
}
@Override
public List<WxBillNotify> notifyList(WxBillDaily record) {
updateQueryParam(record);
return wxBillDailyMapper.getBillNotifyList(record);
}
private void updateQueryParam(WxBillDaily record) {
if (null != record.getFloorForRule() || null != record.getFloor() || null != record.getBuilding()) {
List<Long> merchantIds = wxMerchantService.getFloorBuildMerchantIds(record, record.getFloorForRule(), record.getBuilding(), record.getFloor(), 0, 0);


+ 7
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java View File

@@ -22,6 +22,7 @@ import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.po.WxShop;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;
import com.iformall.enums.EnumBillAction;
import com.iformall.enums.EnumBillPayWay;
@@ -97,6 +98,12 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil
return getBillDepositPropertyList(wxPayAccountBill, record, pageIndex, pageSize);
}
@Override
public List<WxBillNotify> notifyList(WxBillDeposit record) {
setQueryParam(record);
return wxBillDepositMapper.getBillNotifyList(record);
}
private void setQueryParam(WxBillDeposit record) {
if (null != record.getFloorForRule() || null != record.getFloor() || null != record.getBuilding()) {
List<Long> merchantIds = wxMerchantService.getFloorBuildMerchantIds(record, record.getFloorForRule(), record.getBuilding(), record.getFloor(), 0, 0);


+ 7
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java View File

@@ -19,6 +19,7 @@ import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;
import com.iformall.enums.*;
import com.iformall.exception.MallinkException;
@@ -83,7 +84,12 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements
public PageInfo<WxBillOtherDeposit> listAsPage(WxBillOtherDeposit record, Integer pageIndex, Integer pageSize) {
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantInfo(record);
return getBillRentPropertyList(pageIndex, pageSize, record, wxPayAccountBill);

}
@Override
public List<WxBillNotify> notifyList(WxBillOtherDeposit record) {
updateQueryParam(record);
return wxBillOtherDepositMapper.getBillNotifyList(record);
}
private void updateQueryParam(WxBillOtherDeposit record) {


+ 7
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java View File

@@ -19,6 +19,7 @@ import com.iformall.domain.po.WxMerchantBUser;
import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;
import com.iformall.enums.*;
import com.iformall.exception.MallinkException;
@@ -83,7 +84,12 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO
public PageInfo<WxBillOther> listAsPage(WxBillOther record, Integer pageIndex, Integer pageSize) {
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantInfo(record);
return getBillOtherPropertyList(pageIndex, pageSize, record, wxPayAccountBill);

}
@Override
public List<WxBillNotify> notifyList(WxBillOther record) {
updateQueryParam(record);
return wxBillOtherMapper.getBillNotifyList(record);
}
private void updateQueryParam(WxBillOther record) {


+ 7
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java View File

@@ -21,6 +21,7 @@ import com.iformall.domain.po.WxPropertyContract;
import com.iformall.domain.po.WxShop;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;
import com.iformall.enums.EnumBillAction;
import com.iformall.enums.EnumBillPayWay;
@@ -90,6 +91,12 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen
return getBillDepositPropertyList(wxPayAccountBill, record, pageIndex, pageSize);
}
@Override
public List<WxBillNotify> notifyList(WxBillPropertyDeposit record) {
updateQueryParam(record);
return wxBillPropertyDepositMapper.getBillNotifyList(record);
}
private void updateQueryParam(WxBillPropertyDeposit record) {
if (null != record.getFloorForRule() || null != record.getFloor() || null != record.getBuilding()) {
List<Long> merchantIds = wxMerchantService.getFloorBuildMerchantIds(record, record.getFloorForRule(), record.getBuilding(), record.getFloor(), 0, 0);


+ 7
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java View File

@@ -13,6 +13,7 @@ import com.iformall.domain.po.*;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;
import com.iformall.enums.*;
import com.iformall.exception.MallinkException;
@@ -83,6 +84,12 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi
return getBillPropertyList(pageIndex, pageSize, wxPayAccountBill, record);
}
@Override
public List<WxBillNotify> notifyList(WxBillProperty record) {
updateQueryParam(record);
return wxBillPropertyMapper.getBillNotifyList(record);
}
private void updateQueryParam(WxBillProperty record) {
if(null != record.getDepositStatus()) {
WxBillPropertyDeposit bdq1 = new WxBillPropertyDeposit();


+ 7
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillRentManageServiceImpl.java View File

@@ -20,6 +20,7 @@ import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;
import com.iformall.enums.*;
import com.iformall.exception.MallinkException;
@@ -84,6 +85,12 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W
return getBillRentManageList(pageIndex, pageSize, wxBillRentManage, wxPayAccountBill);
}
@Override
public List<WxBillNotify> notifyList(WxBillRentManage record) {
updateQueryParam(record);
return wxBillRentManageMapper.getBillNotifyList(record);
}
private void updateQueryParam(WxBillRentManage wxBillRentManage) {
if (null != wxBillRentManage.getFloorForRule() || null != wxBillRentManage.getFloor() || null != wxBillRentManage.getBuilding()) {
List<Long> merchantIds = wxMerchantService.getFloorBuildMerchantIds(wxBillRentManage, wxBillRentManage.getFloorForRule(), wxBillRentManage.getBuilding(), wxBillRentManage.getFloor(), 0, 0);


+ 7
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java View File

@@ -13,6 +13,7 @@ import com.iformall.domain.po.*;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.RatioVo;
import com.iformall.domain.vo.WxBillHotNotify;
import com.iformall.domain.vo.WxBillNotify;
import com.iformall.domain.vo.WxBillSum;
import com.iformall.enums.*;
import com.iformall.exception.MallinkException;
@@ -79,6 +80,12 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantInfo(record);
return getBillRentPropertyList(pageIndex,pageSize,record,wxPayAccountBill);
}
@Override
public List<WxBillNotify> notifyList(WxBillRent record) {
updateQueryParam(record);
return wxBillRentMapper.getBillNotifyList(record);
}

public void computeTotalMoney(Integer decimalSize,WxPayAccountBill wxPayAccountBill, WxBillRent rent) {
if (rent.getReceivePay() != null) {


+ 20
- 6
mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml View File

@@ -33,15 +33,13 @@
<result column="freeze" property="freeze"/>
<result column="build_way" property="buildWay"/>
<result column="service_charge_pay" property="serviceChargePay"/>
<result column="bill_type_name" property="billTypeName"/>
<result column="bill_remark" jdbcType="VARCHAR" property="billRemark"/>
</resultMap>
<sql id="allColumns">
`id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`apply_status`,`apply_pay_img`,`apply_update_time`,
`tenant_id`,`parent_tenant_id`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`type`,`last_owe_call_time`,
`rent_shop_type`,`pay_way`,`price_detail`,`starttime`,`endtime`,freeze,build_way,service_charge_pay,`bill_remark`,`last_owe_call_user`,
case type when 1 then '水费' when 2 then '电费' when 3 then '空调费' else '日常费用' end bill_type_name
`rent_shop_type`,`pay_way`,`price_detail`,`starttime`,`endtime`,freeze,build_way,service_charge_pay,`bill_remark`,`last_owe_call_user`
</sql>

<sql id="dynamicWhereConditions">
@@ -69,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=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -124,6 +122,7 @@
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.status not in (3,6))
</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=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -144,8 +143,7 @@
select br.`id`,br.`tenant_id`,br.`parent_tenant_id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day` ,
br.`status`,br.`updatetime`,br.`merchant_id`,br.shop_id,br.`last_owe_call_time`,br.`last_owe_call_user`,
br.shop_name,br.type,br.`rent_shop_type`,br.pay_way,br.price_detail,br.`starttime`,br.`endtime`,br.`build_way`,
br.freeze,br.service_charge_pay,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,br.`bill_remark`,
case type when 1 then '水费' when 2 then '电费' when 3 then '空调费' else '日常费用' end bill_type_name
br.freeze,br.service_charge_pay,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,br.`bill_remark`
from wx_bill_daily br
<include refid="queryBillDailyListConditions" />
<if test=" null != sortColumns"> order by ${sortColumns} </if>
@@ -183,6 +181,22 @@
<include refid="queryBillDailyListConditions"/>
</select>
<resultMap id="NotifyResultMap" type="com.iformall.domain.vo.WxBillNotify">
<result column="bill_type" jdbcType="INTEGER" property="billType"/>
<result column="bill_type_name" jdbcType="VARCHAR" property="billTypeName" />
<result column="bill_id" jdbcType="BIGINT" property="billId" />
<result column="starttime" jdbcType="TIMESTAMP" property="starttime"/>
<result column="endtime" jdbcType="TIMESTAMP" property="endtime"/>
<result column="receive_pay" jdbcType="VARCHAR" property="receivePay"/>
<result column="pay" jdbcType="VARCHAR" property="pay"/>
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
</resultMap>
<select id="getBillNotifyList" parameterType="com.iformall.domain.po.WxBillDaily" resultMap="NotifyResultMap">
select #{billType} bill_type,#{billTypeName} bill_type_name,br.id as bill_id, br.starttime,br.endtime,br.receive_pay,br.pay,br.merchant_id from wx_bill_daily br
<include refid="queryBillDailyListConditions"/>
</select>
<update id="updateNotPaidStatus" parameterType="hashmap">
update wx_bill_daily set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date)
where status!=#{paid}


+ 19
- 4
mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml View File

@@ -30,8 +30,6 @@
<result column="freeze" property="freeze"/>
<result column="merchant_name" property="merchantName"/>
<result column="shop_number" property="shopNumber"/>
<result column="bill_type_name" property="billTypeName"/>
<result column="bill_remark" property="billRemark"/>
<result column="contract_depoist_detail" property="contractDepoistDetail"/>
<result column="last_owe_call_time" jdbcType="TIMESTAMP" property="lastOweCallTime"/>
<result column="last_owe_call_user" jdbcType="VARCHAR" property="lastOweCallUser"/>
@@ -40,7 +38,7 @@
<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`rent_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`last_owe_call_time`,
`expired_day`,`status`,`is_del`,`need_pay`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`apply_status`,`apply_pay_img`,`apply_update_time`,
`last_owe_call_user`,`rent_shop_type`,`return_price`,`pay_way`,service_charge_pay,'租赁押金' bill_type_name,'' bill_remark,contract_depoist_detail
`last_owe_call_user`,`rent_shop_type`,`return_price`,`pay_way`,service_charge_pay,contract_depoist_detail
</sql>

<sql id="dynamicWhereConditions">
@@ -84,6 +82,7 @@
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (`starttime` &gt; #{oweBillLastTime} and `starttime` &lt;= #{nearBillLastTime} 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) )</if>
<if test=" null != merchantIds ">
and `merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -123,7 +122,7 @@
<select id="queryBillDepositList" parameterType="com.iformall.domain.po.WxBillDeposit" resultMap="BaseResultMap">
select br.`id`,br.`tenant_id`,br.`parent_tenant_id`,br.`rent_contract_id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`,br.`last_owe_call_time`,
br.`status`,br.`need_pay`,br.`updatetime`,br.`merchant_id`,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,br.`contract_depoist_detail`,br.`last_owe_call_user`,
br.`rent_shop_type`,br.`return_price`, br.pay_way,br.shop_info ,br.freeze,br.service_charge_pay,'租赁押金' bill_type_name,'' bill_remark
br.`rent_shop_type`,br.`return_price`, br.pay_way,br.shop_info ,br.freeze,br.service_charge_pay
from wx_bill_rent_deposit br
<include refid="queryBillRentListCondition"/>
order by br.id desc
@@ -160,6 +159,7 @@
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} 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) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -200,6 +200,21 @@
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_rent_deposit br
<include refid="queryBillRentListCondition"/>
</select>
<resultMap id="NotifyResultMap" type="com.iformall.domain.vo.WxBillNotify">
<result column="bill_type" jdbcType="INTEGER" property="billType"/>
<result column="bill_type_name" jdbcType="VARCHAR" property="billTypeName" />
<result column="bill_id" jdbcType="BIGINT" property="billId" />
<result column="starttime" jdbcType="TIMESTAMP" property="starttime"/>
<result column="endtime" jdbcType="TIMESTAMP" property="endtime"/>
<result column="receive_pay" jdbcType="VARCHAR" property="receivePay"/>
<result column="pay" jdbcType="VARCHAR" property="pay"/>
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
</resultMap>
<select id="getBillNotifyList" parameterType="com.iformall.domain.po.WxBillDeposit" resultMap="NotifyResultMap">
select #{billType} bill_type,#{billTypeName} bill_type_name,br.id as bill_id, br.starttime,br.endtime,br.receive_pay,br.pay,br.merchant_id from wx_bill_rent_deposit br
<include refid="queryBillRentListCondition"/>
</select>

<select id="queryPayInfo" resultType="hashmap" parameterType="hashmap">
select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id,parent_tenant_id from wx_bill_rent_deposit


+ 19
- 5
mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml View File

@@ -34,14 +34,12 @@
<result column="endtime" property="endtime"/>
<result column="freeze" property="freeze"/>
<result column="service_charge_pay" property="serviceChargePay"/>
<result column="bill_type_name" property="billTypeName"/>
<result column="bill_remark" property="billRemark"/>
</resultMap>
<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`last_owe_call_time`,`last_owe_call_user`,
`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`name`,`comments`,`apply_status`,`apply_pay_img`,`apply_update_time`,
`rent_shop_type`,`return_price`,`pay_way`,`starttime`,`endtime`,freeze,service_charge_pay,'其他押金' bill_type_name,CONCAT(`name`,',',`comments`) bill_remark
`rent_shop_type`,`return_price`,`pay_way`,`starttime`,`endtime`,freeze,service_charge_pay
</sql>
<sql id="dynamicWhereConditions">
@@ -71,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=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -128,6 +126,7 @@
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} 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) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -148,7 +147,7 @@
<select id="queryBillList" parameterType="com.iformall.domain.po.WxBillOtherDeposit" resultMap="BaseResultMap">
select br.`id`,br.`tenant_id`,br.`parent_tenant_id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`,br.`last_owe_call_user`,
br.`status`,br.shop_name,br.`updatetime`,br.`return_price`,br.`merchant_id`,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,br.`last_owe_call_time`,
br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way,br.`starttime`,br.`endtime`,br.freeze,br.service_charge_pay,'其他押金' bill_type_name,CONCAT(`name`,',',`comments`) bill_remark
br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way,br.`starttime`,br.`endtime`,br.freeze,br.service_charge_pay
from wx_bill_other_deposit br
<include refid="queryBillListConditions"/>
<if test=" null != sortColumns"> order by ${sortColumns} </if>
@@ -186,6 +185,21 @@
<include refid="queryBillListConditions"/>
</select>
<resultMap id="NotifyResultMap" type="com.iformall.domain.vo.WxBillNotify">
<result column="bill_type" jdbcType="INTEGER" property="billType"/>
<result column="bill_type_name" jdbcType="VARCHAR" property="billTypeName" />
<result column="bill_id" jdbcType="BIGINT" property="billId" />
<result column="starttime" jdbcType="TIMESTAMP" property="starttime"/>
<result column="endtime" jdbcType="TIMESTAMP" property="endtime"/>
<result column="receive_pay" jdbcType="VARCHAR" property="receivePay"/>
<result column="pay" jdbcType="VARCHAR" property="pay"/>
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
</resultMap>
<select id="getBillNotifyList" parameterType="com.iformall.domain.po.WxBillOtherDeposit" resultMap="NotifyResultMap">
select #{billType} bill_type,#{billTypeName} bill_type_name,br.id as bill_id, br.starttime,br.endtime,br.receive_pay,br.pay,br.merchant_id from wx_bill_other_deposit br
<include refid="queryBillListConditions"/>
</select>
<update id="updateNotPaidStatus" parameterType="hashmap">
update wx_bill_other_deposit set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date)


+ 20
- 6
mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml View File

@@ -34,15 +34,12 @@
<result column="endtime" property="endtime"/>
<result column="freeze" property="freeze"/>
<result column="service_charge_pay" property="serviceChargePay"/>
<result column="bill_type_name" property="billTypeName"/>
<result column="bill_remark" property="billRemark"/>
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`last_owe_call_user`,
`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`shop_name`,`updatetime`,`name`,`comments`,`last_owe_call_time`,
`rent_shop_type`,`pay_way`,`starttime`,`endtime`,endtime,service_charge_pay,`apply_status`,`apply_pay_img`,`apply_update_time`,
'其他费用' bill_type_name, CONCAT(`name`,',',`comments`) bill_remark
`rent_shop_type`,`pay_way`,`starttime`,`endtime`,endtime,service_charge_pay,`apply_status`,`apply_pay_img`,`apply_update_time`
</sql>

<sql id="dynamicWhereConditions">
@@ -70,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=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -122,6 +119,7 @@
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} 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) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -143,7 +141,7 @@
select br.`id`,br.`tenant_id`,br.`parent_tenant_id`,br.`receive_pay`,br.`pay`,br.`receive_date`, br.`pay_date`,br.`createtime`,br.`expired_day`,
br.`status`,br.shop_name,br.`updatetime`,br.`apply_status`,br.`last_owe_call_time`,br.`last_owe_call_user`,
br.`apply_pay_img`,br.`apply_update_time`,br.`merchant_id`,br.shop_id,br.name,br.comments,br.`rent_shop_type`,
br.pay_way,br.`starttime`,br.`endtime`,br.freeze,br.service_charge_pay,'其他费用' bill_type_name, CONCAT(br.`name`,',',br.`comments`) bill_remark
br.pay_way,br.`starttime`,br.`endtime`,br.freeze,br.service_charge_pay
from wx_bill_other br
<include refid="queryBillListConditions" />
<if test=" null != sortColumns"> order by ${sortColumns} </if>
@@ -180,6 +178,22 @@
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_other br
<include refid="queryBillListConditions"/>
</select>
<resultMap id="NotifyResultMap" type="com.iformall.domain.vo.WxBillNotify">
<result column="bill_type" jdbcType="INTEGER" property="billType"/>
<result column="bill_type_name" jdbcType="VARCHAR" property="billTypeName" />
<result column="bill_id" jdbcType="BIGINT" property="billId" />
<result column="starttime" jdbcType="TIMESTAMP" property="starttime"/>
<result column="endtime" jdbcType="TIMESTAMP" property="endtime"/>
<result column="receive_pay" jdbcType="VARCHAR" property="receivePay"/>
<result column="pay" jdbcType="VARCHAR" property="pay"/>
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
</resultMap>
<select id="getBillNotifyList" parameterType="com.iformall.domain.po.WxBillOther" resultMap="NotifyResultMap">
select #{billType} bill_type,#{billTypeName} bill_type_name,br.id as bill_id, br.starttime,br.endtime,br.receive_pay,br.pay,br.merchant_id from wx_bill_other br
<include refid="queryBillListConditions"/>
</select>

<update id="updateNotPaidStatus" parameterType="hashmap">
update wx_bill_other set status=#{notPaid},expired_day=DATEDIFF(now(),receive_date)


+ 14
- 6
mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml View File

@@ -34,15 +34,12 @@
<result column="last_owe_call_user" jdbcType="VARCHAR" property="lastOweCallUser"/>
<result column="merchant_name" property="merchantName"/>
<result column="shop_number" property="shopNumber"/>
<result column="bill_type_name" property="billTypeName"/>
<result column="bill_remark" property="billRemark"/>
</resultMap>
<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`property_contract_id`,`receive_pay`,`pay`,`receive_date`,`starttime`,`endtime`,
`pay_date`,`createtime`,`expired_day`,`status`,`is_del`,`need_pay`,`apply_status`,`apply_pay_img`,`apply_update_time`,`last_owe_call_user`,
`merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,`return_price`,`shop_info`,`pay_way`,freeze,service_charge_pay,
'物业押金' bill_type_name,'' bill_remark
`merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,`return_price`,`shop_info`,`pay_way`,freeze,service_charge_pay
</sql>

<sql id="dynamicWhereConditions">
@@ -71,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=" null != propertyContractIdList ">
and property_contract_id in
<foreach collection="propertyContractIdList" index="index" item="pidItem" open="(" separator="," close=")">
@@ -129,6 +126,7 @@
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} 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) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -141,7 +139,7 @@
<select id="queryBillDepositList" parameterType="com.iformall.domain.po.WxBillPropertyDeposit" resultMap="BaseResultMap">
select br.`id`,br.`tenant_id`,br.`parent_tenant_id`,br.`property_contract_id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`,br.`status`,
br.`need_pay`,br.`updatetime`,br.`merchant_id`,br.`rent_shop_type`,br.`return_price`,br.`shop_info`,br.pay_way,br.`starttime`,br.`endtime`,br.`last_owe_call_user`,
br.freeze,br.service_charge_pay,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,'物业押金' bill_type_name,'' bill_remark
br.freeze,br.service_charge_pay,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`
from wx_bill_property_deposit br
<include refid="queryBillDepositListConditions"/>
order by id desc
@@ -178,6 +176,16 @@
<include refid="queryBillDepositListConditions"/>
</select>
<resultMap id="HotNotifyBaseResultMap" type="com.iformall.domain.vo.WxBillHotNotify">
<result column="total_count" jdbcType="INTEGER" property="totalCount"/>
<result column="total_money" jdbcType="VARCHAR" property="totalMoney" />
<result column="min_begin_time" jdbcType="TIMESTAMP" property="minBeginTime"/>
</resultMap>
<select id="getBillHotNotify" parameterType="com.iformall.domain.po.WxBillPropertyDeposit" resultMap="HotNotifyBaseResultMap">
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_property_deposit br
<include refid="queryBillDepositListConditions"/>
</select>
<select id="queryPayInfo" resultType="hashmap" parameterType="hashmap">
select IFNULL((sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_property_deposit
where date_format(receive_date,'%Y-%m')=#{receiveDate}


+ 19
- 6
mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml View File

@@ -46,8 +46,6 @@
<result column="late_pay_ratio" property="latePayRatio"/>
<result column="freeze" property="freeze"/>
<result column="service_charge_pay" property="serviceChargePay"/>
<result column="bill_type_name" property="billTypeName"/>
<result column="bill_remark" property="billRemark"/>
</resultMap>

<sql id="allColumns">
@@ -55,7 +53,7 @@
`createtime`,`expired_day`,`tenant_id`,`status`,`is_del`,`need_pay`,`last_owe_call_time`,`last_owe_call_user`,
`merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,`apply_status`,`apply_pay_img`,`apply_update_time`,
`revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`,
`pay_way`,`late_pay_status`,`comments`,starttime,endtime,freeze,service_charge_pay,'物业费' bill_type_name,'' bill_remark
`pay_way`,`late_pay_status`,`comments`,starttime,endtime,freeze,service_charge_pay
</sql>

<sql id="dynamicWhereConditions">
@@ -86,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=" null != propertyContractIds ">
and property_contract_id in
<foreach collection="propertyContractIds" index="index" item="pidItem" open="(" separator="," close=")">
@@ -152,7 +150,7 @@
<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=" null != propertyContractIds ">
and br.property_contract_id in
<foreach collection="propertyContractIds" index="index" item="pidItem" open="(" separator="," close=")">
@@ -174,7 +172,7 @@
br.`status`,br.`need_pay`,br.`updatetime`,br.`merchant_id`,br.`rent_shop_type`,br.`period`,br.`last_owe_call_time`,br.`last_owe_call_user`,
br.`revenue`,br.`late_pay_time`,br.`property_contract_id`,br.late_pay_price,br.`shop_info`,br.pay_way,br.late_pay_status,
br.`comments`,br.starttime,br.endtime,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,br.freeze,br.service_charge_pay,
br.`late_pay_ratio`,'物业费' bill_type_name,'' bill_remark
br.`late_pay_ratio`
from wx_bill_property br
<include refid="queryBillPropertyListConditions"/>
<if test=" null != sortColumns">order by ${sortColumns}</if>
@@ -216,6 +214,21 @@
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_property br
<include refid="queryBillPropertyListConditions"/>
</select>
<resultMap id="NotifyResultMap" type="com.iformall.domain.vo.WxBillNotify">
<result column="bill_type" jdbcType="INTEGER" property="billType"/>
<result column="bill_type_name" jdbcType="VARCHAR" property="billTypeName" />
<result column="bill_id" jdbcType="BIGINT" property="billId" />
<result column="starttime" jdbcType="TIMESTAMP" property="starttime"/>
<result column="endtime" jdbcType="TIMESTAMP" property="endtime"/>
<result column="receive_pay" jdbcType="VARCHAR" property="receivePay"/>
<result column="pay" jdbcType="VARCHAR" property="pay"/>
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
</resultMap>
<select id="getBillNotifyList" parameterType="com.iformall.domain.po.WxBillProperty" resultMap="NotifyResultMap">
select #{billType} bill_type,#{billTypeName} bill_type_name,br.id as bill_id, br.starttime,br.endtime,br.receive_pay,br.pay,br.merchant_id from wx_bill_property br
<include refid="queryBillPropertyListConditions"/>
</select>

<select id="queryPayInfo" resultType="hashmap" parameterType="hashmap">
select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_property


+ 19
- 8
mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml View File

@@ -38,17 +38,13 @@
<result column="last_owe_call_time" jdbcType="TIMESTAMP" property="lastOweCallTime"/>
<result column="last_owe_call_user" jdbcType="VARCHAR" property="lastOweCallUser"/>
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/>
<result column="bill_type_name" property="billTypeName"/>
<result column="bill_remark" property="billRemark"/>
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`rent_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`last_owe_call_user`,
`createtime`,`expired_day`,`status`,`apply_status`,`apply_pay_img`,`apply_update_time`,`is_del`,`need_pay`,`last_owe_call_time`,
`merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,
`period`,`shop_info`,`pay_way`,`late_pay_status`,starttime,endtime,freeze,service_charge_pay,manage_fee_type,
case manage_fee_type when 1 then '商业管理费' when 2 then '运营管理费' else '管理费' end bill_type_name,'' bill_remark
`period`,`shop_info`,`pay_way`,`late_pay_status`,starttime,endtime,freeze,service_charge_pay,manage_fee_type
</sql>

<sql id="dynamicWhereConditions">
@@ -79,6 +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=" null != merchantIds ">
and merchant_id in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -138,7 +135,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=" null != merchantIds ">
and br.merchant_id in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -153,8 +150,7 @@
br.`status`,br.`need_pay`,br.`late_pay_time`,br.`period`,br.`rent_contract_id`,br.`last_owe_call_time`,br.`last_owe_call_user`,
br.`updatetime`,br.`merchant_id`,br.`rent_shop_type`,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,
br.late_pay_price,br.shop_info,br.pay_way,br.late_pay_status,br.starttime,br.endtime,
br.freeze,br.service_charge_pay,br.manage_fee_type,br.`late_pay_ratio`,
case br.manage_fee_type when 1 then '商业管理费' when 2 then '运营管理费' else '管理费' end bill_type_name,'' bill_remark
br.freeze,br.service_charge_pay,br.manage_fee_type,br.`late_pay_ratio`
from wx_bill_rent_manage br
<include refid="queryBillManageListConditions"/>
<if test=" null != sortColumns">order by ${sortColumns}</if>
@@ -198,6 +194,21 @@
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_rent_manage br
<include refid="queryBillManageListConditions"/>
</select>
<resultMap id="NotifyResultMap" type="com.iformall.domain.vo.WxBillNotify">
<result column="bill_type" jdbcType="INTEGER" property="billType"/>
<result column="bill_type_name" jdbcType="VARCHAR" property="billTypeName" />
<result column="bill_id" jdbcType="BIGINT" property="billId" />
<result column="starttime" jdbcType="TIMESTAMP" property="starttime"/>
<result column="endtime" jdbcType="TIMESTAMP" property="endtime"/>
<result column="receive_pay" jdbcType="VARCHAR" property="receivePay"/>
<result column="pay" jdbcType="VARCHAR" property="pay"/>
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
</resultMap>
<select id="getBillNotifyList" parameterType="com.iformall.domain.po.WxBillRentManage" resultMap="NotifyResultMap">
select #{billType} bill_type,#{billTypeName} bill_type_name,br.id as bill_id, br.starttime,br.endtime,br.receive_pay,br.pay,br.merchant_id from wx_bill_rent_manage br
<include refid="queryBillManageListConditions"/>
</select>

<select id="queryPayInfoTotal" resultType="hashmap" parameterType="hashmap">
select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_rent_manage


+ 19
- 5
mallinkService/src/main/resources/mapper/WxBillRentMapper.xml View File

@@ -56,8 +56,6 @@
<result column="bus_discount_ratio" property="busDiscountRatio"/>
<result column="join_rent_price" property="joinRentPrice"/>
<result column="service_charge_pay" property="serviceChargePay"/>
<result column="bill_type_name" property="billTypeName"/>
<result column="bill_remark" property="billRemark"/>
</resultMap>

<sql id="allColumns">
@@ -65,7 +63,7 @@
`createtime`,`expired_day`,`status`,`is_del`,`contract_need_pay`,`rent_price_info`,`need_pay`,`bussiness_manage_fee_need_pay`,`operating_manage_fee_need_pay`,
`merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,`apply_status`,`apply_pay_img`,`apply_update_time`,`last_owe_call_time`,
`revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`,`last_owe_call_user`,
`pay_way`,`late_pay_status`,`comments`,starttime,endtime,bus_discount_ratio,freeze,join_rent_price,service_charge_pay,'租金' bill_type_name,'' bill_remark
`pay_way`,`late_pay_status`,`comments`,starttime,endtime,bus_discount_ratio,freeze,join_rent_price,service_charge_pay
</sql>

<sql id="dynamicWhereConditions">
@@ -104,6 +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=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -153,6 +152,7 @@
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} 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) )</if>
<if test=" null != rentContractIdList ">
and br.`rent_contract_id` in
<foreach collection="rentContractIdList" index="index" item="ridItem" open="(" separator="," close=")">
@@ -172,8 +172,7 @@
select br.`id`,br.`tenant_id`,br.`parent_tenant_id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`,br.`last_owe_call_user`,
br.`status`,br.`contract_need_pay`,br.`rent_price_info`,br.`need_pay`,br.`bussiness_manage_fee_need_pay`,br.`operating_manage_fee_need_pay`,br.`last_owe_call_time`,
br.`updatetime`,br.`merchant_id`,br.`rent_shop_type`,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,br.`revenue`,br.`late_pay_time`,br.`period`,br.`rent_contract_id`,
br.late_pay_price,br.shop_info,br.pay_way,br.late_pay_status,br.`comments`,br.starttime,br.endtime,br.bus_discount_ratio,br.freeze,br.join_rent_price,br.service_charge_pay,
'租金' bill_type_name,'' bill_remark
br.late_pay_price,br.shop_info,br.pay_way,br.late_pay_status,br.`comments`,br.starttime,br.endtime,br.bus_discount_ratio,br.freeze,br.join_rent_price,br.service_charge_pay
from wx_bill_rent br
<include refid="queryBillRentListCondition"/>
<if test=" null != sortColumns">order by ${sortColumns}</if>
@@ -218,6 +217,21 @@
<include refid="queryBillRentListCondition"/>
</select>
<resultMap id="NotifyResultMap" type="com.iformall.domain.vo.WxBillNotify">
<result column="bill_type" jdbcType="INTEGER" property="billType"/>
<result column="bill_type_name" jdbcType="VARCHAR" property="billTypeName" />
<result column="bill_id" jdbcType="BIGINT" property="billId" />
<result column="starttime" jdbcType="TIMESTAMP" property="starttime"/>
<result column="endtime" jdbcType="TIMESTAMP" property="endtime"/>
<result column="receive_pay" jdbcType="VARCHAR" property="receivePay"/>
<result column="pay" jdbcType="VARCHAR" property="pay"/>
<result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
</resultMap>
<select id="getBillNotifyList" parameterType="com.iformall.domain.po.WxBillRent" resultMap="NotifyResultMap">
select #{billType} bill_type,#{billTypeName} bill_type_name,br.id as bill_id, br.starttime,br.endtime,br.receive_pay,br.pay,br.merchant_id from wx_bill_rent br
<include refid="queryBillRentListCondition"/>
</select>
<select id="queryPayInfo" resultType="hashmap" parameterType="hashmap">
select IFNULL(sum(CAST(receive_pay AS DECIMAL(20,2))),0) receivepay,IFNULL(sum(CAST(pay AS DECIMAL(20,2))),0) pay,tenant_id from wx_bill_rent
where is_preview = 0


Loading…
Cancel
Save