winter 2 лет назад
Родитель
Сommit
4a4ac5d2eb
11 измененных файлов: 50 добавлений и 81 удалений
  1. +4
    -4
      mallinkService/src/main/java/com/iformall/domain/po/base/WxBillBaseEntity.java
  2. +7
    -2
      mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java
  3. +7
    -3
      mallinkService/src/main/java/com/iformall/utils/DateUtils.java
  4. +4
    -9
      mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml
  5. +4
    -9
      mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml
  6. +4
    -9
      mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml
  7. +4
    -9
      mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml
  8. +4
    -9
      mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml
  9. +4
    -9
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
  10. +4
    -9
      mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml
  11. +4
    -9
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml

+ 4
- 4
mallinkService/src/main/java/com/iformall/domain/po/base/WxBillBaseEntity.java Просмотреть файл

@@ -98,12 +98,12 @@ public class WxBillBaseEntity extends TenantEntity {
// @TableField(exist = false)
// protected Integer onlyOwe;
//账单逾期计算提前天数
//账单逾期计算截止时间
@TableField(exist = false)
private Integer oweBillBeforeDays;
private Date oweBillLastTime;
//临期计算提前天数
//临期计算截止时间
@TableField(exist = false)
private Integer nearBillBeforeDays;
private Date nearBillLastTime;

}

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

@@ -104,8 +104,13 @@ public class WxBillAllHelper {
bill.setStarttime(starttime);
bill.setEndtime(enttime);
bill.setRentShopType(wxMerchant.getType());
bill.setOweBillBeforeDays(wxMerchant.getOweBillBeforeDays());
bill.setNearBillBeforeDays(wxMerchant.getNearBillBeforeDays());
Date nowBegin = DateUtils.getDayBegin(new Date());
if (null != wxMerchant.getOweBillBeforeDays()) {
bill.setOweBillLastTime(DateUtils.getSecondsTimeAfter(wxMerchant.getOweBillBeforeDays()*3600, nowBegin));
}
if (null != wxMerchant.getNearBillBeforeDays()) {
bill.setNearBillLastTime(DateUtils.getSecondsTimeAfter(wxMerchant.getNearBillBeforeDays()*3600, nowBegin));
}
}
public WxBillSum getBillRentSum(WxMerchant wxMerchant,Date starttime, Date enttime) {


+ 7
- 3
mallinkService/src/main/java/com/iformall/utils/DateUtils.java Просмотреть файл

@@ -380,7 +380,7 @@ public class DateUtils {
Date date = new Date(myTime * 1000);
return formatter.format(date);
}
/**
* 获得当前时间前几小时的时间
*
@@ -403,10 +403,14 @@ public class DateUtils {
* @return
*/
public static String getSecondsTimeBefore(int seconds, Date myDate) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return formatter.format(getDateTimeBefore(seconds, myDate));
}
public static Date getDateTimeBefore(int seconds, Date myDate) {
long myTime = (myDate.getTime() / 1000) - seconds;
Date date = new Date(myTime * 1000);
return formatter.format(date);
return date;
}

/**


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

@@ -102,16 +102,11 @@
<if test=" null != month and '' != month">
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6)
)
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
</if>
<if test=" null != nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY)
and br.`starttime` &lt; DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.status not in (3,6)
)
<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=" null != buildWay ">and br.`build_way` = #{buildWay}</if>
<if test=" null != merchantIds ">


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

@@ -123,16 +123,11 @@
<if test=" null != month and '' != month">
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6)
)
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
</if>
<if test=" null != nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY)
and br.`starttime` &lt; DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.status not in (3,6)
)
<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=" null != merchantIds ">
and br.`merchant_id` in


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

@@ -107,16 +107,11 @@
<if test=" null != month and '' != month">
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6)
)
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
</if>
<if test=" null != nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY)
and br.`starttime` &lt; DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.status not in (3,6)
)
<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=" null != merchantIds ">
and br.`merchant_id` in


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

@@ -103,16 +103,11 @@
<if test=" null != month and '' != month">
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6)
)
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
</if>
<if test=" null != nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY)
and br.`starttime` &lt; DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.status not in (3,6)
)
<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=" null != merchantIds ">
and br.`merchant_id` in


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

@@ -114,16 +114,11 @@
<if test=" null != month and '' != month">
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6)
)
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
</if>
<if test=" null != nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY)
and br.`starttime` &lt; DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.status not in (3,6)
)
<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=" null != merchantIds ">
and br.`merchant_id` in


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

@@ -134,16 +134,11 @@
<if test=" null != month and '' != month">
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6)
)
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
</if>
<if test=" null != nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY)
and br.`starttime` &lt; DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.status not in (3,6)
)
<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=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != propertyContractId ">and br.`property_contract_id` = #{propertyContractId}</if>


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

@@ -122,16 +122,11 @@
<if test=" null != month and '' != month">
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6)
)
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
</if>
<if test=" null != nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY)
and br.`starttime` &lt; DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.status not in (3,6)
)
<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=" null != manageFeeType ">and br.`manage_fee_type` = #{manageFeeType}</if>
<if test=" null != hasMerchant ">and br.`merchant_id` is not null</if>


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

@@ -139,16 +139,11 @@
<if test=" null != month and '' != month">
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6)
)
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` &gt; 0 and br.status not in (3,6))
</if>
<if test=" null != nearBillBeforeDays and null != oweBillBeforeDays">
and (br.`starttime` &gt;= DATE_SUB(NOW(),INTERVAL #{nearBillBeforeDays} DAY)
and br.`starttime` &lt; DATE_SUB(NOW(),INTERVAL #{oweBillBeforeDays} DAY)
and br.status not in (3,6)
)
<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=" null != rentContractIdList ">
and br.`rent_contract_id` in


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