|
|
|
@@ -455,7 +455,7 @@ |
|
|
|
</if> |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateAllContractCusName" parameterType="com.iformall.domain.po.WxAllBill"> |
|
|
|
<update id="transferCusName" parameterType="com.iformall.domain.po.WxAllBill"> |
|
|
|
update wx_all_bill set cus_name = #{cusName} where tenant_id = #{tenantId} |
|
|
|
<if test=" null != rentContractId"> |
|
|
|
and rent_contract_id = #{rentContractId} |
|
|
|
@@ -463,6 +463,22 @@ |
|
|
|
<if test=" null != propertyContractId"> |
|
|
|
and property_contract_id = #{propertyContractId} |
|
|
|
</if> |
|
|
|
and( |
|
|
|
<!-- 应收 --> |
|
|
|
( |
|
|
|
( `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') > 0 and bill_type not in (13,21,5,6,7)) |
|
|
|
or |
|
|
|
( `receive_pay` - `pay` - IFNULL(`set_off`,'0') > 0 and bill_type in (13,21,5,6,7)) |
|
|
|
) |
|
|
|
<!-- 应fu --> |
|
|
|
or ( |
|
|
|
( `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') < 0 and bill_type not in (13,21,5,6,7)) |
|
|
|
or |
|
|
|
( `pay` - IFNULL(`return_pay`,'0') - IFNULL(`use_money`,'0') > 0 and bill_type in (13,21,5,7)) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
</update> |
|
|
|
</mapper> |
|
|
|
|