winter 1 год назад
Родитель
Сommit
f8d764bb9e
12 измененных файлов: 65 добавлений и 57 удалений
  1. +3
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java
  2. +8
    -2
      mallinkService/src/main/java/com/iformall/domain/po/WxFinanceReceive.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java
  4. +7
    -7
      mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml
  5. +8
    -8
      mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml
  6. +6
    -6
      mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml
  7. +6
    -6
      mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml
  8. +6
    -6
      mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml
  9. +6
    -6
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
  10. +6
    -6
      mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml
  11. +6
    -6
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml
  12. +2
    -2
      mallinkService/src/main/resources/mapper/WxFinanceReceiveMapper.xml

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

@@ -11,6 +11,7 @@ import com.iformall.domain.po.WxEnergyFees;
import com.iformall.domain.po.WxFinanceReceive;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.po.base.WxBillBaseEntity;
import com.iformall.domain.vo.FinanceBillSetoffSum;
import com.iformall.enums.EnumBillAllType;
import com.iformall.enums.EnumFinanceReceiveStatus;
import com.iformall.enums.EnumFinanceReceiveType;
@@ -176,7 +177,8 @@ public class WxFinanceController extends BaseController {
if (null == record.getMerchantId()) {
return new ResultData(Result.ERROR,"请选择商户");
}
return new ResultData(wxFinanceService.getBillSetoffSum(record));
FinanceBillSetoffSum sum = wxFinanceService.getBillSetoffSum(record);
return new ResultData(sum);
}
@ApiOperation("查询冲抵列表")


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

@@ -77,7 +77,10 @@ public class WxFinanceReceive extends TenantEntity {
@TableField(exist = false)
private String statusName;
public String getStatusName() {
return EnumFinanceReceiveStatus.getEnum(status).getMessage();
if (null != status) {
return EnumFinanceReceiveStatus.getEnum(status).getMessage();
}
return null;
}
@io.swagger.annotations.ApiModelProperty(value = "类型EnumFinanceReceiveType", name = "type")
@@ -85,7 +88,10 @@ public class WxFinanceReceive extends TenantEntity {
@TableField(exist = false)
private String typeName;
public String getTypeName() {
return EnumFinanceReceiveType.getEnum(type).getMessage();
if (null != type) {
return EnumFinanceReceiveType.getEnum(type).getMessage();
}
return null;
}
@io.swagger.annotations.ApiModelProperty(value="createBy",name="createBy")


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

@@ -198,7 +198,7 @@ public class WxFinanceServiceImpl implements WxFinanceService {
if (null != wfat) {
at.setFeesName(wfat.getName());
}
total.add(new BigDecimal(at.getRemain()));
total = total.add(new BigDecimal(at.getRemain()));
}
}
}


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

@@ -80,7 +80,7 @@
<if test=" null != buildWay ">and `build_way` = #{buildWay}</if>
<if test=" null != energyReadingCalcuteId ">and `energy_reading_calcuteId` = #{energyReadingCalcuteId}</if>
<if test=" null != energyReadingId ">and `energy_reading_id` = #{energyReadingId}</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off` &gt; 0 and status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != statusList ">
and status in
@@ -138,18 +138,18 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != needPayStartDay">
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != buildWay ">and br.`build_way` = #{buildWay}</if>
<if test=" null != energyReadingCalcuteId ">and br.`energy_reading_calcuteId` = #{energyReadingCalcuteId}</if>
<if test=" null != energyReadingId ">and br.`energy_reading_id` = #{energyReadingId}</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -216,7 +216,7 @@
<result column="min_begin_time" jdbcType="TIMESTAMP" property="minBeginTime"/>
</resultMap>
<select id="getBillHotNotify" parameterType="com.iformall.domain.po.WxBillDaily" resultMap="HotNotifyBaseResultMap">
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,"0") AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_daily br
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,'0') AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_daily br
<include refid="queryBillDailyListConditions"/>
</select>
@@ -280,7 +280,7 @@
</insert>
<delete id = "deleteEnergyReadingBills" parameterType="HashMap">
delete from wx_bill_daily where energy_reading_calcuteId = #{energyReadingCalcuteId} and tenant_id = #{tenantId} and status = 2 and pay &lt;= 0 and set_off &lt;= 0
delete from wx_bill_daily where energy_reading_calcuteId = #{energyReadingCalcuteId} and tenant_id = #{tenantId} and status = 2 and pay &lt;= 0 and IFNULL(`set_off`,'0') &lt;= 0
</delete>
</mapper>

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

@@ -84,12 +84,12 @@
and date_format(starttime,'%Y-%m') &lt;= #{month} and date_format(endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (`starttime` &lt;= #{oweBillLastTime} and `receive_pay` - `pay` - `set_off` &gt; 0 and status not in (3,6,7))
and (`starttime` &lt;= #{oweBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (`starttime` &gt; #{oweBillLastTime} and `starttime` &lt;= #{nearBillLastTime} and `receive_pay` - `pay` - `set_off` &gt; 0 and status not in (3,6,7))
and (`starttime` &gt; #{oweBillLastTime} and `starttime` &lt;= #{nearBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off` &gt; 0 and status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and `merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -168,15 +168,15 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != needPayStartDay">
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -226,7 +226,7 @@
<result column="min_begin_time" jdbcType="TIMESTAMP" property="minBeginTime"/>
</resultMap>
<select id="getBillHotNotify" parameterType="com.iformall.domain.po.WxBillDeposit" resultMap="HotNotifyBaseResultMap">
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,"0") AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_rent_deposit br
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,'0') AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_rent_deposit br
<include refid="queryBillRentListCondition"/>
</select>


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

@@ -77,7 +77,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` - `set_off` &gt; 0 and status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -137,15 +137,15 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != needPayStartDay">
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -213,7 +213,7 @@
<result column="min_begin_time" jdbcType="TIMESTAMP" property="minBeginTime"/>
</resultMap>
<select id="getBillHotNotify" parameterType="com.iformall.domain.po.WxBillOtherDeposit" resultMap="HotNotifyBaseResultMap">
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,"0") AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_other_deposit br
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,'0') AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_other_deposit br
<include refid="queryBillListConditions"/>
</select>


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

@@ -75,7 +75,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` - `set_off` &gt; 0 and status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -130,15 +130,15 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != needPayStartDay">
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -206,7 +206,7 @@
<result column="min_begin_time" jdbcType="TIMESTAMP" property="minBeginTime"/>
</resultMap>
<select id="getBillHotNotify" parameterType="com.iformall.domain.po.WxBillOther" resultMap="HotNotifyBaseResultMap">
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,"0") AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_other br
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,'0') AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_other br
<include refid="queryBillListConditions"/>
</select>


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

@@ -76,7 +76,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` - `set_off` &gt; 0 and status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != propertyContractIdList ">
and property_contract_id in
<foreach collection="propertyContractIdList" index="index" item="pidItem" open="(" separator="," close=")">
@@ -136,15 +136,15 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != needPayStartDay">
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.`merchant_id` in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -202,7 +202,7 @@
<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)) - CAST(IFNULL(br.`set_off`,"0") AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_property_deposit br
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,'0') AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_property_deposit br
<include refid="queryBillDepositListConditions"/>
</select>


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

@@ -98,7 +98,7 @@
<if test=" 1 == hasFeesStardarsId ">and `energy_fees_id` is not null</if>
<if test=" 0 == hasFeesStardarsId ">and `energy_fees_id` is null</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off` &gt; 0 and status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != propertyContractIds ">
and property_contract_id in
<foreach collection="propertyContractIds" index="index" item="pidItem" open="(" separator="," close=")">
@@ -162,13 +162,13 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != needPayStartDay">
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != propertyContractId ">and br.`property_contract_id` = #{propertyContractId}</if>
@@ -180,7 +180,7 @@
<if test=" 1 == hasFeesStardarsId ">and br.`energy_fees_id` is not null</if>
<if test=" 0 == hasFeesStardarsId ">and br.`energy_fees_id` is null</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != propertyContractIds ">
and br.property_contract_id in
<foreach collection="propertyContractIds" index="index" item="pidItem" open="(" separator="," close=")">
@@ -254,7 +254,7 @@
<result column="min_begin_time" jdbcType="TIMESTAMP" property="minBeginTime"/>
</resultMap>
<select id="getBillHotNotify" parameterType="com.iformall.domain.po.WxBillProperty" resultMap="HotNotifyBaseResultMap">
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,"0") AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_property br
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,'0') AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_property br
<include refid="queryBillPropertyListConditions"/>
</select>


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

@@ -85,7 +85,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` - `set_off` &gt; 0 and status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and merchant_id in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -145,17 +145,17 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != needPayStartDay">
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != manageFeeType ">and br.`manage_fee_type` = #{manageFeeType}</if>
<if test=" null != hasMerchant ">and br.`merchant_id` is not null</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != merchantIds ">
and br.merchant_id in
<foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")">
@@ -223,7 +223,7 @@
<result column="min_begin_time" jdbcType="TIMESTAMP" property="minBeginTime"/>
</resultMap>
<select id="getBillHotNotify" parameterType="com.iformall.domain.po.WxBillRentManage" resultMap="HotNotifyBaseResultMap">
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - - CAST(IFNULL(br.`set_off`,"0") AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_rent_manage br
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - - CAST(IFNULL(br.`set_off`,'0') AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_rent_manage br
<include refid="queryBillManageListConditions"/>
</select>


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

@@ -109,7 +109,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` - `set_off` &gt; 0 and status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != statusList ">
and status in
<foreach collection="statusList" index="index" item="stItem" open="(" separator="," close=")">
@@ -161,15 +161,15 @@
and date_format(br.starttime,'%Y-%m') &lt;= #{month} and date_format(br.endtime,'%Y-%m') &gt;= #{month}
</if>
<if test=" null == nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != nearBillLastTime and null != oweBillLastTime">
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &gt; #{oweBillLastTime} and br.`starttime` &lt;= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" null != needPayStartDay">
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` &gt; 0 and br.status not in (3,6,7))
and (br.`starttime` &lt;= #{needPayStartDay} and br.`receive_pay` - br.`pay` - IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7))
</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay`- br.`set_off` &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay`- IFNULL(br.`set_off`,'0') &gt; 0 and br.status not in (3,6,7) )</if>
<if test=" null != rentContractIdList ">
and br.`rent_contract_id` in
<foreach collection="rentContractIdList" index="index" item="ridItem" open="(" separator="," close=")">
@@ -243,7 +243,7 @@
<result column="min_begin_time" jdbcType="TIMESTAMP" property="minBeginTime"/>
</resultMap>
<select id="getBillHotNotify" parameterType="com.iformall.domain.po.WxBillRent" resultMap="HotNotifyBaseResultMap">
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,"0") AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_rent br
select count(1) total_count , sum(CAST(br.`receive_pay` AS DECIMAL(20,2)) - CAST(br.`pay` AS DECIMAL(20,2)) - CAST(IFNULL(br.`set_off`,'0') AS DECIMAL(20,2))) total_money,MIN(br.starttime) min_begin_time from wx_bill_rent br
<include refid="queryBillRentListCondition"/>
</select>


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

@@ -83,10 +83,10 @@
</update>
<select id="getMerchantAdvanceGroupSumList" parameterType="com.iformall.domain.po.WxFinanceReceive" resultMap="BaseResultMap">
select fees_id,sum(CAST(receive_money AS DECIMAL(20,4))) as receive_money,sum(CAST(use_money AS DECIMAL(20,4))) as use_money
select fees_id,sum(CAST(receive_money AS DECIMAL(20,4))) as receive_money,sum(CAST(IFNULL(use_money,'0') AS DECIMAL(20,4))) as use_money
from wx_finance_receive
<include refid="dynamicWhereConditions"/>
and receive_money - use_money &gt; 0
and receive_money - IFNULL(use_money,'0') &gt; 0
group by fees_id
</select>


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