winter 2 лет назад
Родитель
Сommit
0faee520a7
8 измененных файлов: 69 добавлений и 20 удалений
  1. +46
    -16
      mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillAllController.java
  2. +3
    -3
      mallinkService/src/main/java/com/iformall/domain/vo/WxBillSum.java
  3. +4
    -0
      mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml
  4. +4
    -1
      mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml
  5. +3
    -0
      mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml
  6. +3
    -0
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
  7. +3
    -0
      mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml
  8. +3
    -0
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml

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

@@ -45,6 +45,7 @@ import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -103,6 +104,10 @@ public class WxBillAllController extends BaseController {
wxMerchant.setFloorForRule(dataRule.getFloorIds()); wxMerchant.setFloorForRule(dataRule.getFloorIds());
wxMerchant.setBusinessForRule(dataRule.getBussinessIds()); wxMerchant.setBusinessForRule(dataRule.getBussinessIds());
} }
Date starttime = wxMerchant.getStarttime();
Date enttime = wxMerchant.getEndtime();
wxMerchant.setStarttime(null);
wxMerchant.setEndtime(null);
PageInfo<WxMerchant> merchantPage = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize); PageInfo<WxMerchant> merchantPage = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize);
if (null != merchantPage && null != merchantPage.getList() && merchantPage.getList().size() > 0 ) { if (null != merchantPage && null != merchantPage.getList() && merchantPage.getList().size() > 0 ) {
List<WxMerchantBillVo> retList = new ArrayList<WxMerchantBillVo>(); List<WxMerchantBillVo> retList = new ArrayList<WxMerchantBillVo>();
@@ -114,51 +119,75 @@ public class WxBillAllController extends BaseController {
WxBillRent br = new WxBillRent(); WxBillRent br = new WxBillRent();
br.updateTenantInfo(wxMerchant); br.updateTenantInfo(wxMerchant);
br.setStarttime(wxMerchant.getStarttime());
br.setEndtime(wxMerchant.getEndtime());
br.setStarttime(starttime);
br.setEndtime(enttime);
WxBillSum rentSum = wxBillRentService.getBillMonthSum(br); WxBillSum rentSum = wxBillRentService.getBillMonthSum(br);
if (null == rentSum) {
rentSum = new WxBillSum();
}
WxBillRentManage brm = new WxBillRentManage(); WxBillRentManage brm = new WxBillRentManage();
brm.updateTenantInfo(wxMerchant); brm.updateTenantInfo(wxMerchant);
brm.setStarttime(wxMerchant.getStarttime());
brm.setEndtime(wxMerchant.getEndtime());
brm.setStarttime(starttime);
brm.setEndtime(enttime);
WxBillSum rentManageSum = wxBillRentManageService.getBillMonthSum(brm); WxBillSum rentManageSum = wxBillRentManageService.getBillMonthSum(brm);
if (null == rentManageSum) {
rentManageSum = new WxBillSum();
}
WxBillDeposit bd = new WxBillDeposit(); WxBillDeposit bd = new WxBillDeposit();
bd.updateTenantInfo(wxMerchant); bd.updateTenantInfo(wxMerchant);
bd.setStarttime(wxMerchant.getStarttime());
bd.setEndtime(wxMerchant.getEndtime());
bd.setStarttime(starttime);
bd.setEndtime(enttime);
WxBillSum rentDepositSum = wxBillRentDepositService.getBillMonthSum(bd); WxBillSum rentDepositSum = wxBillRentDepositService.getBillMonthSum(bd);
if (null == rentDepositSum) {
rentDepositSum = new WxBillSum();
}
WxBillProperty bp = new WxBillProperty(); WxBillProperty bp = new WxBillProperty();
bp.updateTenantInfo(wxMerchant); bp.updateTenantInfo(wxMerchant);
bp.setStarttime(wxMerchant.getStarttime());
bp.setEndtime(wxMerchant.getEndtime());
bp.setStarttime(starttime);
bp.setEndtime(enttime);
WxBillSum propertySum = wxBillPropertyService.getBillMonthSum(bp); WxBillSum propertySum = wxBillPropertyService.getBillMonthSum(bp);
if (null == propertySum) {
propertySum = new WxBillSum();
}
WxBillPropertyDeposit pd = new WxBillPropertyDeposit(); WxBillPropertyDeposit pd = new WxBillPropertyDeposit();
pd.updateTenantInfo(wxMerchant); pd.updateTenantInfo(wxMerchant);
pd.setStarttime(wxMerchant.getStarttime());
pd.setEndtime(wxMerchant.getEndtime());
pd.setStarttime(starttime);
pd.setEndtime(enttime);
WxBillSum propertyDepositSum = wxBillPropertyDepositService.getBillMonthSum(pd); WxBillSum propertyDepositSum = wxBillPropertyDepositService.getBillMonthSum(pd);
if (null == propertyDepositSum) {
propertyDepositSum = new WxBillSum();
}
WxBillDaily bdd = new WxBillDaily(); WxBillDaily bdd = new WxBillDaily();
bdd.updateTenantInfo(wxMerchant); bdd.updateTenantInfo(wxMerchant);
bdd.setStarttime(wxMerchant.getStarttime());
bdd.setEndtime(wxMerchant.getEndtime());
bdd.setStarttime(starttime);
bdd.setEndtime(enttime);
WxBillSum dailySum = wxBillDailyService.getBillMonthSum(bdd); WxBillSum dailySum = wxBillDailyService.getBillMonthSum(bdd);
if (null == dailySum) {
dailySum = new WxBillSum();
}
WxBillOther bo = new WxBillOther(); WxBillOther bo = new WxBillOther();
bo.updateTenantInfo(wxMerchant); bo.updateTenantInfo(wxMerchant);
bo.setStarttime(wxMerchant.getStarttime());
bo.setEndtime(wxMerchant.getEndtime());
bo.setStarttime(starttime);
bo.setEndtime(enttime);
WxBillSum otherSum = wxBillOtherService.getBillMonthSum(bo); WxBillSum otherSum = wxBillOtherService.getBillMonthSum(bo);
if (null == otherSum) {
otherSum = new WxBillSum();
}
WxBillOtherDeposit bod = new WxBillOtherDeposit(); WxBillOtherDeposit bod = new WxBillOtherDeposit();
bod.updateTenantInfo(wxMerchant); bod.updateTenantInfo(wxMerchant);
bod.setStarttime(wxMerchant.getStarttime());
bod.setEndtime(wxMerchant.getEndtime());
bod.setStarttime(starttime);
bod.setEndtime(enttime);
WxBillSum otherDepositSum = wxBillOtherDepositService.getBillMonthSum(bod); WxBillSum otherDepositSum = wxBillOtherDepositService.getBillMonthSum(bod);
if (null == otherDepositSum) {
otherDepositSum = new WxBillSum();
}
vo.setNeedPay(calcuteSum(rentSum.getNeedPay(),rentManageSum.getNeedPay(),rentDepositSum.getNeedPay(),propertySum.getNeedPay(), vo.setNeedPay(calcuteSum(rentSum.getNeedPay(),rentManageSum.getNeedPay(),rentDepositSum.getNeedPay(),propertySum.getNeedPay(),
propertyDepositSum.getNeedPay(),dailySum.getNeedPay(),otherSum.getNeedPay(),otherDepositSum.getNeedPay())); propertyDepositSum.getNeedPay(),dailySum.getNeedPay(),otherSum.getNeedPay(),otherDepositSum.getNeedPay()));
@@ -166,6 +195,7 @@ public class WxBillAllController extends BaseController {
propertyDepositSum.getPaid(),dailySum.getPaid(),otherSum.getPaid(),otherDepositSum.getPaid())); propertyDepositSum.getPaid(),dailySum.getPaid(),otherSum.getPaid(),otherDepositSum.getPaid()));
vo.setOwe(calcuteSum(rentSum.getOwe(),rentManageSum.getOwe(),rentDepositSum.getOwe(),propertySum.getOwe(), vo.setOwe(calcuteSum(rentSum.getOwe(),rentManageSum.getOwe(),rentDepositSum.getOwe(),propertySum.getOwe(),
propertyDepositSum.getOwe(),dailySum.getOwe(),otherSum.getOwe(),otherDepositSum.getOwe())); propertyDepositSum.getOwe(),dailySum.getOwe(),otherSum.getOwe(),otherDepositSum.getOwe()));
retList.add(vo); retList.add(vo);
} }
return new ResultData(retList); return new ResultData(retList);


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

@@ -14,15 +14,15 @@ public class WxBillSum implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;


//应收总金额 //应收总金额
private String needPay;
private String needPay = "0";
@TableField(exist = false) @TableField(exist = false)
private BigDecimal needPayNumber; private BigDecimal needPayNumber;
//已收总金额 //已收总金额
private String paid;
private String paid = "0";
@TableField(exist = false) @TableField(exist = false)
private BigDecimal paidNumber; private BigDecimal paidNumber;
//欠款 //欠款
private String owe;
private String owe = "0";
@TableField(exist = false) @TableField(exist = false)
private BigDecimal oweNumber; private BigDecimal oweNumber;


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

@@ -83,6 +83,10 @@
<sql id = "queryBillDailyListConditions" > <sql id = "queryBillDailyListConditions" >
<where> <where>
1 = 1
<if test=" null != id ">and br.`id` = #{id}</if>
<if test=" null != tenantId and '' != tenantId"> and br.`tenant_id` = #{tenantId}</if>
<if test=" null != parentTenantId and '' != parentTenantId">and br.`parent_tenant_id` = #{parentTenantId}</if>
<if test=" null != freeze ">and br.`freeze` = #{freeze}</if> <if test=" null != freeze ">and br.`freeze` = #{freeze}</if>
<if test=" null != id ">and br.`id` = #{id}</if> <if test=" null != id ">and br.`id` = #{id}</if>
<if test=" null != merchantId ">and br.`merchant_id` = #{merchantId}</if> <if test=" null != merchantId ">and br.`merchant_id` = #{merchantId}</if>


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

@@ -89,7 +89,10 @@
<sql id ="queryBillListConditions"> <sql id ="queryBillListConditions">
<where> <where>
<if test=" null != id ">and br.`id` = #{id}</if>
1 = 1
<if test=" null != id ">and br.`id` = #{id}</if>
<if test=" null != tenantId and '' != tenantId"> and br.`tenant_id` = #{tenantId}</if>
<if test=" null != parentTenantId and '' != parentTenantId">and br.`parent_tenant_id` = #{parentTenantId}</if>
<if test=" null != freeze ">and br.`freeze` = #{freeze}</if> <if test=" null != freeze ">and br.`freeze` = #{freeze}</if>
<if test=" null != merchantId ">and br.`merchant_id` = #{merchantId}</if> <if test=" null != merchantId ">and br.`merchant_id` = #{merchantId}</if>
<if test=" null != status ">and br.`status` = #{status}</if> <if test=" null != status ">and br.`status` = #{status}</if>


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

@@ -85,7 +85,10 @@
<sql id = "queryBillListConditions"> <sql id = "queryBillListConditions">
<where> <where>
1 = 1
<if test=" null != id ">and br.`id` = #{id}</if> <if test=" null != id ">and br.`id` = #{id}</if>
<if test=" null != tenantId and '' != tenantId"> and br.`tenant_id` = #{tenantId}</if>
<if test=" null != parentTenantId and '' != parentTenantId">and br.`parent_tenant_id` = #{parentTenantId}</if>
<if test=" null != freeze ">and br.`freeze` = #{freeze}</if> <if test=" null != freeze ">and br.`freeze` = #{freeze}</if>
<if test=" null != merchantId ">and br.`merchant_id` = #{merchantId}</if> <if test=" null != merchantId ">and br.`merchant_id` = #{merchantId}</if>
<if test=" null != status ">and br.`status` = #{status}</if> <if test=" null != status ">and br.`status` = #{status}</if>


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

@@ -120,6 +120,9 @@
<sql id="queryBillPropertyListConditions"> <sql id="queryBillPropertyListConditions">
<where> <where>
br.is_preview = 0 br.is_preview = 0
<if test=" null != id ">and br.`id` = #{id}</if>
<if test=" null != tenantId and '' != tenantId"> and br.`tenant_id` = #{tenantId}</if>
<if test=" null != parentTenantId and '' != parentTenantId">and br.`parent_tenant_id` = #{parentTenantId}</if>
<if test=" null != freeze ">and br.`freeze` = #{freeze}</if> <if test=" null != freeze ">and br.`freeze` = #{freeze}</if>
<if test=" null != id ">and br.`id` = #{id}</if> <if test=" null != id ">and br.`id` = #{id}</if>
<if test=" null != merchantId ">and br.`merchant_id` = #{merchantId}</if> <if test=" null != merchantId ">and br.`merchant_id` = #{merchantId}</if>


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

@@ -102,6 +102,9 @@
<sql id="queryBillManageListConditions"> <sql id="queryBillManageListConditions">
<where> <where>
1 = 1 1 = 1
<if test=" null != id ">and br.`id` = #{id}</if>
<if test=" null != tenantId and '' != tenantId"> and br.`tenant_id` = #{tenantId}</if>
<if test=" null != parentTenantId and '' != parentTenantId">and br.`parent_tenant_id` = #{parentTenantId}</if>
<if test=" null != freeze ">and br.`freeze` = #{freeze}</if> <if test=" null != freeze ">and br.`freeze` = #{freeze}</if>
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if> <if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != status ">and br.`status` = #{status}</if> <if test=" null != status ">and br.`status` = #{status}</if>


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

@@ -122,6 +122,9 @@
<sql id="queryBillRentListCondition"> <sql id="queryBillRentListCondition">
<where> <where>
br.is_preview = 0 br.is_preview = 0
<if test=" null != id ">and br.`id` = #{id}</if>
<if test=" null != tenantId and '' != tenantId"> and br.`tenant_id` = #{tenantId}</if>
<if test=" null != parentTenantId and '' != parentTenantId">and br.`parent_tenant_id` = #{parentTenantId}</if>
<if test=" null != freeze ">and br.`freeze` = #{freeze}</if> <if test=" null != freeze ">and br.`freeze` = #{freeze}</if>
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if> <if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != status ">and br.`status` = #{status}</if> <if test=" null != status ">and br.`status` = #{status}</if>


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