Procházet zdrojové kódy

fix

release_toaliyun_real
winter před 1 rokem
rodič
revize
ac73ff35fa
3 změnil soubory, kde provedl 24 přidání a 22 odebrání
  1. +0
    -2
      mallinkService/src/main/java/com/iformall/mapper/WxAllBillMapper.java
  2. +12
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  3. +12
    -19
      mallinkService/src/main/resources/mapper/WxAllBillMapper.xml

+ 0
- 2
mallinkService/src/main/java/com/iformall/mapper/WxAllBillMapper.java Zobrazit soubor

@@ -45,7 +45,5 @@ public interface WxAllBillMapper extends CommonMapper<WxAllBill, Long> {
void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId); void deleteById(@Param("id")Long id,@Param("tenantId")String tenantId);
void deleteEnergyReadingBills(@Param("energyReadingCalcuteId")Long energyReadingCalcuteId,@Param("tenantId")String tenantId); void deleteEnergyReadingBills(@Param("energyReadingCalcuteId")Long energyReadingCalcuteId,@Param("tenantId")String tenantId);
void updatePropertyBillInvalidStatusByRent(WxRentContract wxRentContract);


} }

+ 12
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Zobrazit soubor

@@ -1552,6 +1552,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
WxPropertyContract wxPropertyContract = new WxPropertyContract(); WxPropertyContract wxPropertyContract = new WxPropertyContract();
wxRentContract.updateTenantInfo(wxRentContract); wxRentContract.updateTenantInfo(wxRentContract);
wxPropertyContract.setRentContractId(wxRentContract.getId()); wxPropertyContract.setRentContractId(wxRentContract.getId());
//终止有效的合同 //终止有效的合同
wxPropertyContract.setStatuss(EnumRentContractStatus.getValidStatus()); wxPropertyContract.setStatuss(EnumRentContractStatus.getValidStatus());
wxPropertyContract.setUpdatetime(new Date()); wxPropertyContract.setUpdatetime(new Date());
@@ -1567,7 +1568,17 @@ public class WxRentContractServiceImpl implements WxRentContractService {
wxPropertyContractMapper.endContract(wxPropertyContract); wxPropertyContractMapper.endContract(wxPropertyContract);
//物业账单失效 //物业账单失效
wxAllBillMapper.updatePropertyBillInvalidStatusByRent(wxRentContract);
WxPropertyContract pq = new WxPropertyContract();
pq.updateTenantInfo(wxRentContract);
pq.setRentContractId(wxRentContract.getId());
List<WxPropertyContract> plist = wxPropertyContractMapper.findList(pq);
if (null != plist && plist.size() > 0 ) {
WxPropertyContract pc = plist.get(0);
pc.setEndContractTime(wxRentContract.getEndContractTime());
wxBillAllHelper.propertyContractStop(pc, userInfo);
wxPropertyContractMapper.updateById(pc);
}
} }
//租赁账单失效 //租赁账单失效
wxBillAllHelper.rentContractStop(wxRentContract,userInfo); wxBillAllHelper.rentContractStop(wxRentContract,userInfo);


+ 12
- 19
mallinkService/src/main/resources/mapper/WxAllBillMapper.xml Zobrazit soubor

@@ -81,30 +81,30 @@
</if> </if>
<if test=" null == nearBillLastTime and null != oweBillLastTime"> <if test=" null == nearBillLastTime and null != oweBillLastTime">
and ( and (
(`starttime` &lt;= #{oweBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and status not in (3,6,7,9) and bill_type not in (13,21,5))
(`starttime` &lt;= #{oweBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and bill_type not in (13,21,5))
or or
(`starttime` &lt;= #{oweBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7,9) and bill_type in (13,21,5))
(`starttime` &lt;= #{oweBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and bill_type in (13,21,5))
) )
</if> </if>
<if test=" null != nearBillLastTime and null != oweBillLastTime"> <if test=" null != nearBillLastTime and null != oweBillLastTime">
and ( and (
(`starttime` &gt; #{oweBillLastTime} and `starttime` &lt;= #{nearBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and status not in (3,6,7,9) and bill_type not in (13,21,5))
(`starttime` &gt; #{oweBillLastTime} and `starttime` &lt;= #{nearBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and bill_type not in (13,21,5))
or or
(`starttime` &gt; #{oweBillLastTime} and `starttime` &lt;= #{nearBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7,9) and bill_type in (13,21,5))
(`starttime` &gt; #{oweBillLastTime} and `starttime` &lt;= #{nearBillLastTime} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and bill_type in (13,21,5))
) )
</if> </if>
<if test=" null != needPayStartDay"> <if test=" null != needPayStartDay">
and ( and (
(`starttime` &lt;= #{needPayStartDay} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and status not in (3,6,7,9) and bill_type not in (13,21,5))
(`starttime` &lt;= #{needPayStartDay} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and bill_type not in (13,21,5))
or or
(`starttime` &lt;= #{needPayStartDay} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7,9) and bill_type in (13,21,5))
(`starttime` &lt;= #{needPayStartDay} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and bill_type in (13,21,5))
) )
</if> </if>
<if test=" null != needPayNoDays"> <if test=" null != needPayNoDays">
and ( and (
( `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and status not in (3,6,7) and bill_type not in (13,21,5))
( `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and bill_type not in (13,21,5))
or or
( `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7,9) and bill_type in (13,21,5))
( `receive_pay` - `pay` - IFNULL(`set_off`,'0') &gt; 0 and bill_type in (13,21,5))
) )
</if> </if>
<if test=" null != toPayMerchant"> <if test=" null != toPayMerchant">
@@ -116,9 +116,9 @@
</if> </if>
<if test=" 1 == notifyed "> <if test=" 1 == notifyed ">
and ( and (
(`last_owe_call_time` is not null and `receive_pay` - `pay`- IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and status not in (3,6,7,9) and bill_type not in (13,21,5))
(`last_owe_call_time` is not null and `receive_pay` - `pay`- IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and bill_type not in (13,21,5))
or or
(`last_owe_call_time` is not null and `receive_pay` - `pay`- IFNULL(`set_off`,'0') &gt; 0 and status not in (3,6,7,9) and bill_type in (13,21,5))
(`last_owe_call_time` is not null and `receive_pay` - `pay`- IFNULL(`set_off`,'0') &gt; 0 and bill_type in (13,21,5))
) )
</if> </if>
<if test=" null != hasMerchant ">and `merchant_id` is not null</if> <if test=" null != hasMerchant ">and `merchant_id` is not null</if>
@@ -289,8 +289,7 @@
</delete> </delete>
<delete id="deleteNoNeedPayBill" parameterType="com.iformall.domain.po.WxAllBill"> <delete id="deleteNoNeedPayBill" parameterType="com.iformall.domain.po.WxAllBill">
delete from wx_all_bill where status = 2
and starttime &gt;= #{shopEndtime} and IFNULL(`pay`,'0') &lt;= 0 AND IFNULL(`set_off`,'0') &lt;= 0 and IFNULL(`return_pay`,'0') &lt;= 0
delete from wx_all_bill where starttime &gt;= #{shopEndtime} and IFNULL(`pay`,'0') &lt;= 0 AND IFNULL(`set_off`,'0') &lt;= 0 and IFNULL(`return_pay`,'0') &lt;= 0
<if test=" null != rentContractId"> <if test=" null != rentContractId">
and rent_contract_id = #{rentContractId} and rent_contract_id = #{rentContractId}
</if> </if>
@@ -354,14 +353,8 @@
</delete> </delete>
<delete id = "deleteEnergyReadingBills" parameterType="HashMap"> <delete id = "deleteEnergyReadingBills" parameterType="HashMap">
delete from wx_all_bill where energy_reading_calcuteId = #{energyReadingCalcuteId} and tenant_id = #{tenantId} and status = 2 and pay &lt;= 0 and IFNULL(`set_off`,'0') &lt;= 0 and IFNULL(`return_pay`,'0') &lt;= 0
delete from wx_all_bill where energy_reading_calcuteId = #{energyReadingCalcuteId} and tenant_id = #{tenantId} and pay &lt;= 0 and IFNULL(`set_off`,'0') &lt;= 0 and IFNULL(`return_pay`,'0') &lt;= 0
</delete> </delete>
<update id="updatePropertyBillInvalidStatusByRent" parameterType="com.iformall.domain.po.WxRentContract">
update wx_all_bill set status = 6 where property_contract_id in
(select id from wx_property_contract where rent_contract_id = #{id})
and status != 3
</update>

</mapper> </mapper>



Načítá se…
Zrušit
Uložit