| @@ -464,7 +464,7 @@ public class BaseMyBatisConfiguration { | |||||
| shardingList.add(wxEnergyFeesSetoffSharding); | shardingList.add(wxEnergyFeesSetoffSharding); | ||||
| ShardingSphere wxFinanceReceiveSharding = new ShardingSphere(); | ShardingSphere wxFinanceReceiveSharding = new ShardingSphere(); | ||||
| wxEnergyFeesSetoffSharding.setColumn("tenant_id"); | |||||
| wxFinanceReceiveSharding.setColumn("tenant_id"); | |||||
| wxFinanceReceiveSharding.setTableName("wx_finance_receive"); | wxFinanceReceiveSharding.setTableName("wx_finance_receive"); | ||||
| wxFinanceReceiveSharding.setCount(100); | wxFinanceReceiveSharding.setCount(100); | ||||
| wxFinanceReceiveSharding.setRule(EnumShardingRule.HASH.getCode()); | wxFinanceReceiveSharding.setRule(EnumShardingRule.HASH.getCode()); | ||||
| @@ -162,7 +162,7 @@ | |||||
| <select id="queryBillDepositList" parameterType="com.iformall.domain.po.WxBillPropertyDeposit" resultMap="BaseResultMap"> | <select id="queryBillDepositList" parameterType="com.iformall.domain.po.WxBillPropertyDeposit" resultMap="BaseResultMap"> | ||||
| select br.`id`,br.`tenant_id`,br.`parent_tenant_id`,br.`property_contract_id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`,br.`status`, | select br.`id`,br.`tenant_id`,br.`parent_tenant_id`,br.`property_contract_id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`,br.`status`, | ||||
| br.`need_pay`,br.`updatetime`,br.`merchant_id`,br.`rent_shop_type`,br.`return_price`,br.`shop_info`,br.pay_way,br.`starttime`,br.`endtime`,br.`last_owe_call_user`,,br.`set_off`, | |||||
| br.`need_pay`,br.`updatetime`,br.`merchant_id`,br.`rent_shop_type`,br.`return_price`,br.`shop_info`,br.pay_way,br.`starttime`,br.`endtime`,br.`last_owe_call_user`,br.`set_off`, | |||||
| br.freeze,br.service_charge_pay,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,br.`create_by`,br.`create_by_name`,br.`update_by`,br.`update_by_name`,br.`energy_fees_id` | br.freeze,br.service_charge_pay,br.`apply_status`,br.`apply_pay_img`,br.`apply_update_time`,br.`create_by`,br.`create_by_name`,br.`update_by`,br.`update_by_name`,br.`energy_fees_id` | ||||
| from wx_bill_property_deposit br | from wx_bill_property_deposit br | ||||
| <include refid="queryBillDepositListConditions"/> | <include refid="queryBillDepositListConditions"/> | ||||
| @@ -85,7 +85,7 @@ | |||||
| <if test=" null != payWay ">and `pay_way` = #{payWay}</if> | <if test=" null != payWay ">and `pay_way` = #{payWay}</if> | ||||
| <if test=" null != latePayStatus ">and `late_pay_status` = #{latePayStatus}</if> | <if test=" null != latePayStatus ">and `late_pay_status` = #{latePayStatus}</if> | ||||
| <if test=" null != manageFeeType ">and `manage_fee_type` = #{manageFeeType}</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 > 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` > 0 and status not in (3,6,7) )</if> | |||||
| <if test=" null != merchantIds "> | <if test=" null != merchantIds "> | ||||
| and merchant_id in | and merchant_id in | ||||
| <foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")"> | <foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")"> | ||||
| @@ -145,17 +145,17 @@ | |||||
| and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} | and date_format(br.starttime,'%Y-%m') <= #{month} and date_format(br.endtime,'%Y-%m') >= #{month} | ||||
| </if> | </if> | ||||
| <if test=" null == nearBillLastTime and null != oweBillLastTime"> | <if test=" null == nearBillLastTime and null != oweBillLastTime"> | ||||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off > 0 and br.status not in (3,6,7)) | |||||
| and (br.`starttime` <= #{oweBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) | |||||
| </if> | </if> | ||||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | <if test=" null != nearBillLastTime and null != oweBillLastTime"> | ||||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off > 0 and br.status not in (3,6,7)) | |||||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) | |||||
| </if> | </if> | ||||
| <if test=" null != needPayStartDay"> | <if test=" null != needPayStartDay"> | ||||
| and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off > 0 and br.status not in (3,6,7)) | |||||
| and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` - br.`set_off` > 0 and br.status not in (3,6,7)) | |||||
| </if> | </if> | ||||
| <if test=" null != manageFeeType ">and br.`manage_fee_type` = #{manageFeeType}</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=" 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 > 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` > 0 and br.status not in (3,6,7) )</if> | |||||
| <if test=" null != merchantIds "> | <if test=" null != merchantIds "> | ||||
| and br.merchant_id in | and br.merchant_id in | ||||
| <foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")"> | <foreach collection="merchantIds" index="index" item="midItem" open="(" separator="," close=")"> | ||||
| @@ -109,7 +109,7 @@ | |||||
| <if test=" null != endtimeEnd"> | <if test=" null != endtimeEnd"> | ||||
| and endtime < #{endtimeEnd} | and endtime < #{endtimeEnd} | ||||
| </if> | </if> | ||||
| <if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay` - `set_off > 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` > 0 and status not in (3,6,7) )</if> | |||||
| <if test=" null != statusList "> | <if test=" null != statusList "> | ||||
| and status in | and status in | ||||
| <foreach collection="statusList" index="index" item="stItem" open="(" separator="," close=")"> | <foreach collection="statusList" index="index" item="stItem" open="(" separator="," close=")"> | ||||
| @@ -39,13 +39,13 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != status ">and `status` = #{status}</if> | <if test=" null != status ">and `status` = #{status}</if> | ||||
| <if test=" null != type ">and `type` = #{type}</if> | <if test=" null != type ">and `type` = #{type}</if> | ||||
| <if test=" null != merchantId ">and `merchantId` = #{merchant_id}</if> | |||||
| <if test=" null != merchantId ">and `merchant_id` = #{merchantId}</if> | |||||
| <if test=" null != createTimeBegin ">and `create_time` >= #{createTimeBegin}</if> | <if test=" null != createTimeBegin ">and `create_time` >= #{createTimeBegin}</if> | ||||
| <if test=" null != createTimeEnd ">and `create_time` <= #{createTimeEnd}</if> | <if test=" null != createTimeEnd ">and `create_time` <= #{createTimeEnd}</if> | ||||
| <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | ||||
| <if test=" null != isPrint ">and `is_print` = #{isPrint}</if> | <if test=" null != isPrint ">and `is_print` = #{isPrint}</if> | ||||
| <if test=" null != merchantIdList "> | <if test=" null != merchantIdList "> | ||||
| and merchantId in | |||||
| and merchant_id in | |||||
| <foreach collection="merchantIdList" index="index" item="midItem" open="(" separator="," close=")"> | <foreach collection="merchantIdList" index="index" item="midItem" open="(" separator="," close=")"> | ||||
| #{midItem} | #{midItem} | ||||
| </foreach> | </foreach> | ||||
| @@ -86,7 +86,7 @@ | |||||
| 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(use_money AS DECIMAL(20,4))) as use_money | ||||
| from wx_finance_receive | from wx_finance_receive | ||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| and money - use_money > 0 | |||||
| and receive_money - use_money > 0 | |||||
| group by fees_id | group by fees_id | ||||
| </select> | </select> | ||||